summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
...
* iscsi modules: fix compilationMike Christie2008-11-271-0/+2
| | | | | | | | I added a stdint include so that it would be easier to compile userspace apps including iscsi_proto.h, but that breaks the kernel compilation. Since this iscsi_proto.h is only used in open-iscsi releases I am just adding a ifdef __KERNEL__.
* fwparam: rm unused filepath argumentMike Christie2008-11-261-1/+1
| | | | fw_get_entry's filepath is always NULL, so this patch removes it.
* ibft: add support to use iscsi_ibft module and log into all portals found in ↵Mike Christie2008-11-263-9/+121
| | | | | | | | | | | | | | | | | | | | | firmware This adds the ibft sysfs module (iscsi_ibft) parsing support. It was original done by Konard, but I have ported it to use the sysfs.c helpers (add new ones and ported iscsi_sysfs.c too). This patch also modifies iscsistart and iscsiadm to print/log into all the portals found in firmware. It also changes the behavior of iscsiadm -m discovery -t fw so that we create db records for what is found. It is not fully hooked into the iface code, so it will use the different inititor name, but it will not create a iface for it (this means that if you have a record for the same portal that is bound to a iface with a iname you can run into problems).
* iscsi_tcp: return a descriptive error value during connection errorsMike Christie2008-09-251-0/+1
| | | | | | | | The segment->done functions return a iscsi error value which gives a lot more info than conn failed, so this patch has us return that value. I also add a new one for xmit failures. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
* handle ISCSI_ERR_INVALID_HOSTMike Christie2008-09-251-0/+1
| | | | | | | | | | If the kernel throws ISCSI_ERR_INVALID_HOST then the host is no longer able to support iscsi. iscsid should then kill the session. There is no need to logout or do the sync cache from the ubind path, because at this point the transport is dead. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Mike Christie <mchristi@redhat.com>
* Sync kernel modules to scsi-misc for 2.6.27.Mike Christie2008-06-132-9/+6
| | | | Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
* pass ep to session creationMike Christie2008-05-191-0/+7
| | | | | | | | | | bnx2i allocates a host per session and iser accesses the device so we need to pass them a the leading connection so they can find the hardware that is it bound to. This also has us call ep_disconnect before calling the stop conn callout, so these driver do not have to worry about stopping the receiving path.
* Revert Release-transport-entry-when-the-transport-is-unload.patchMike Christie2008-05-191-1/+0
| | | | | | | | | We do not need a new event to figure out that a transport is missing. We can just check before accessing the transport. This reverts the original patch. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
* Release transport entry when the transport is unloadedMike Christie2008-04-261-0/+1
| | | | | | | | | | When iscsid detects a new transport (e.g. iscsi_tcp, ib_iser), it allocates an entry for it in the transport list. If the transport is unloaded and then reloaded, iscsid would still use the old transport entry. Therefore, the transport entry must be deleted when the transport is unloaded. Signed-off-by: Erez Zilber <erezz@voltaire.com>
* iscsi class/if kernel: add ifacename attrMike Christie2008-04-201-36/+41
| | | | | | | | This adds a attr that userspace can use to set a id for the session similar to setting a network inteface's name. It is used for binding hba and port attrs to a session. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
* The session age mask is only 4 bits, but session->age is 32. WhenMike Christie2008-02-211-2/+2
| | | | | | | | it gets larger then 15 and we try to or the bits some bits get dropped and the check for session age in iscsi_verify_itt is useless. The ISCSI_CID_MASK related bits are also useless since cid is always one.
* sync with upstreamMike Christie2007-09-292-2/+13
| | | | Recv and xmit rewrite.
* mv nop handling to kernelMike Christie2007-08-271-0/+11
| | | | | | | During root boot and shutdown the target could send us nops. At this time iscsid cannot be running, so the target will drop the session and the boot or shutdown will hang. This patch moves the nop handling to the kernel.
* fix shutdownMike Christie2007-08-271-0/+7
| | | | | | | | | | | | | We were using the device delete sysfs file to remove each device then logout. Now in 2.6.21 and .22 this will not work because the sysfs delete file returns immediately and does not wait for the device removal to complete. This causes a hang if a cache sync is needed during shutdown. This patch fixes the shutdown code so that we remove the target and unbind the session before logging out and shuttdown the session. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
* add device reset support and fix some scsi eh bugs.Mike Christie2007-08-141-0/+2
| | | | | | | This patch adds logical unit reset support. It also fixes a bug where when the session lock is dropped so we can grab the recv lock, the iscsi eh thread could grab completely clean up the session. The recv lock would then be a null ptr.
* fix DefaultTime2Wait handling and fix libiscsi null ptr ref.Mike Christie2007-08-131-0/+2
| | | | | | | We were not using the DefaultTime2Wait value we negotiated for. We could hit a null ptr in libiscsi if we called stop and the connection had not been setup.
* Finish hooking into toolMike Christie2007-07-251-6/+6
| | | | | | | | | | | Instead of having each parser print its output, make it common in fw_entry.c and make that use the same format and fields as the rest of the tools. Kept the ibft dump code, because it may be use for compat tools for suse. Let me know and I can help on that if you need it. With the hook in though the format for ibft is the same as normal iscsiadm node info so you can just reuse your parsing login for that.
* hook fw programs into iscsi toolsMike Christie2007-07-251-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch hooks ibft into iscsiadm and iscsistart. Why do this? It seems easier to be able to just run the same tool we use for normal login. For example in the installer or initramfs we can do this: // This will check for fw crap and if found // log into targets that are found // returns 0 on success and non zero if // there was no fw crap or we could not log // in or some other error. // This will _not_ store any record (text files // with data in it) in /var/lib/iscsi. // It is completely dynamic in that regard. ret = iscsiadm -m discovery -t fwboot -l (fwboot - is a new discovery type I added which is for this fw crap). // For normal iscsi install we can then do: ret = iscsiadm -m discovery -t st -p ip:port -l // This will do discovery to the portal at // ip:port, and now the code supports the -l on discovery, // so it will also log into all the targets found // automagically for the caller. // This will store records (text files with target data in it) // like usual to /var/lib/iscsi. To setup the initramfs then, we just need some variable that tells us if we are doing the fw boot or the pxe net iscsi boot. This could be done by checking iscsiadm or iscsistart like so: ret = iscsiadm -m discovery -t fwboot // no login/-l command this time if ret indicates success, then setup initramfs for dynamic fwboot else do the normal pxe static iscsi root stuff we did. In the initrams fs if using iscsistart we would just do (if this got setup for fw dynamic boot) or it would end up as And if using iscsiadm in the initramfs you can just do iscsiadm -m discovery -t fwboot -l The patch was made using Prasana and Doug's code. I have not tested it. I do not have the hardware handy (no intel card and I got stuck looking for a ppc box with it).
* Support bind by hw address or netdev (ip address is temp disabled because ↵mnc2007-05-301-0/+3
| | | | | | targets are not handling it well) and use the iface argument instead of the actual values git-svn-id: svn://svn.berlios.de/open-iscsi@845 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* print local addressmnc2007-05-051-0/+2
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@831 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* Rename iface.name to iface.hwaddress and make transport name part of the ↵mnc2007-04-241-0/+2
| | | | | | iface (driver and hardware are bound). Also merge the -D and -I arguments so they are now -I driver,hwaddress. Also add some basic qla4xxx support. We can rescan/scan it and perform sendtargets through it but it stores the targets it finds in Flash and then logs into all of them autmatically (when we do discovery and later when reload the driver). So qla4xxx support is mostly to make sure we have the --interfae argument right. We will have to decide how to set other params, manage nodes, and if we should move scanning to the kernel and then also move some error recovery code to the kernel (today qla4xxx is calling block directly and is not able to export it iscsi state yet (the beginnings to fix that is in the git tree but we still need to reduce some code duplcation)). qla4xxx behavior and functionality is going to change as we learn more about the hw (what format the flash data is supposed to be in for example). git-svn-id: svn://svn.berlios.de/open-iscsi@816 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* make can_queue and cmd_per_lun settable in node dbmnc2007-04-241-0/+2
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@799 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* again with the root boot stuff :) For root boot, the user may not be using a ↵mnc2007-04-241-0/+9
| | | | | | node db record, and may be using chap so we store the values in sysfs in the kernel and then read them out again when iscsid starts up. This is also really more useful for qla4xxx which needs to export this stuff since it stores/sets it in flash git-svn-id: svn://svn.berlios.de/open-iscsi@788 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* For now we are not going to be able to settle on a way to force each iscsi ↵mnc2007-04-241-0/+2
| | | | | | stack use the same initiator name, so export what the user set up (we do not prevent users from doing this today so they can just set the same name for every stack) and let userspace sort it out git-svn-id: svn://svn.berlios.de/open-iscsi@785 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* export session's or hba's hw address from kernelmnc2007-04-241-0/+14
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@781 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* check some iscsi and initiator settings before use and drop down to defaults ↵mnc2007-02-211-1/+11
| | | | | | if invalid values are passed in git-svn-id: svn://svn.berlios.de/open-iscsi@776 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* compile fix ups from endien patchmnc2007-02-201-0/+15
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@773 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* from al viro: use endien valuesmnc2007-02-191-19/+27
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@772 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* used tool from patman to strip trailing white spacesmnc2006-11-281-1/+1
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@744 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* revert use aligned_u64 patch. upstream wants a compat layer to go with itmnc2006-10-051-7/+7
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@706 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* fix 32 bit up and 64 bit kern by using alinged_u64mnc2006-09-191-7/+7
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@696 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* This patch adds or modifies the transport class functions used to notify ↵mnc2006-07-101-18/+5
| | | | | | userspace of session state events. We modify the session addition up event and add a destruction event to notify userspace of session creation, relogin and destruction. And we modify the conn error event to be sent by broadcast since multiple listeners may want to listen for it. git-svn-id: svn://svn.berlios.de/open-iscsi@630 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* Add target discovery event. We may have a setup where the iscsi traffic is ↵mnc2006-07-101-0/+37
| | | | | | on a different netowrk than the other network traffic. In this case we will want to do discovery though the iscsi card. This patch adds a event to the transport class that can be used by hw iscsi cards that support this. git-svn-id: svn://svn.berlios.de/open-iscsi@622 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* fix term state. when closing the session we do not want to queue any more ↵mnc2006-05-201-1/+0
| | | | | | commands. This also fixes a bug where we would perform recovery, that would fail, then we would cleanup and set the state back into recovery which would allow scsi-ml to queue commands to our internal queues. git-svn-id: svn://svn.berlios.de/open-iscsi@578 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* update version numbersmnc2006-05-191-2/+0
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@574 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* debugged by Ming and Rohan: for normal session logins we should be ↵mnc2006-04-271-0/+2
| | | | | | incrementing exp_statsn when successful. For connection reinstatement we should also be using the exp_statsn from the last connection git-svn-id: svn://svn.berlios.de/open-iscsi@561 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* from ogerlitz@voltaire.com: add ep callbacksmnc2006-04-131-1/+18
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@538 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* add libiscsi: move duplicated code in iscsi_iser and iscsi_tcp to new lib ↵mnc2006-04-021-1/+2
| | | | | | functions git-svn-id: svn://svn.berlios.de/open-iscsi@526 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* add basic iscsi block functionality. The open-iscsi replacement_timeout is ↵mnc2006-03-031-0/+2
| | | | | | the block timeout. when that expires we will fail commands upwards but keep the session struct so we can just reonline the devs when the connection is back. TODO: move more state code from iscsi_tcp to the class so the block code can do more git-svn-id: svn://svn.berlios.de/open-iscsi@507 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* add sysfs attrs need so iscsid can sync up after a restartmnc2006-03-031-16/+48
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@501 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* from hare@suse.de: This patch removes the handles for kernel-userspace ↵mnc2006-02-131-14/+23
| | | | | | communication. Instead the existing session / connection ids from sysfs are used to identify the corresponding sessions / connections. Signed-off-by: Hannes Reinecke <hare@suse.de> Small cleanups to allocate sid for hw and sw iscsi from mike christie git-svn-id: svn://svn.berlios.de/open-iscsi@489 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* pass iscsi_cls struct between class and LLD or iscsi_transportmnc2006-01-171-3/+0
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@459 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* sync upstream with svnmnc2006-01-171-0/+2
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@458 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* rm rdma code and sync upstream driver with svn and update usrspace to work ↵mnc2006-01-101-2/+1
| | | | | | with mainline. Some of the userspace code is left with some hacks around it to make patching easier git-svn-id: svn://svn.berlios.de/open-iscsi@453 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* seperate netlink from session and connection creation functions and fix ↵mnc2006-01-101-0/+4
| | | | | | sysfs refcount bug git-svn-id: svn://svn.berlios.de/open-iscsi@452 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* Alex Nezhinsky: login extensions for RDMA transportsdmitry_yus2005-09-231-1/+2
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@415 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* Hannes Reinecke: fix iscsi_proto.h so that iscsitarget could use itaaizman2005-08-221-13/+15
| | | | | | | (instead of its own iscsi_hdr.h) git-svn-id: svn://svn.berlios.de/open-iscsi@405 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* Mike: This is just some iscsi_proto.h cleanups andaaizman2005-08-171-12/+33
| | | | | | | | updates. It incorporates some iet iscsi_hdr.h values so that iet can now use iscsi_proto.h git-svn-id: svn://svn.berlios.de/open-iscsi@399 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* Mike: remove the ISCSI_TRANSPORT_MAX limitation from the kernel using sysfsdmitry_yus2005-05-261-13/+2
| | | | git-svn-id: svn://svn.berlios.de/open-iscsi@350 d7303112-9cec-0310-bdd2-e83a94d6c2b6
* comments in the iscsi_tcp.haaizman2005-05-261-1/+1
| | | | | | | in particular: conn->xmitsema, session->lock git-svn-id: svn://svn.berlios.de/open-iscsi@349 d7303112-9cec-0310-bdd2-e83a94d6c2b6