aboutsummaryrefslogtreecommitdiffstats
path: root/lib/is_single_threaded.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2010-05-16[SCSI] fcoe: move link speed checking into its own routineRobert Love1-13/+29
It doesn't make sense to update the link speed in the is_link_ok() routine. Move it to it's own routine and acquire the device speed when we're configuring the device initially as well as if there are any netdev events received. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] libfc: Remove extra pointer checkRobert Love1-2/+1
The fcf pointer is checked again after this verification making the first check redundant. Remote the first check. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] libfc: Remove unused fc_get_host_port_typeRobert Love2-12/+0
Remove this unused routine. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] fcoe: fixes wrong error exit in fcoe_createVasu Dev1-1/+1
fcoe_create exits using out_nodev label when module is not yet LIVE but this exit path unlocks the rtnl_lock though rtnl lock was not held in this case. So this patch replaces out_nodev with out_nomod to exit w/o unlocking rtnl_lock. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] libfc: set seq_id for incoming sequenceJoe Eykholt1-4/+6
After the recent patch "fixes unnecessary seq id jump" the SCST module fcst stopped working because multi-sequence write data wasn't finding the sequence after the first frame. Add back the setting of the seq_id when the first frame arrives. Also fix indentation on two lines. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] qla2xxx: Updates to ISP82xx support.Giridhar Malavali4-144/+111
1) Allow transition to NEED RESET state only from READY state for ISP82xx. 2) Avoid infinite ISP aborts when chip reset fails. 3) Code cleanup to remove some of the unused debug code. Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com> Signed-off-by: Santosh Vernekar <santosh.vernekar@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] qla2xxx: Optionally disable target reset.Giridhar Malavali2-1/+8
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] qla2xxx: ensure flash operation and host reset via sg_reset are mutually exclusiveLalit Chandivade2-1/+51
The problem occurring is a hw-race where there's an outstanding read-flash operation occurring while the chip is being reset (done via an sg_reset script). After the chip is paused, the read-flash operation never completes and the DPC thread, while trying to complete the reset, is never able to recover, as the HW appears to be hung... The fix is to wait for outstanding flash operation prior to doing a sg_reset -h. And to wait for reset to complete before any flash operations. Note, during the wait, if any of the operation (reset/flash) does not complete, failure is returned to the upper layer. The upper layer either need to fail or retry. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] qla2xxx: Silence bogus warning by gcc for wrap and did.Mike Waychison1-2/+2
The qla2xxx driver uses a port_id_t to mark the start of its enumerations. gcc is complaining that wrap.b24 may be used uninitialized, but this doesn't look to be possible. Silence it. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] qla2xxx: T10 DIF support added.Arun Easi10-12/+1053
Signed-off-by: Duane Grigsby <duane.grigsby@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] qla2xxx: Support for asynchronous TM and Marker IOCBs.Madhuranath Iyengar8-4/+366
Currently we can only issue the task management (TM) commands via the mailbox mechanism. This is a limitation, since only one mailbox command can be issued at a time. The purpose of this effort is to provide support for issuing and processing the respose to TM and Marker IOCBs asynchronously. Towards achieving this, the consolidated srb architecture that is currently used for BSG and IOCB/Logio commands has been enhanced and used. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] qla2xxx: Provide common framework for BSG and IOCB commands.Madhuranath Iyengar7-142/+162
Currently, BSG and IOCB/Logio commands have a different framework (srb structs). The purpose of this effort is to consolidate them into a generalized framework for these as well as other asynchronous operations in the future. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] qla2xxx: Cleanup FCP-command-status processing debug statements.Andrew Vasquez1-129/+63
Migrate to a consistent set of debug entries during status-IOCB handling: * group CS_TIMEOUT handling with CS_PORT_UNAVAILABLE and the like (more regrouping of common behaviour). * drop CS_DATA_OVERRUN handling as it now falls into the 'default' case (still returns DID_ERROR). * consolidate CS_RESET and CS_ABORTED handling, as we the only functional difference was a printk() (still returns DID_RESET). * dropped all the earlier inconsistent [qla_]printk()s sprinkled throught the needlessly large case-statement. Failure case I/Os are now logged with a 'standard' format: <command failure details> <command generic details> so, for example a dropped-frame is logged as: qla2xxx 0000:13:00.0: scsi(16:0:0) Dropped frame(s) detected (4000 of 4000 bytes). qla2xxx 0000:13:00.0: scsi(16:0:0) FCP command status: 0x15-0x18 (70018) \ oxid=78 ser=76 cdb=280000 len=4000 rsp_info=0 resid=0 fw_resid=4000 which should now convey all relevant information. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] qla2xxx: Limit mailbox command contention for ADISC requests.Andrew Vasquez6-28/+178
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] qla2xxx: Further generalization of SRB CTX infrastructure.Andrew Vasquez3-69/+65
Prepare CTX infrastructure for additional asynchronous executions, add generic done() operator, pull CMD definitions. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] qla2xxx: Add char device to increase driver use countHarish Zunjarrao2-1/+16
The driver should not be unloaded if any application is using it. To disallow driver unload, driver use count must be incremented. Application uses this char device as handle and increases driver use count to avoid possible driver unload. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] qla2xxx: Clear error status after uncorrectable non-fatal errors.Lalit Chandivade1-1/+2
Currently error status is cleared only after the uncorrectable fatal errors in the qla2xxx_pci_slot_reset. This fix is added to clear the error status in qla2xxx_pci_resume. This way for both fatal and non-fatal errors the error status gets cleared properly. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=572258 Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] qla2xxx: Display proper link state for disconnected ports.Andrew Vasquez1-1/+2
With qla2xxx using mid-layer async-scsi-scanning, the link state for disconnected port is displayed wrong. Additional check for cable presence is considered to display proper link state. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16[SCSI] qla2xxx: Check for ISP84xx before processing to get 84xx firmware version.Andrew Vasquez1-3/+5
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] a2091: Kill ugly DMA() macroGeert Uytterhoeven1-22/+26
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] a3000: Use shost_priv() and kill ugly HDATA() macroGeert Uytterhoeven1-25/+28
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] mvme147: Use shost_priv() and kill ugly HDATA() macroGeert Uytterhoeven1-6/+7
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] gvp11: Use shost_priv() and kill ugly HDATA() macroGeert Uytterhoeven1-47/+46
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] a2091: Use shost_priv() and kill ugly HDATA() macroGeert Uytterhoeven1-27/+29
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] a3000: ReindentationGeert Uytterhoeven2-163/+163
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] mvme147: ReindentationGeert Uytterhoeven2-83/+87
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] gvp11: ReindentationGeert Uytterhoeven2-297/+301
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] a2091: ReindentationGeert Uytterhoeven2-170/+171
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] wd33c93: Kill empty wd33c93_release()Geert Uytterhoeven6-15/+0
wd33c93_release() has been empty since ages, and sgiwd93.c no longer calls it since its conversion to a proper platform driver 2 years ago. Also remove the callers in the m68k wd33c93 shims. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] zfcp: Zero memory for gpn_ft and adisc requestsChristof Schmitt1-2/+2
With debug kernels, the memory allocated with kmem_cache_alloc might be initialized with the poison values 6b and a5. Use kmem_cache_zalloc instead of kmem_cache_alloc to get zeroed memory and not send invalid requests. Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] zfcp: Use status_read_buf_num provided by FCP channelChristof Schmitt5-3/+6
The FCP channel provides the number of status read buffers to issue. Use the provided number instead of the hardcoded number in zfcp. Reviewed-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] zfcp: Move sbal_get function to zfcp_qdio.cChristof Schmitt3-48/+58
Waiting for a free sbal is a operation on the qdio queue. Move the code implementing the wait to zfcp_qdio.c and rename the functions accordingly. Reviewed-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] zfcp: Move sbale handling to zfcp_qdio filesChristof Schmitt7-151/+191
Move the code accessing the qdio sbales and zfcp_qdio_req struct to the zfcp_qdio files and provide helper functions for accessing the qdio related parts. Reviewed-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] zfcp: Report scatter-gather limits to SCSI and block layerChristof Schmitt5-34/+19
Instead of dealing with large segments in the scatter-gather lists in zfcp_qdio.c, report the limits to the upper layers. With these limits in place, the code for mapping large data blocks to multiple sbales can be removed. Reviewed-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] Adding MAINTAINERS for qla4xxx iSCSI driver.Ravi Anand1-0/+8
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> 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-05-02[SCSI] cxgb3i: Fix error path for module initRoland Dreier1-1/+3
If cxgb3i_pdu_init() fails, then it appears that cxgb3i_iscsi_init() will not be cleaned up, leading to the iscsi transport being left registered. Fix this by adding a call to cxgb3i_iscsi_cleanup() on the error path. Signed-off-by: Roland Dreier <rolandd@cisco.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Cc: Karen Xie <kxie@chelsio.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] Unexport scsi/scsi.h from headers_installTom Rini1-1/+0
The scsi/scsi.h header is normally provided by the libc (and was not exported by the kernel since 2.6.24) and has been until it was re-exported with 2.6.31. The kernel version is not userspace clean and does not appear to provide anything useable in userland over the (e)glibc version. Signed-off-by: Tom Rini <tom_rini@mentor.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] pm8001: potential null dereference in pm8001_dev_gone_notify()Dan Carpenter1-1/+3
In the original code we dereferenced "pm8001_dev" before checking if it was null. This patch moves the dereference inside the condition. This was found by a static checker (smatch). I looked, but I couldn't tell if "pm8001_dev" dev was ever actually null. The approach in this patch seemed like the safest response. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] ibmvfc: Reduce error recovery timeoutBrian King2-1/+2
If a command times out resulting in EH getting invoked, we wait for the aborted commands to come back after sending the abort. Shorten the amount of time we wait for these responses, to ensure we don't get stuck in EH for several minutes. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] ibmvfc: Fix command completion handlingBrian King1-0/+6
Commands which are completed by the VIOS are placed on a CRQ in kernel memory for the ibmvfc driver to process. Each CRQ entry is 16 bytes. The ibmvfc driver reads the first 8 bytes to check if the entry is valid, then reads the next 8 bytes to get the handle, which is a pointer the completed command. This fixes an issue seen on Power 7 where the processor reordered the loads from memory, resulting in processing command completion with a stale handle. This could result in command timeouts, and also early completion of commands. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02[SCSI] hpsa: remove unneeded definesMike Miller2-23/+0
This patch removes unnecessary #define's from hpsa. The SCSI midlayer handles all this for us. Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-01[SCSI] fix sdev_rw_attr macro for scsi device sysfs entriesTomohiro Kusumi1-2/+2
This patch fixes sdev_rw_attr() macro for scsi device sysfs entries. It seems there is no such function snscanf in the current linux kernel, so it fails to compile scsi driver when someone try to add a new rw entry. This has been unfixed for a long time probably because current scsi device has no rw entries. # grep snscanf . -rn ./drivers/scsi/scsi_sysfs.c:489: snscanf (buf, 20, format_string, &sdev->field); \ Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>