firefly-linux-kernel-4.4.55.git
14 years ago[SCSI] fcoe: move link speed checking into its own routine
Robert Love [Fri, 7 May 2010 22:18:35 +0000 (15:18 -0700)]
[SCSI] fcoe: move link speed checking into its own routine

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>
14 years ago[SCSI] libfc: Remove extra pointer check
Robert Love [Fri, 7 May 2010 22:18:30 +0000 (15:18 -0700)]
[SCSI] libfc: Remove extra pointer check

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>
14 years ago[SCSI] libfc: Remove unused fc_get_host_port_type
Robert Love [Fri, 7 May 2010 22:18:24 +0000 (15:18 -0700)]
[SCSI] libfc: Remove unused fc_get_host_port_type

Remove this unused routine.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] fcoe: fixes wrong error exit in fcoe_create
Vasu Dev [Fri, 7 May 2010 22:18:19 +0000 (15:18 -0700)]
[SCSI] fcoe: fixes wrong error exit in fcoe_create

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>
14 years ago[SCSI] libfc: set seq_id for incoming sequence
Joe Eykholt [Fri, 7 May 2010 22:18:13 +0000 (15:18 -0700)]
[SCSI] libfc: set seq_id for incoming sequence

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>
14 years ago[SCSI] qla2xxx: Updates to ISP82xx support.
Giridhar Malavali [Tue, 4 May 2010 22:01:34 +0000 (15:01 -0700)]
[SCSI] qla2xxx: Updates to ISP82xx support.

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>
14 years ago[SCSI] qla2xxx: Optionally disable target reset.
Giridhar Malavali [Tue, 4 May 2010 22:01:33 +0000 (15:01 -0700)]
[SCSI] qla2xxx: Optionally disable target reset.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: ensure flash operation and host reset via sg_reset are mutually exclusive
Lalit Chandivade [Tue, 4 May 2010 22:01:32 +0000 (15:01 -0700)]
[SCSI] qla2xxx: ensure flash operation and host reset via sg_reset are mutually exclusive

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>
14 years ago[SCSI] qla2xxx: Silence bogus warning by gcc for wrap and did.
Mike Waychison [Tue, 4 May 2010 22:01:31 +0000 (15:01 -0700)]
[SCSI] qla2xxx: Silence bogus warning by gcc for wrap and did.

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>
14 years ago[SCSI] qla2xxx: T10 DIF support added.
Arun Easi [Tue, 4 May 2010 22:01:30 +0000 (15:01 -0700)]
[SCSI] qla2xxx: T10 DIF support added.

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>
14 years ago[SCSI] qla2xxx: Support for asynchronous TM and Marker IOCBs.
Madhuranath Iyengar [Tue, 4 May 2010 22:01:29 +0000 (15:01 -0700)]
[SCSI] qla2xxx: Support for asynchronous TM and Marker IOCBs.

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>
14 years ago[SCSI] qla2xxx: Provide common framework for BSG and IOCB commands.
Madhuranath Iyengar [Tue, 4 May 2010 22:01:28 +0000 (15:01 -0700)]
[SCSI] qla2xxx: Provide common framework for BSG and IOCB commands.

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>
14 years ago[SCSI] qla2xxx: Cleanup FCP-command-status processing debug statements.
Andrew Vasquez [Tue, 4 May 2010 22:01:27 +0000 (15:01 -0700)]
[SCSI] qla2xxx: Cleanup FCP-command-status processing debug statements.

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>
14 years ago[SCSI] qla2xxx: Limit mailbox command contention for ADISC requests.
Andrew Vasquez [Tue, 4 May 2010 22:01:26 +0000 (15:01 -0700)]
[SCSI] qla2xxx: Limit mailbox command contention for ADISC requests.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Further generalization of SRB CTX infrastructure.
Andrew Vasquez [Tue, 4 May 2010 22:01:25 +0000 (15:01 -0700)]
[SCSI] qla2xxx: Further generalization of SRB CTX infrastructure.

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>
14 years ago[SCSI] qla2xxx: Add char device to increase driver use count
Harish Zunjarrao [Tue, 4 May 2010 22:01:24 +0000 (15:01 -0700)]
[SCSI] qla2xxx: Add char device to increase driver use count

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>
14 years ago[SCSI] qla2xxx: Clear error status after uncorrectable non-fatal errors.
Lalit Chandivade [Tue, 4 May 2010 22:01:23 +0000 (15:01 -0700)]
[SCSI] qla2xxx: Clear error status after uncorrectable non-fatal errors.

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>
14 years ago[SCSI] qla2xxx: Display proper link state for disconnected ports.
Andrew Vasquez [Tue, 4 May 2010 22:01:22 +0000 (15:01 -0700)]
[SCSI] qla2xxx: Display proper link state for disconnected ports.

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>
14 years ago[SCSI] qla2xxx: Check for ISP84xx before processing to get 84xx firmware version.
Andrew Vasquez [Tue, 4 May 2010 22:01:21 +0000 (15:01 -0700)]
[SCSI] qla2xxx: Check for ISP84xx before processing to get 84xx firmware version.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] a2091: Kill ugly DMA() macro
Geert Uytterhoeven [Sun, 4 Apr 2010 09:00:40 +0000 (11:00 +0200)]
[SCSI] a2091: Kill ugly DMA() macro

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] a3000: Use shost_priv() and kill ugly HDATA() macro
Geert Uytterhoeven [Sun, 4 Apr 2010 09:00:39 +0000 (11:00 +0200)]
[SCSI] a3000: Use shost_priv() and kill ugly HDATA() macro

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] mvme147: Use shost_priv() and kill ugly HDATA() macro
Geert Uytterhoeven [Sun, 4 Apr 2010 09:00:38 +0000 (11:00 +0200)]
[SCSI] mvme147: Use shost_priv() and kill ugly HDATA() macro

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] gvp11: Use shost_priv() and kill ugly HDATA() macro
Geert Uytterhoeven [Sun, 4 Apr 2010 09:00:37 +0000 (11:00 +0200)]
[SCSI] gvp11: Use shost_priv() and kill ugly HDATA() macro

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] a2091: Use shost_priv() and kill ugly HDATA() macro
Geert Uytterhoeven [Sun, 4 Apr 2010 09:00:36 +0000 (11:00 +0200)]
[SCSI] a2091: Use shost_priv() and kill ugly HDATA() macro

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] a3000: Reindentation
Geert Uytterhoeven [Sun, 4 Apr 2010 09:00:35 +0000 (11:00 +0200)]
[SCSI] a3000: Reindentation

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] mvme147: Reindentation
Geert Uytterhoeven [Sun, 4 Apr 2010 09:00:34 +0000 (11:00 +0200)]
[SCSI] mvme147: Reindentation

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] gvp11: Reindentation
Geert Uytterhoeven [Sun, 4 Apr 2010 09:00:33 +0000 (11:00 +0200)]
[SCSI] gvp11: Reindentation

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] a2091: Reindentation
Geert Uytterhoeven [Sun, 4 Apr 2010 09:00:32 +0000 (11:00 +0200)]
[SCSI] a2091: Reindentation

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] wd33c93: Kill empty wd33c93_release()
Geert Uytterhoeven [Sun, 4 Apr 2010 09:00:31 +0000 (11:00 +0200)]
[SCSI] wd33c93: Kill empty wd33c93_release()

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>
14 years ago[SCSI] zfcp: Zero memory for gpn_ft and adisc requests
Christof Schmitt [Fri, 30 Apr 2010 16:09:37 +0000 (18:09 +0200)]
[SCSI] zfcp: Zero memory for gpn_ft and adisc requests

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>
14 years ago[SCSI] zfcp: Use status_read_buf_num provided by FCP channel
Christof Schmitt [Fri, 30 Apr 2010 16:09:36 +0000 (18:09 +0200)]
[SCSI] zfcp: Use status_read_buf_num provided by FCP channel

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>
14 years ago[SCSI] zfcp: Move sbal_get function to zfcp_qdio.c
Christof Schmitt [Fri, 30 Apr 2010 16:09:35 +0000 (18:09 +0200)]
[SCSI] zfcp: Move sbal_get function to zfcp_qdio.c

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>
14 years ago[SCSI] zfcp: Move sbale handling to zfcp_qdio files
Christof Schmitt [Fri, 30 Apr 2010 16:09:34 +0000 (18:09 +0200)]
[SCSI] zfcp: Move sbale handling to zfcp_qdio files

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>
14 years ago[SCSI] zfcp: Report scatter-gather limits to SCSI and block layer
Christof Schmitt [Fri, 30 Apr 2010 16:09:33 +0000 (18:09 +0200)]
[SCSI] zfcp: Report scatter-gather limits to SCSI and block layer

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>
14 years ago[SCSI] Adding MAINTAINERS for qla4xxx iSCSI driver.
Ravi Anand [Wed, 28 Apr 2010 06:15:49 +0000 (11:45 +0530)]
[SCSI] Adding MAINTAINERS for qla4xxx iSCSI driver.

Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla4xxx: Update driver version to 5.02.00-k1
Vikas Chaudhary [Wed, 28 Apr 2010 06:15:06 +0000 (11:45 +0530)]
[SCSI] qla4xxx: Update driver version to 5.02.00-k1

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>
14 years ago[SCSI] qla4xxx: added support for abort task management command
Vikas Chaudhary [Wed, 28 Apr 2010 06:12:24 +0000 (11:42 +0530)]
[SCSI] qla4xxx: added support for abort task management command

