aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-05-18[SCSI] Merge scsi-misc-2.6 into scsi-rc-fixes-2.6James Bottomley9-220/+756
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] qla4xxx: Update driver version to 5.02.00-k1Vikas Chaudhary1-2/+1
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] qla4xxx: added support for abort task management commandVikas Chaudhary6-9/+124
* Handles SCSI command aborts. * Serialization srb between error handler and command completion path. Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] qla4xxx: correct use of cmd->host_scribbleVikas Chaudhary3-9/+13
used cmd->host_scribble to store iocb command handle. Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] qla4xxx: do not retry login to CHAP auth failed targetsVikas Chaudhary3-43/+94
Per RFC 3720, Login Response Status Code 0x02 should not be retried. Condensed connection error checking code to a single routine, and added check for status class 0x02. Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] qla4xxx: Updated firmware ready timeout algorithmVikas Chaudhary1-9/+11
Updated firmware ready timeout algorithm to prevent long delays and use jiffies to time out instead of counter. Also use msleep_interruptible instead of msleep. Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] qla4xxx: Code Clean up - remove "marker_needed"Vikas Chaudhary1-2/+1
Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] qla4xxx: set device state as per Link UP and LINK DOWNVikas Chaudhary4-7/+70
Link Down -> Mark all devices missing Previously, the driver took no action on a Link Down, and waited for the I/O on a dead connection to timeout in the firmware before marking the DDB missing. Link Up -> Mark all devices online F/W will do auto login to all the devices only once. After that its the responsibility of the driver to relogin to devices whenever there is : * Any sort of connection failure or * KATO expires indicating target has logged out or * I/O times out etc. Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] qla4xxx: added IPv6 support.Vikas Chaudhary4-142/+445
Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-04-22scsi: fix operator precedence warningRandy Dunlap1-1/+1
Fix operator precedence warning (from sparse), which results in the data value always being 0: drivers/scsi/qla4xxx/ql4_mbx.c:470:66: warning: right shift by bigger than source value Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Ravi Anand <ravi.anand@qlogic.com> Cc: David C Somayajulu <david.somayajulu@qlogic.com> Cc: Karen Higgins <karen.higgins@qlogic.com> Cc: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo1-0/+1
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-02-17[SCSI] qla4xxx: fix compile warning due to invalid extHwConfigMike Christie1-8/+6
If the nvram is invalid qla4xxx tries to set Asuint32_t based on the card type. If the card type is not listed then Asuint32_t is going to be gargabe. This just fixes that if/elseif by adding a else to catch the case for new hardware that might not be listed yet. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-09-21trivial: fix typo "to to" in multiple filesAnand Gadiyar1-2/+2
Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-05[SCSI] qla4xxx: Removed residual from overrun debug printMike Christie1-4/+4
The residual variable is only valid for udnerrun so do not print it out for the overrun case. Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> [Mike Christie: Fix coding style issues in patch] Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-07-30[SCSI] qla4xxx: Remove hiwat code so scsi eh does not get escalated when we can make progressKaren Higgins3-85/+60
Removed unnecessary hiwat code to free up the number available IOCBs. Eliminates unnecessary eh_ escalations due to inability to obtain IOCB pkt for marker. v2. - Remove define not used anymore and fix req_q_coun accounting. Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> [michaelc: ported patch from qlogic.com driver to upstream] Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-07-30[SCSI] qla4xxx: Fix srb lookup in qla4xxx_eh_device_resetKaren Higgins1-3/+1
eh_device_reset may be called from scsi error handler or sg_reset, etc. When called from sg_reset, there will not be an associated srb. The driver should lookup the corresponding device handle given information from the supplied cmd structure and should not assume that there exists an srb. Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-07-30[SCSI] qla4xxx: Fix Driver Fault Recovery CompletionKaren Higgins1-10/+9
Fixed driver bug where adapter recovery did not complete if there were outstanding commands detected on that host adapter. Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-07-30[SCSI] qla4xxx: add timeout handlerMike Christie1-0/+17
Recently dm-multipath began calling blk_abort_queue. This causes all the commands/request running on the path to have the timeout function called. If a path does go down, and the LLD returns DID_*, dm-multpiath will eventually get this error and begin to call the cmd timeout handler. qla4xxx currently does not set a timed out handler and so the default one could return BLK_EH_NOT_HANDLED and end up firing the scsi eh and stopping IO to all paths on the host when only one path is affected. For software and offload iscsi we have a timed out handler already. This patch adds a driver specific one to qla4xxx because there are some ddb->state and session->state and command completion races that are better handled in the LLD. This also handles the problem where if the session is down, we do not need the scsi eh to run until the transport code has tried to reconnect us. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-07-30[SCSI] qla4xxx: Correct Extended Sense Data ErrorsKaren Higgins5-54/+122
Fixed sense data errors occurring above the first 32 bytes, as required by some third party applications. Sense data in the first 32 bytes has always been correct. Patch updated to use srb data variables instead of scsi command scratchpad data area, as scratchpad area is already used. Also, corrected debug print alignment bug in dump_buffer routine. Changed KERN_DEBUG to KERN_INFO in printk statements in this routine. Changed version number to 5.01.00-k9 Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> [michaelc: fixed checkpath.pl errors] Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-04-07dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)Yang Hongyang1-2/+2
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)Yang Hongyang1-2/+2
Replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-25[SCSI] qla4xxx: do not reuse session when connecting to different target portMike Christie2-2/+9
qla4xxx does not check the I_T nexus values correctly so it ends up creating one session to the target. If a portal should disappear or they should be reported in different order the driver will think it is already logged in when it could now be speaking to a different target portal or accessing it through a different initiator port (iscsi initiator port is not tied to hardware and is just the initiator name plus isid so you could end up with multiple ports through one host). This patch has the driver check the iscsi scsi port values when matching sessions (we do not check the initiator name because that is static). It results in a portal from each target portal group getting logged into instead of just one per target. In the future the firmware should hopefully send us notification of other sessions that are created to other portals within the same tpgt and the sessions should have different isids. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-01-06trivial: Fix misspelling of "firmware" in ql4_mbx.cNick Andrew1-1/+1
Fix misspelling of "firmware" in ql4_mbx.c It's spelled "firmware". Signed-off-by: Nick Andrew <nick@nick-andrew.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-31drivers: replace NIPQUAD()Harvey Harrison1-2/+1
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u can be replaced with %pI4 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-13[SCSI] libiscsi: Support drivers initiating session removalMike Christie1-1/+1
If the driver knows when hardware is removed like with cxgb3i, bnx2i, qla4xxx and iser then we will want to remove the sessions/devices that are bound to that device before removing the host. cxgb3i and in the future bnx2i will remove the host and that will remove all the sessions on the hba. iser can call iscsi_kill_session when it gets an event that indicates that a hca is removed. And when qla4xxx is hooked in to the lib (it is only hooked into the class right now) it can call iscsi remove host like the partial offload card drivers. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-10-13[SCSI] iscsi class, libiscsi and qla4xxx: convert to new transport host byte valuesMike Christie1-2/+2
This patch converts the iscsi drivers to the new host byte values. v2 Drop some conversions. Want to avoid conflicts with other patches. v1 initial patch. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-10-13[SCSI] qla4xxx: return SCSI_MLQUEUE_TARGET_BUSY when driver has detected session errorMike Christie1-1/+1
When qla4xxx begins recovery and the iscsi class is firing up to handle it, we need to retrn SCSI_MLQUEUE_TARGET_BUSY from the driver instead of host busy, because the session recovery only affects the one target. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: David C Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-10-09block: unify request timeout handlingJens Axboe1-2/+2
Right now SCSI and others do their own command timeout handling. Move those bits to the block layer. Instead of having a timer per command, we try to be a bit more clever and simply have one per-queue. This avoids the overhead of having to tear down and setup a timer for each command, so it will result in a lot less timer fiddling. Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-07-26[SCSI] qla4xxx: fix queue depth settingMike Christie1-1/+3
We want to set the queue depth to something reasonable - not the can_queue. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: David Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12[SCSI] iscsi: remove session/conn_data_size from iscsi_transportMike Christie1-4/+3
This removes the session and conn data_size fields from the iscsi_transport. Just pass in the value like with host allocation. This patch also makes it so the LLD iscsi_conn data is allocated with the iscsi_cls_conn. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-12[SCSI] iscsi: remove session and host binding in libiscsiMike Christie1-1/+0
bnx2i allocates a host per netdevice but will use libiscsi, so this unbinds the session from the host in that code. This will also be useful for the iser parent device dma settings fixes. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07[SCSI] qla4xxx: fix scsi command completion, lun reset and target reset codeDavid C Somayajulu5-53/+26
This patch contains the following: 1. when hba completion status is good, check for iscsi transport errors (underflow/overflow) prior to checking the scsi status 2. New firmware requires that one marker iocb be issued for each task management command. The patch issues marker iocb immediately following a LUN or Target reset. Signed-off-by: David C Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07[SCSI] qla4xxx: Add target reset functionalityMike Christie4-19/+105
This patch adds target reset functionalty. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: David Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-03-05[SCSI] qla4xxx: regression - add start scan calloutMike Christie1-12/+14
We are seeing EXIST errors from sysfs during device addition. We need a start scan callout so we do not start scanning sessions found during hba setup, before the async scsi scan code is ready. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: David C Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-03-05[SCSI] qla4xxx: fix host reset dpc raceMike Christie2-5/+10
The host reset callout could be starting to reset the hba at the same time the dpc thread is. This creates lots of problems because they both want to do wierd things with the firmware and interrupts, etc. This patch just has the host reset function fully shutdown the dpc thread before resetting the hba. This patch also moves the setting of the session online bit to fix a potential race with the dpc thread and iscsi recovery thread. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: David C Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-22[SCSI] qla4xxx: fix up residual handlingDavid Somayajulu1-2/+1
the check in the residual case has an incorrect test of scsi_status (the logic is reversed, it should be scsi_status != 0 instead of !scsi_status. Since we checked a few lines above that scsi_status was non-zero, just eliminate this test Signed-off-by: David C Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-07[SCSI] qla4xxx: add async scan supportMike Christie1-1/+3
qla4xxx has the old school startup/probe where it finds presetup sessions in its flash and then attempts to log into them before returning from the probe. This however, makes it very simple to add a iscsi class scan finished helper which the driver can use. In future patches Dave or I will rip apart the driver to make it more like qla2xxx, but for now this is a very simple two line patch which fixes the problem of trying to figure out when the initial sessions are done being scanned. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: David Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-07[SCSI] qla4xxx: fix recovery timer and session unblock raceMike Christie1-8/+11
If qla4xxx is resetting up a session and the recovery timer fires we do not want to just set it to dead, because the dpc thread could have just set it to online and is in the middle of resetting it up. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: David Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-07[SCSI] qla4xxx: use iscsi class session state check readyMike Christie1-0/+12
This has qla4xxx use the iscsi class's check ready function in the queue command function, so all iscsi drivers return the same error value for common problems. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: David Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-07[SCSI] qla4xxx: directly call iscsi recovery functionsMike Christie2-36/+5
Qla4xxx can just call the iscsi recovery functions directly. There is no need for userspace to do this for qla4xxx, because we do not use the mutex to iterate over devices anymore and iscsi_block /unblock_session can be called from interrupt context or the dpc thread. And having userspace do this just creates uneeded headaches for qla4xxx root situations where the session may experience problems. For example during the kernel shutdown the scsi layer wants to send sync caches, but at this time userspace is not up (iscsid is not running), so we cannot recover from the problem. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: David Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-03drivers/scsi/: Spelling fixesJoe Perches2-2/+2
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Acked-by: James Smart <james.smart@emulex.com> Acked-by: Darrick J. Wong <djwong@us.ibm.com> Acked-by: David Somayajulu <david.somayajulu@qlogic.com> Acked-by: Mark Salyzyn <mark_salyzyn@adaptec.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-01-30[SCSI] remove use_sg_chainingJames Bottomley1-1/+0
With the sg table code, every SCSI driver is now either chain capable or broken (or has sg_tablesize set so chaining is never activated), so there's no need to have a check in the host template. Also tidy up the code by moving the scatterlist size defines into the SCSI includes and permit the last entry of the scatterlist pools not to be a power of two. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-28[ETH]: Combine format_addr() with print_mac().Michael Chan1-13/+1
print_mac() used many most net drivers and format_addr() used by net-sysfs.c are very similar and they can be intergrated. format_addr() is also identically redefined in the qla4xxx iscsi driver. Export a new function sysfs_format_mac() to be used by net-sysfs, qla4xxx and others in the future. Both print_mac() and sysfs_format_mac() call _format_mac_addr() to do the formatting. Changed print_mac() to use unsigned char * to be consistent with net_device struct's dev_addr. Added buffer length overrun checking as suggested by Joe Perches. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-23[SCSI] replace sizeof sense_buffer with SCSI_SENSE_BUFFERSIZEFUJITA Tomonori1-7/+4
This replaces sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE in several LLDs. It's a preparation for the future changes to remove sense_buffer array in scsi_cmnd structure. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-11[SCSI] libiscsi: fix shutdownMike Christie2-6/+5
We were using the device delete sysfs file to remove each device then logout. Now in 2.6.21 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. Before .21, that approach had other problems, so this patch fixes the shutdown code so that we remove the target and unbind the session before logging out and shut down the session Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2007-10-19Fix misspellings of "system", "controller", "interrupt" and "necessary".Robert P. J. Day1-1/+1
Fix the various misspellings of "system", controller", "interrupt" and "[un]necessary". Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19Change struct marker usersMathieu Desnoyers2-2/+2
Prior to use struct marker in the linux kernel markers, we need to clean two drivers which use this structure name. Change bonding driver types : - struct marker to struct bond_marker. - marker_t to bond_marker_t. - marker_header to bond_marker_header. - marker_header_t to bond_marker_header_t. Change qla4xxx struct marker_entry usage : - Change struct marker_entry for struct qla4_marker_entry. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Chad Tindel <ctindel@users.sourceforge.net> Cc: Jay Vosburgh <fubar@us.ibm.com> Cc: David Somayajulu <david.somayajulu@qlogic.com> Cc: James Bottomley <James.Bottomley@SteelEye.com> Cc: Ravi Anand <ravi.anand@qlogic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18Add missing newlines to some uses of dev_<level> messagesJoe Perches1-1/+1
Found these while looking at printk uses. Add missing newlines to dev_<level> uses Add missing KERN_<level> prefixes to multiline dev_<level>s Fixed a wierd->weird spelling typo Added a newline to a printk Signed-off-by: Joe Perches <joe@perches.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Cc: Roland Dreier <rolandd@cisco.com> Cc: Tilman Schmidt <tilman@imap.cc> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Greg KH <greg@kroah.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Cc: James Smart <James.Smart@Emulex.Com> Cc: Andrew Vasquez <andrew.vasquez@qlogic.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16[SCSI] add use_sg_chaining option to scsi_host_templateFUJITA Tomonori1-0/+1
This option is true if a low-level driver can support sg chaining. This will be removed eventually when all the drivers are converted to support sg chaining. q->max_phys_segments is set to SCSI_MAX_SG_SEGMENTS if false. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-07-20mm: Remove slab destructors from kmem_cache_create().Paul Mundt1-1/+1
Slab destructors were no longer supported after Christoph's c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been BUGs for both slab and slub, and slob never supported them either. This rips out support for the dtor pointer from kmem_cache_create() completely and fixes up every single callsite in the kernel (there were about 224, not including the slab allocator definitions themselves, or the documentation references). Signed-off-by: Paul Mundt <lethal@linux-sh.org>