aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2i (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-05-18[SCSI] Merge scsi-misc-2.6 into scsi-rc-fixes-2.6James Bottomley2-6/+7
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-04-11[SCSI] bnx2i: Bug fixes related to MTU change issue when there are active iscsi sessionsAnil Veerabhadrappa3-4/+24
bnx2i driver has to wait and cleanup all iscsi endpoints before returning from bnx2i_stop(). This is to make sure all chip resources are freed before chip is reset. As the requirements for 1G and 10G chipsets is different, added per-device 'hba_shutdown_tmo' parameter to adapter structure If the connections are not torn down by the daemon within this timeout period, 'cid's will be leaked in 10G device. 1G devices are more flexible and do not leak any resources because the whole chip ports gets reset when MTU is changed or ethtool selftest is run fixed a minor issue in bnx2i_ep_poll() which unnecessarily forced error return code when driver timed out waiting for TCP connect request to complete Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-04-11[SCSI] bnx2i: Update version and module descriptionAnil Veerabhadrappa1-3/+4
missing 10G drivers added to description Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-04-11[SCSI] bnx2i: link bnx2i hba and cnic device before registering the deviceAnil Veerabhadrappa1-2/+2
When bnx2/cnic/bnx2i drivers are loaded in certain order, bnx2i will will not initialize the device correctly because 'hba->cnic' will be NULL when bnx2i_start() is called from register_device() context. Under this condition 'ifdown' and 'ifup' of associated network interface is required to bring iscsi adapter state to ready state so that it will accept iscsi connection setup within the chip Initializing 'hba->cnic' before calling register_device() will fix this issue Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-04-11[SCSI] bnx2i: make firmware use statsn field when constructing headerAnil Veerabhadrappa1-1/+1
instruct firmware to use driver/iscsid provided expected statsn field while constructing login pdu header. Initialize 'flags' to instruct chip to use driver/iscsid provided ExpStatSN value while constructing iSCSI login PDU header Signed-off-by: Eddie Wai <waie@broadcom.com> Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo2-0/+2
percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-03[SCSI] libiscsi: Make iscsi_eh_target_reset start with session resetJayamohan Kallickal1-1/+1
The iscsi_eh_target_reset has been modified to attempt target reset only. If it fails, then iscsi_eh_session_reset will be called. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] bnx2i: set change_queue_depth functionMike Christie1-0/+1
No reason that we cannot set the change_queue_depth function for bnx2i. We just forgot to when the driver was created. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] cxgb3i, bnx2i: remove uses of nipquad use %pi4Joe Perches1-2/+2
Remove uses of NIPQUAD, use %pI4 Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-10[SCSI] bnx2i: minor code cleanup and update driver versionAnil Veerabhadrappa2-4/+2
Removed duplicate function call and not-so-useful comment line Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-10[SCSI] bnx2i: Task management ABORT TASK fixesAnil Veerabhadrappa1-4/+13
Due to typo error driver was failing TMF Abort Task request when ctask->sc != NULL. Fixed code to fail TMF ABORT Task request only when ctask->sc == NULL. Clear age component (19 most significant bits) of reference ITT carried in iSCSI TMF PDU. Age component is internal to initiator side and only lower bits of ITT as defined by ISCSI_ITT_MASK is is sent on wire. Retrieve LUN directly from the ref_sc and update SQ wqe as per chip HSI (Host Software Interface) specification Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-10[SCSI] bnx2i: update CQ arming algorith for 5771x chipsetsAnil Veerabhadrappa3-8/+31
Only affects 5771x (10G chipsets) devices This is an optimized CQ arming algoritm which takes into account the number of outstanding tasks Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-10[SCSI] bnx2i: Adjust sq_size module parametr to power of 2 only if a non-zero value is specifiedAnil Veerabhadrappa1-1/+1
This issue was discovered during 10G iscsi testing Default value of 'sq_size' module parameter is '0' which means driver should use predefined SQ queue size when setting up iscsi connection. roundup_pow_of_two(0) results in '1' and forces driver to setup connections with send queue size of '1' and results in lower performance as well Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-10[SCSI] bnx2i: Add 5771E device support to bnx2i driverAnil Veerabhadrappa1-1/+5
Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-09Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivialLinus Torvalds1-1/+1
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits) tree-wide: fix misspelling of "definition" in comments reiserfs: fix misspelling of "journaled" doc: Fix a typo in slub.txt. inotify: remove superfluous return code check hdlc: spelling fix in find_pvc() comment doc: fix regulator docs cut-and-pasteism mtd: Fix comment in Kconfig doc: Fix IRQ chip docs tree-wide: fix assorted typos all over the place drivers/ata/libata-sff.c: comment spelling fixes fix typos/grammos in Documentation/edac.txt sysctl: add missing comments fs/debugfs/inode.c: fix comment typos sgivwfb: Make use of ARRAY_SIZE. sky2: fix sky2_link_down copy/paste comment error tree-wide: fix typos "couter" -> "counter" tree-wide: fix typos "offest" -> "offset" fix kerneldoc for set_irq_msi() spidev: fix double "of of" in comment comment typo fix: sybsystem -> subsystem ...
2009-12-04[SCSI] libiscsi: add warm target reset tmf supportMike Christie1-1/+1
This implements warm target reset tmf support for the scsi-ml target reset callback. Previously we would just drop the session in that callback. This patch will now try a target reset and if that fails drop the session. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] bnx2i: use common iscsi suspend queueMike Christie2-8/+1
This just has bnx2i use the iscsi_suspend_queue helper. The suspend works as follows: When ep_poll has succeeed iscsid will call conn_bind, the LLD will then call iscsi_conn_bind which will clear the suspend bit. When ep_disconnect is called (or if there is a conn error) we set the suspend bit. For the ep_disconnect case I added a helper in the previous kernel that will take the session lock to make sure iscsi_queuecommand/xmit_task is not running and it will set the suspend bit. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: Anil Veerabhadrappa <anilgv@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04tree-wide: fix some typos and punctuation in commentsThadeu Lima de Souza Cascardo1-1/+1
fix some typos and punctuation in comments Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-10-02[SCSI] libiscsi: iscsi_session_setup to allow for private spaceJayamohan Kallickal1-1/+1
This patch contains changes that allow iscsi_session_setup to allocate private space for LLD's Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com> Acked-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-02[SCSI] bnx2i: Fix context mapping issue for architectures with PAGE_SIZE != 4096Anil Veerabhadrappa2-1/+3
5706/5708/5709 devices allow driver/user to set page size. By default it is set to 4096. Current drivers do not program this register based on architecture type (e.g. x86 = 4K, IA64 = 16K) and by choice lets device use the defaults. So while mapping connection context memory (doorebll registers), driver has to match page size used by the device. Included change fixes the issue we uncovered during IA64 testing Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-09-21trivial: remove unnecessary semicolonsJoe Perches1-1/+1
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-08-22[SCSI] bnx2i : Fix "cid #n not valid" issueAnil Veerabhadrappa1-2/+1
When bnx2i_adapter_ready() fails, connection handle(cid) = 0 is wrongly freed because 'cid' is not yet allocated for the endpoint. Fix is to initialize bnx2i_ep->ep_iscsi_cid to '-1' in bnx2i_alloc_ep() and not in bnx2i_ep_connect() to avoid releasing invalid 'cid'. There is already a check in bnx2i_free_iscsi_cid() not to free invalid iscsi connection handle (-1) Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-08-22[SCSI] bnx2i : Fix command session number jump issue seen during cable pull testAnil Veerabhadrappa1-3/+0
Without the fix bnx2i would fail tt->xmit_task() when link is down and libiscsi would have already incremented session->cmdsn before calling bnx2i's xmit_task() entry point and will just return the command to SCSI-ML when xmit_task() fails. libiscsi does not retract the session->cmdsn as the command was never sent on wire. It is generally good idea for LLD, bnx2i to accept the scsi cmnd/nopout and let upper layer timeout and go though normal session recovery process. When link is down, unsolicited nopout will not be accepted by bnx2i and connection will never enter recovery state. This fix is required for MPIO to work corectly Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-08-22[SCSI] bnx2i: register given device with cnic if shost != NULL in ep_connect()Anil Veerabhadrappa2-4/+10
When using iface, bnx2i was unable to offload further connections after all active sessions are logged out. bnx2i will unregister the device from cnic when the last connection is torn down. Next call to ep_connect() will fail because the device is not registered. This issue is not seen if shost == NULL is passed to ep_connect() call because in that case bnx2i will registers all known devices with cnic before doing a route look-up. When shost != NULL, bnx2i knows the device on which to offload the connection and has to register this device before attempting to offload the connection Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-08-22[SCSI] bnx2i: convert bnx2i_dev_lock to mutexAnil Veerabhadrappa1-29/+25
convert bnx2i_dev_lock to type mutex from rwlock_t because cnic->register_device() can sleep for various reasons including memory allocation, waiting for ISCSI_INIT completion and while acquiring mutex lock, cnic_lock. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-08-22[SCSI] bnx2i: bug fixes in bnx2i_init_one to handle error conditionsAnil Veerabhadrappa1-12/+19
Fixed bnx2i_init_one() to properly handle return code of cnic->register_device() and propagate it back to the caller. No need to check for BNX2I_CNIC_REGISTERED, because unless the adapter is added to adapter_list it will not be registered in ep_connect context Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-08-22[SCSI] bnx2i: remove global variable bnx2i_reg_devicesAnil Veerabhadrappa1-19/+1
Removed bnx2i_reg_devices as this counter is not really used in a meaningful way Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-06-21cnic: add NETDEV_1000 and NETDEVICES to Kconfig selectRandy Dunlap1-0/+2
NETDEVICES + NETDEV_1000 need to be enabled so that kconfig will check those branches for selects and enforce "select UIO" under CNIC. Otherwise the build fails with: ERROR: "uio_unregister_device" [drivers/net/cnic.ko] undefined! ERROR: "uio_event_notify" [drivers/net/cnic.ko] undefined! ERROR: "__uio_register_device" [drivers/net/cnic.ko] undefined! Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-15[SCSI] cnic, bnx2i: Fix build failure when CONFIG_PCI is not set.Michael Chan1-0/+1
CNIC and BNX2I must depend on PCI. Dependencies do not get propagated through select. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-09[SCSI] bnx2i: Add bnx2i iSCSI driver.Michael Chan9-0/+7494
New iSCSI driver for Broadcom BNX2 devices. The driver interfaces with the CNIC driver to access the hardware. Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>