* 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>
14 years ago[SCSI] qla4xxx: correct use of cmd->host_scribble
Vikas Chaudhary [Wed, 28 Apr 2010 06:11:59 +0000 (11:41 +0530)]
[SCSI] qla4xxx: correct use of cmd->host_scribble

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>
14 years ago[SCSI] qla4xxx: do not retry login to CHAP auth failed targets
Vikas Chaudhary [Wed, 28 Apr 2010 06:11:21 +0000 (11:41 +0530)]
[SCSI] qla4xxx: do not retry login to CHAP auth failed targets

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>
14 years ago[SCSI] qla4xxx: Updated firmware ready timeout algorithm
Vikas Chaudhary [Wed, 28 Apr 2010 06:10:37 +0000 (11:40 +0530)]
[SCSI] qla4xxx: Updated firmware ready timeout algorithm

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>
14 years ago[SCSI] qla4xxx: Code Clean up - remove "marker_needed"
Vikas Chaudhary [Wed, 28 Apr 2010 06:09:31 +0000 (11:39 +0530)]
[SCSI] qla4xxx: Code Clean up - remove "marker_needed"

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>
14 years ago[SCSI] qla4xxx: set device state as per Link UP and LINK DOWN
Vikas Chaudhary [Wed, 28 Apr 2010 06:08:11 +0000 (11:38 +0530)]
[SCSI] qla4xxx: set device state as per Link UP and LINK DOWN

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>
14 years ago[SCSI] qla4xxx: added IPv6 support.
Vikas Chaudhary [Wed, 28 Apr 2010 06:07:07 +0000 (11:37 +0530)]
[SCSI] qla4xxx: added IPv6 support.

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>
14 years ago[SCSI] cxgb3i: Fix error path for module init
Roland Dreier [Wed, 28 Apr 2010 05:39:22 +0000 (22:39 -0700)]
[SCSI] cxgb3i: Fix error path for module init

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>
14 years ago[SCSI] Unexport scsi/scsi.h from headers_install
Tom Rini [Tue, 27 Apr 2010 21:11:47 +0000 (14:11 -0700)]
[SCSI] Unexport scsi/scsi.h from headers_install

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>
14 years ago[SCSI] pm8001: potential null dereference in pm8001_dev_gone_notify()
Dan Carpenter [Fri, 23 Apr 2010 12:01:04 +0000 (14:01 +0200)]
[SCSI] pm8001: potential null dereference in pm8001_dev_gone_notify()

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>
14 years ago[SCSI] ibmvfc: Reduce error recovery timeout
Brian King [Tue, 20 Apr 2010 19:21:35 +0000 (14:21 -0500)]
[SCSI] ibmvfc: Reduce error recovery timeout

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>
14 years ago[SCSI] ibmvfc: Fix command completion handling
Brian King [Tue, 20 Apr 2010 19:21:33 +0000 (14:21 -0500)]
[SCSI] ibmvfc: Fix command completion handling

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>
14 years ago[SCSI] hpsa: remove unneeded defines
Mike Miller [Fri, 16 Apr 2010 18:28:41 +0000 (13:28 -0500)]
[SCSI] hpsa: remove unneeded defines

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>
14 years ago[SCSI] fix sdev_rw_attr macro for scsi device sysfs entries
Tomohiro Kusumi [Wed, 14 Apr 2010 06:15:14 +0000 (15:15 +0900)]
[SCSI] fix sdev_rw_attr macro for scsi device sysfs entries

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>
14 years ago[SCSI] bfa: fix compilation warning in powerpc
Jing Huang [Tue, 13 Apr 2010 19:22:29 +0000 (12:22 -0700)]
[SCSI] bfa: fix compilation warning in powerpc

Fix the compilation warning in powerpc. The same change also fixes endian
issue we found in powerpc test. This patch has been tested in x86 and
powerpc platform. it is created using scsi-misc-2.6.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Add ISP82XX support.
Giridhar Malavali [Tue, 13 Apr 2010 00:59:55 +0000 (17:59 -0700)]
[SCSI] qla2xxx: Add ISP82XX support.

Enhanced the driver to support new FCoE host bus adapter.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] scsi_trace: Enhance SCSI command tracing
Martin K. Petersen [Tue, 23 Mar 2010 05:16:57 +0000 (01:16 -0400)]
[SCSI] scsi_trace: Enhance SCSI command tracing

Various SCSI trace enhancements:

 - Display data and protection information scatterlist lengths in the
   trace output

 - Add support for VERIFY and WRITE SAME commands and decode the UNMAP
   bit if applicable

 - Add decoding of the PROTECT field for READ/VERIFY/WRITE/WRITE SAME
   commands as well as the EXPECTED INITIAL REFERENCE TAG field for
   their 32-byte variants

 - Decode READ CAPACITY(16), GET LBA STATUS, and UNMAP

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] add scsi trace core functions and put trace points
Kei Tokunaga [Thu, 1 Apr 2010 11:41:40 +0000 (20:41 +0900)]
[SCSI] add scsi trace core functions and put trace points

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com>
Signed-off-by: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] ftrace: add __print_hex()
Kei Tokunaga [Thu, 1 Apr 2010 11:40:58 +0000 (20:40 +0900)]
[SCSI] ftrace: add __print_hex()

__print_hex() prints values in an array in hex (w/o '0x') (space separated)
EX) 92 33 32 f3 ee 4d

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com>
Signed-off-by: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] Add missing scsi command definitions
Martin K. Petersen [Tue, 23 Mar 2010 05:13:28 +0000 (01:13 -0400)]
[SCSI] Add missing scsi command definitions

Add definitions for VERIFY(12) and VERIFY(32).

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] scsi_debug: Block Limits VPD page fixes
Martin K. Petersen [Tue, 23 Mar 2010 05:12:27 +0000 (01:12 -0400)]
[SCSI] scsi_debug: Block Limits VPD page fixes

Add a few clarifying comments in the B0 page function and allow the
optimal transfer length field to be specified on the command line using
opt_blks=N.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] mvsas: fix hot plug handling and IO issues
Srinivas [Mon, 15 Feb 2010 06:00:00 +0000 (00:00 -0600)]
[SCSI] mvsas: fix hot plug handling and IO issues

This patch adds a bunch of fixes

1. Reduce sg table size to 64 (SG_MX) instead of default SG_ALL
2. clear task lists on phy down events
3. release all tasks on port deformation
4. release current task for device gone notification
5. Add sata abort handing
6. Add 10ms delay to each port reset (currently done serially and with
   interrupts disabled)

[jejb: whitespace fixes and clean ups plus added description
       added dummy 94xx_clear_srs_irq function just to prevent the
       mismatch in the mvs_dispatch structure killing 94xx cards]
Signed-off-by: Srinivas <satyasrinivasp@hcl.in>
Cc: Andy Yan <ayan@marvell.com>
Cc: qswang@marvell.com
Cc: jfeng@marvell.com
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] iscsi_tcp: Remove unused field iscsi_conn from struct iscsi_sw_tcp_conn
Avi Kaplan [Sat, 10 Apr 2010 03:07:39 +0000 (22:07 -0500)]
[SCSI] iscsi_tcp: Remove unused field iscsi_conn from struct iscsi_sw_tcp_conn

iscsi_conn is not used so remove it from iscsi_sw_tcp_conn.

Signed-off-by: Avi Kaplan <savik751@gmail.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] iscsi_tcp: Change iscsi_sw_tcp_conn_restore_callbacks arguments
Avi Kaplan [Sat, 10 Apr 2010 03:07:38 +0000 (22:07 -0500)]
[SCSI] iscsi_tcp: Change iscsi_sw_tcp_conn_restore_callbacks arguments

This patch changes the arguments to iscsi_sw_tcp_conn_restore_callbacks,
so that it works like the function to set the callbacks and because
in upcoming patches we need a iscsi_conn.

Signed-off-by: Avi Kaplan <savik751@gmail.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] scsi_dh_emc: request flag cleanup
Mike Christie [Sat, 10 Apr 2010 03:07:37 +0000 (22:07 -0500)]
[SCSI] scsi_dh_emc: request flag cleanup

blk_get_request sets the cmd_flags, so we should not and do not
need to set them. If we did set them to a different value then
it can cause a oops in the elevator code.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] iscsi_tcp: change & to &&
Dan Carpenter [Sat, 10 Apr 2010 03:07:36 +0000 (22:07 -0500)]
[SCSI] iscsi_tcp: change & to &&

This change is basically a clean up.

datadgst_en is an int which comes from the user.  I didn't see anything
limiting it to 1 and 0 although obviously that's what it's supposed to
be.  If the user passed in 2 this test would fail.

This same if condition is repeated in another function and it uses &&
there.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] libfc, fcoe: normalize format specifies for world wide names
Chris Leech [Fri, 9 Apr 2010 21:23:16 +0000 (14:23 -0700)]
[SCSI] libfc, fcoe: normalize format specifies for world wide names

Print all world wide node names (node, port and fabric) with the same
format specifier of "%16.16llx".  That makes sure they all print as a
16 character hex string, with lower case letters, no 0x prefix, and
without stripping off any leading 0s.

Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] libfc: set both precision and field with when printing FC IDs
Chris Leech [Fri, 9 Apr 2010 21:23:10 +0000 (14:23 -0700)]
[SCSI] libfc: set both precision and field with when printing FC IDs

Most of the prints of fabric IDs were specified as %6x, which will not
print any leading 0s.  It's nice to see leading 0s for identifiers
like this, which are a fixed length.  This patch sets the precision
modifier as well, making the specifier %6.6x, which forces the
printing of leading 0s.

Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] libfc: bug in erroring out upon FCP_RSP_LEN_VAL in fc_fcp_resp
Yi Zou [Fri, 9 Apr 2010 21:23:05 +0000 (14:23 -0700)]
[SCSI] libfc: bug in erroring out upon FCP_RSP_LEN_VAL in fc_fcp_resp

fc_fcp_resp is assuming when FCP_SNS_LEN_VAL is set, the FCP_RSP_LEN_VAL
is not, which is not true. This leads to not copying the sense data and
error out a valid FCP_RSP.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] fcoe, fnic, libfc: increased CDB size to 16 bytes for fcoe.
Vasu Dev [Fri, 9 Apr 2010 21:22:59 +0000 (14:22 -0700)]
[SCSI] fcoe, fnic, libfc: increased CDB size to 16 bytes for fcoe.

No reason to restrict CDB size to 12 bytes in fcoe, so
increased to 16 so that 16 bytes SCSI CDB doesn't fail.

Uses common define to set max_cmd_len for fcoe and fnic,
fnic is already setting max_cmd_len to 16.

sg_readcap -l fails without this fix.

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>
14 years ago[SCSI] fcoe: removes unused shost in fcoe_shost_config
Vasu Dev [Fri, 9 Apr 2010 21:22:54 +0000 (14:22 -0700)]
[SCSI] fcoe: removes unused shost in fcoe_shost_config

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>
14 years ago[SCSI] fnic: Change fnic_flush_tx() to flush tx instead of rx queue
Brian Uchino [Fri, 9 Apr 2010 21:22:49 +0000 (14:22 -0700)]
[SCSI] fnic: Change fnic_flush_tx() to flush tx instead of rx queue

fnic_flush_tx() is used to send frames held while fabric login
is in progress.  The frames are held in tx_queue, but
fnic_flush_tx() was incorrectly flushing from recv_queue which
is used for received frames.

Signed-off-by: Brian Uchino <buchino@cisco.com>
Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] fnic: Update version to 1.4.0.145
Brian Uchino [Fri, 9 Apr 2010 21:22:44 +0000 (14:22 -0700)]
[SCSI] fnic: Update version to 1.4.0.145

New fnic version to mark inclusion of tx_flush bugfix.

Signed-off-by: Brian Uchino <buchino@cisco.com>
Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] libfc: fix hton24 macro to take expressions as args
Joe Eykholt [Fri, 9 Apr 2010 21:22:39 +0000 (14:22 -0700)]
[SCSI] libfc: fix hton24 macro to take expressions as args

hton24(p + 3, value) would fail to compile because
p + 3[0] is not a valid expression.

Went ahead and converted hton24 and ntoh24 to inline
functions, which is better because the parameters
are evalutated only once.

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>
14 years ago[SCSI] libfc: remove unneeded variables in fc_exch_recv_req()
Joe Eykholt [Fri, 9 Apr 2010 21:22:33 +0000 (14:22 -0700)]
[SCSI] libfc: remove unneeded variables in fc_exch_recv_req()

fc_exch_recv_req has variables eof, sof, and f_ctl,
which are set but never used.  Delete them.

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>
14 years ago[SCSI] fcoe: check netif operstate instead of IFF_UP & link state
Chris Leech [Fri, 9 Apr 2010 21:22:28 +0000 (14:22 -0700)]
[SCSI] fcoe: check netif operstate instead of IFF_UP & link state

Allow for dormant states while link configuration completes.
In the default link mode, this is equivalent to the old check.

Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] fcoe: reset FIP ctlr link state on disable/enable
Chris Leech [Fri, 9 Apr 2010 21:22:23 +0000 (14:22 -0700)]
[SCSI] fcoe: reset FIP ctlr link state on disable/enable

The FIP controler state wasn't being reset on a disable.
A disable/enable sequence should be treated as a link event.
Otherwise, when using disable to mask a time when the link
is up but unusable, FCF discovery would attempt to continue
and login would jump directly to the non-FIP fallback on
enable.

Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] libfcoe: Don't fill MAC desc in FLOGI if FIP negotiated FPMA
Robert Love [Fri, 9 Apr 2010 21:22:17 +0000 (14:22 -0700)]
[SCSI] libfcoe: Don't fill MAC desc in FLOGI if FIP negotiated FPMA

FPMA indicates that the Fabric will provide the host's
N_Port's MAC address. When sending a FLOGI/FDISC frame
and FPMA was negotiated through FIP discovery we still
need to provide the MAC descriptor, as per the
specification, but the MAC should be zero'd out since
the FCF will be providing it in the FLOGI/FDISC ACC.

In FC-BB-5 section 7.8.7.4.2 (Fabric login) it states:

The MAC address field in the MAC address descriptor of a FIP FLOGI
Request operation or a FIP NPIV FDISC Request operation shall contain:
a) the proposed MAC address to use as VN_Port MAC address if the ENode
   is requesting to use SPMA (see table 27);
b) all zeroes to indicate no MAC address is proposed if the ENode is
   requesting to use FPMA (see table 27); or
c) the proposed MAC address to use as VN_Port MAC address if the ENode
   supports both SPMA and FPMA and leaves the decision of which
   addressing scheme to use to the FCF (i.e., if both the FP and SP
   bits are set to one, see table 27).

This patch fixes case B.

This patch also adds debug statements to illustrate
whether a FPMA or SPMA MAC is added to a FLOGI/FDISC
frame.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] mpt2sas: Bump version 05.100.00.02
Kashyap, Desai [Thu, 8 Apr 2010 12:25:52 +0000 (17:55 +0530)]
[SCSI] mpt2sas: Bump version 05.100.00.02

Upgrade version to 05.100.00.02

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] mpt2sas: Before removing sas_device search device in list for _scsih_sas_devic...
Kashyap, Desai [Thu, 8 Apr 2010 12:25:22 +0000 (17:55 +0530)]
[SCSI] mpt2sas: Before removing sas_device search device in list for _scsih_sas_device_remove

Fix a oops in _scsih_sas_device_remove.  The driver was attempting to
delete a object from the sas_device link list when the object was not
present.

Added sanity check for sas_device NULL dereference.
before deleting sas_device now driver will search device in list then
only it will follow device removal.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] mpt2sas: Reworked scmd->result priority for _scsih_qcmd.
Kashyap, Desai [Thu, 8 Apr 2010 12:24:32 +0000 (17:54 +0530)]
[SCSI] mpt2sas: Reworked scmd->result priority for _scsih_qcmd.

we added support to set the deleted flag prior to device scan,
then clear the flag for responding devices, leaving the deleted flag only
set for missing devices.  The problem is for internal generated host resets,
IO queues are not blocked at scsi mid layer level.  IO will be continued
sent to driver, and driver  will return SCSI_MLQUEUE_HOST_BUSY.  The problem
is the driver checks for the deleted flag before it checks for the
controller being in reset, so there is a window where the driver would be
returning DID_NO_CONNECT for responding devices.  This occurs during  the
time between calling  _scsih_prep_device_scan, and
_scsih_mark_responding_sas_device & _scsih_mark_responding_raid_device.

Fix the queuecommand entry point so ioc->shost_recovery flag sanity check is
given higher presidence then the device "deleted flag" check.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.12: Update Driver version to 8.3.12
James Smart [Tue, 6 Apr 2010 19:07:03 +0000 (15:07 -0400)]
[SCSI] lpfc 8.3.12: Update Driver version to 8.3.12

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.12: Fix discovery issues
James Smart [Tue, 6 Apr 2010 19:06:30 +0000 (15:06 -0400)]
[SCSI] lpfc 8.3.12: Fix discovery issues

- Add code to prevent unreg_vpi mailbox command from failing.
- Add code to reset the HBA if unreg_vpi mailbox fails with busy status.
- Remove code that was clearing the nlp_type stored during rport discovery.

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.12: BSG Fixes and enhancements
James Smart [Tue, 6 Apr 2010 19:05:28 +0000 (15:05 -0400)]
[SCSI] lpfc 8.3.12: BSG Fixes and enhancements

- Add memcpy to mailbox completion to transfer reply correctly.
- Add support for BSG mailbox commands (dump, update_cfg, and
   event_log_status).
- Add warning message and refuse mailbox command while mgmt is blocked.
- Add checks for memory allocation failure.
- Add check for sli4 dump zero BDE size.
- Only copy data if mailbox commands succeed.
- Add support for Read Event Log mailbox command.

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.12: Critical fixes
James Smart [Tue, 6 Apr 2010 19:04:33 +0000 (15:04 -0400)]
[SCSI] lpfc 8.3.12: Critical fixes

- Move the code to increase the sg seg count for LP21000 adapters.
- Check pcmd on command completion before dereferencing it.
- Clear queue memory when creating firmware queues to prevent stale entries.
- Replace the use of PAGE_SIZE in many areas that assumed it was always 4k.
- Add an else clause to a conditional that needed to unlock the hba_lock.

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.12: T10-PI/DIF changes
James Smart [Tue, 6 Apr 2010 18:49:53 +0000 (14:49 -0400)]
[SCSI] lpfc 8.3.12: T10-PI/DIF changes

Update driver for change in T10-PI interface on adapter
- Remove Profiles.
- Add new SLI Opcodes.
- Add new PDE structures used for BlockGuard.

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.12: Miscellaneous Changes
James Smart [Tue, 6 Apr 2010 18:49:03 +0000 (14:49 -0400)]
[SCSI] lpfc 8.3.12: Miscellaneous Changes

- Prevent log message 1801 during vport delete.
- Enable NPIV by default.
- Display correct value for max Vports on SLI4 HBAs.

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.12: Emulex SLI enhancements
James Smart [Tue, 6 Apr 2010 18:48:51 +0000 (14:48 -0400)]
[SCSI] lpfc 8.3.12: Emulex SLI enhancements

- Add the new Logical Link speed event support.
- Add RATOV and EDTOV to the REG_VFI mailbox command.

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] mpt2sas: Upgrade version 05.100.00.01
Kashyap, Desai [Mon, 5 Apr 2010 08:51:48 +0000 (14:21 +0530)]
[SCSI] mpt2sas: Upgrade version 05.100.00.01

Upgraded version string.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] mpt2sas: Check for NULL pointer before free_pages is added.
Kashyap, Desai [Mon, 5 Apr 2010 08:51:07 +0000 (14:21 +0530)]
[SCSI] mpt2sas: Check for NULL pointer before free_pages is added.

Added check before free_pages just to make sure ioc->scsi_lookup is not NULL.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] mpt2sas: Added support for PCIe Advanced Error Recovery.
Kashyap, Desai [Mon, 5 Apr 2010 08:50:07 +0000 (14:20 +0530)]
[SCSI] mpt2sas: Added support for PCIe Advanced Error Recovery.

Added support in the driver to support EEH and
PCIe Advanced Error Recovery. This involves adding new
pci_error_handler interface for recovering the controller from PCI Bus
errors, such as SERR and PERR. Some tools are available for simulating
PCI errors in order to validate this interface:
http://www.kernel.org/pub/linux/utils/pci/aer-inject

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] mpt2sas: Send default descriptor for RAID pass through in mpt2ctl
Kashyap, Desai [Mon, 5 Apr 2010 08:49:21 +0000 (14:19 +0530)]
[SCSI] mpt2sas: Send default descriptor for RAID pass through in mpt2ctl

RAID_SCSI_IO_PASSTHROUGH: Driver needs to be sending the default
descriptor for RAID Passthru, currently its sending SCSI_IO descriptor.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] mpt2sas: sanity added to remove duplicate port from topology
Kashyap, Desai [Mon, 5 Apr 2010 08:48:34 +0000 (14:18 +0530)]
[SCSI] mpt2sas: sanity added to remove duplicate port from topology

There are few special cases which needs to be handled deleting old port.

CASE1: In topology you need cascaded expanders. Through sysfs just make sure
topology is up. Erase the manufacturing image of the cascaded expander and
reset the board. In some cases Adapter will receive Exapnder Add event
before expander delete. In such a case, driver needs to delete duplicate
port before adding new port.

CASE2: Enable Device Missing delay of HBA through lsiutils. If expander or
end device is hotswapped with different device before DMD timer expires,
driver will get device add for new device first and then device deletion
event for the original devices will arrive later at DMD timer expires. In
this case also driver need to delete duplicate port before adding port for
new device.

Added new function which will make sure when new port is
added, that its not claiming the same phy resources already in use by
another port. If it does, then it will delete the other port before adding
the new port.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] scsi_debug: add max_queue + no_uld parameters
Douglas Gilbert [Thu, 25 Mar 2010 21:29:05 +0000 (17:29 -0400)]
[SCSI] scsi_debug: add max_queue + no_uld parameters

While testing the midlevel q_at_head and q_at_tail
patch for sg and the block SG_IO ioctl I found it
useful to reduce the queuing within the scsi_debug
driver. The reason is that the midlevel queue only
comes into play when the corresponding LLD queue
is full.

It is also useful when testing to be confident that
your program is the only thing issuing commands
to the (virtual) scsi_debug device. The no_uld=1
parameter will stop a scsi_debug virtual disk
appearing as /dev/sd* .

Changelog:
   - add max_queue parameter to reduce the number
     of queued commands the driver will accept.
     This parameter can be changed after the driver
     is loaded.
   - add no_uld parameter that restricts scsi_debug's
     virtual devices to the sg and bsg drivers
   - correct stale url

Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] sd: retry read_capacity on UNIT_ATTENTION
James Bottomley [Thu, 1 Apr 2010 14:30:01 +0000 (10:30 -0400)]
[SCSI] sd: retry read_capacity on UNIT_ATTENTION

Hazard testing uncovered yet another bug in sd. Under heavy reset
activity the retry counter might be exhausted and the command will be
returned with sense UNIT_ATTENTION/0x29/00 (POWER ON, RESET, OR BUS
DEVICE RESET OCCURRED). In those cases we should just increase the
retry counter again, retrying one more to clear up this Unit Attention
state.

[jejb: update to work with RC16 devices and not to loop endlessly]
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] mpt2sas : IOs needs to be pause until handles are refreshed for all device...
Kashyap, Desai [Tue, 30 Mar 2010 05:22:44 +0000 (10:52 +0530)]
[SCSI] mpt2sas : IOs needs to be pause until handles are refreshed for all device after recovery

After Host Reset firmware will have new list of device handles for the target.
Device handle refresh in driver is part of Rescan topology logic.
(See functions like *_search_responding_*). This needs to be done from Host
Reset context before making shost_recovery to 0. Currently it is done in
Firwmare event context, which may leads IO to a wrong device.

Now handler refresh is moved to HBA reset context.
Apart from this, Now driver will stop IOs for all device setting deleted
flag to 1 at the time of HBA Reset through _scsih_prep_device_scan.
It will only unblock devices, if devices has been found as part of RESCAN.
This way it will make more safe IO blocking at the time of HBA reset at
mpt2sas driver layer.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] sd: quiet spurious error messages in READ_CAPACITY(16)
Hannes Reinecke [Mon, 29 Mar 2010 07:29:24 +0000 (09:29 +0200)]
[SCSI] sd: quiet spurious error messages in READ_CAPACITY(16)

sd always tries to submit a READ_CAPACITY(16) CDB,
regardless whether the host actually supports it.
queuecommand() will then return DID_ABORT, which is
not qualified enough to detect the true cause here.
So better check in sd_try_rc16 first if the cdblen
is supported.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] bnx2i: Update version and module description
Anil Veerabhadrappa [Thu, 25 Mar 2010 17:54:44 +0000 (10:54 -0700)]
[SCSI] bnx2i: Update version and module description

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>
14 years ago[SCSI] bnx2i: link bnx2i hba and cnic device before registering the device
Anil Veerabhadrappa [Thu, 25 Mar 2010 17:54:42 +0000 (10:54 -0700)]
[SCSI] bnx2i: link bnx2i hba and cnic device before registering the device

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>
14 years ago[SCSI] bnx2i: make firmware use statsn field when constructing header
Anil Veerabhadrappa [Thu, 25 Mar 2010 17:54:40 +0000 (10:54 -0700)]
[SCSI] bnx2i: make firmware use statsn field when constructing header

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>
14 years ago[SCSI] zfcp: Pass return code from fc_block_scsi_eh to scsi eh
Christof Schmitt [Wed, 24 Mar 2010 15:50:31 +0000 (16:50 +0100)]
[SCSI] zfcp: Pass return code from fc_block_scsi_eh to scsi eh

The return code FAST_IO_FAIL from fc_block_scsi_eh indicates that the
pending I/O requests have been terminated as a result of the
fast_io_fail_tmo. Pass this return code back to the scsi eh to stop
the scsi eh in this case.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] Allow FC LLD to fast-fail scsi eh by introducing new eh return
Christof Schmitt [Wed, 24 Mar 2010 15:50:30 +0000 (16:50 +0100)]
[SCSI]  Allow FC LLD to fast-fail scsi eh by introducing new eh return

If the scsi eh is running and then a FC LLD calls
fc_remote_port_delete, the SCSI commands sent from the eh will fail.
To prevent this, a FC LLD can call fc_block_scsi_eh from the eh
callback, blocking the eh thread until the dev_loss_tmo fires or the
remote port is available again.

If (e.g. for a multipathing setup) the dev_loss_tmo is set to a very
large value, thus preventing the scsi device removal , the scsi eh can
block for a long time. For multipathing, the fast_io_fail_tmo is then
set to a low value to detect path problems sooner.

This patch introduces a new return code FAST_IO_FAIL. The function
fc_block_scsi_eh now returns FAST_IO_FAIL when the fast_io_fail_tmo
fires. This indicates that the LLD terminated all pending I/O requests
and there are no more pending SCSI commands for the scsi eh to wait
for. This return code can be passed back to the scsi eh to stop the
escalation and finish the recovery process for this device.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Fix documentation of ql2xfdmienable module parameter
Ferenc Wagner [Tue, 23 Mar 2010 17:14:59 +0000 (18:14 +0100)]
[SCSI] qla2xxx: Fix documentation of ql2xfdmienable module parameter

The default is enabled since 7e47e5ca184548341a82eeb2238ee3622c43cae1.

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: General checkpatch corrections.
Andrew Vasquez [Sat, 20 Mar 2010 00:04:02 +0000 (17:04 -0700)]
[SCSI] qla2xxx: General checkpatch corrections.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>