GitHub/exynos8895/android_kernel_samsung_universal8895.git
11 years ago[SCSI] Fix range check in scsi_host_dif_capable()
Martin K. Petersen [Thu, 27 Sep 2012 02:39:44 +0000 (22:39 -0400)]
[SCSI] Fix range check in scsi_host_dif_capable()

The range checking from fe542396 was bad. We would still end up walking
beyond the array as Type 3 is defined to be 4 in the protection
bitmask. Instead use ARRAY_SIZE() for the range check.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] storvsc: Initialize the sglist
K. Y. Srinivasan [Wed, 6 Feb 2013 13:15:28 +0000 (05:15 -0800)]
[SCSI] storvsc: Initialize the sglist

Properly initialize scatterlist before using it.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt2sas: Add support for OEM specific controller
Sreekanth Reddy [Fri, 1 Feb 2013 16:19:30 +0000 (21:49 +0530)]
[SCSI] mpt2sas: Add support for OEM specific controller

Defined SSDID & HW vendor brand strings. Added entries for SSDID within the
function that prints the brand string.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ipr: Fix oops while resetting an ipr adapter
Brian King [Thu, 31 Jan 2013 05:45:08 +0000 (23:45 -0600)]
[SCSI] ipr: Fix oops while resetting an ipr adapter

When resetting an ipr adapter, we use scsi_block_requests to
block any new commands from scsi core, and then unblock after
the reset. When hotplug removing an adapter, we shut it down
and go through this same code, but we've seen issues with
scsi_unblock_requests running after the adapter's memory has
been freed. There is really no need to block/unblock when
the adapter is being removed, so this patch skips the
block/unblock and will immediately fail any commands that
happen to make it to queuecommand while the adapter is
being shutdown.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] fnic: Fnic Trace Utility
Hiral Patel [Wed, 13 Feb 2013 01:01:02 +0000 (17:01 -0800)]
[SCSI] fnic: Fnic Trace Utility

Fnic Trace utility is a tracing functionality built directly into fnic driver
to trace events. The benefit that trace buffer brings to fnic driver is the
ability to see what it happening inside the fnic driver. It also provides the
capability to trace every IO event inside fnic driver to debug panics, hangs
and potentially IO corruption issues. This feature makes it easy to find
problems in fnic driver and it also helps in tracking down strange bugs in a
more manageable way. Trace buffer is shared across all fnic instances for
this implementation.

Signed-off-by: Hiral Patel <hiralpat@cisco.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] fnic: New debug flags and debug log messages
Hiral Patel [Wed, 13 Feb 2013 01:01:01 +0000 (17:01 -0800)]
[SCSI] fnic: New debug flags and debug log messages

Added new fnic debug flags for identifying IO state at every stage of IO while
debugging and also added more log messages for better debugging capability.

Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com>
Signed-off-by: Hiral Patel <hiralpat@cisco.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] fnic: fnic driver may hit BUG_ON on device reset
Hiral Patel [Wed, 13 Feb 2013 01:01:00 +0000 (17:01 -0800)]
[SCSI] fnic: fnic driver may hit BUG_ON on device reset

The issue was observed when LUN Reset is issued through IOCTL or sg_reset
utility.

fnic driver issues LUN RESET to firmware. On successful completion of device
reset, driver cleans up all the pending IOs that were issued prior to device
reset. These pending IOs are expected to be in ABTS_PENDING state. This works
fine, when the device reset operation resulted from midlayer, but not when
device reset was triggered from IOCTL path as the pending IOs were not in
ABTS_PENDING state. execution path hits panic if the pending IO is not in
ABTS_PENDING state.

Changes:
The fix replaces BUG_ON check in fnic_clean_pending_aborts() with marking
pending IOs as ABTS_PENDING if they were not in ABTS_PENDING state and skips
if they were already in ABTS_PENDING state. An extra check is added to validate
the abort status of the commands after a delay of 2 * E_D_TOV using a
helper function. The helper function returns 1 if it finds any pending IO in
ABTS_PENDING state, belong to the LUN on which device reset was issued else 0.
With this, device reset operation returns success only if the helper funciton
returns 0, otherwise it returns failure.

Other changes:
- Removed code in fnic_clean_pending_aborts() that returns failure if it finds
  io_req NULL, instead of returning failure added code to continue with next io
- Added device reset flags for debugging in fnic_terminate_rport_io,
  fnic_rport_exch_reset, and fnic_clean_pending_aborts

Signed-off-by: Narsimhulu Musini <nmusini@cisco.com>
Signed-off-by: Hiral Patel <hiralpat@cisco.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] fnic: Fix SGEs limit
Hiral Patel [Wed, 13 Feb 2013 01:00:59 +0000 (17:00 -0800)]
[SCSI] fnic: Fix SGEs limit

Driver allows IOs with more SGEs than max SGEs supported by Palo. The current
max SGEs supported by the fnic driver is 1024. The current register settings
on Palo supports a max of 256 only. Palo would return any IO with more than
256 SGEs with an error indicating INVALID_SGLS. Fnic driver should limit the
max supported SGLs in the driver to 256 to avoid this error.

Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com>
Signed-off-by: Hiral Patel <hiralpat@cisco.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] fnic: fixing issues in device and firmware reset code
Hiral Patel [Wed, 13 Feb 2013 01:00:58 +0000 (17:00 -0800)]
[SCSI] fnic: fixing issues in device and firmware reset code

1. Handling overlapped firmware resets
     This fix serialize multiple firmware resets to avoid situation where fnic
     device fails to come up for link up event, when firmware resets are issued
     back to back. If there are overlapped firmware resets are issued,
     the firmware reset operation checks whether there is any firmware reset in
     progress, if so it polls for its completion in a loop with 100ms delay.

2. Handling device reset timeout
     fnic_device_reset code has been modified to handle Device reset timeout:
     - Issue terminate on device reset timeout.
     - Introduced flags field (one of the scratch fields in scsi_cmnd).
     With this, device reset request would have DEVICE_RESET flag set for other
     routines to determine the type of the request.
     Also modified fnic_terminate_rport_io, fnic_rport_exch_rset, completion
     routines to handle SCSI commands with DEVICE_RESET flag.

3. LUN/Device Reset hangs when issued through IOCTL using utilities like
   sg_reset.
     Each SCSI command is associated with a valid tag, fnic uses this tag to
     retrieve associated scsi command on completion. the LUN/Device Reset issued
     through IOCTL resulting into a SCSI command that is not associated with a
     valid tag. So fnic fails to retrieve associated scsi command on completion,
     which causes hang. This fix allocates tag, associates it with the
     scsi command and frees the tag, when the operation completed.

4. Preventing IOs during firmware reset.
     Current fnic implementation allows IO submissions during firmware reset.
     This fix synchronizes IO submissions and firmware reset operations.
     It ensures that IOs issued to fnic prior to reset will be issued to the
     firmware before firmware reset.

Signed-off-by: Narsimhulu Musini <nmusini@cisco.com>
Signed-off-by: Hiral Patel <hiralpat@cisco.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] pm80xx: fix for memory region free
Sakthivel K [Mon, 4 Feb 2013 06:40:02 +0000 (12:10 +0530)]
[SCSI] pm80xx: fix for memory region free

All memory regions are allocated based on variables total_len
and alignment but free was based on element_size.

Signed-off-by: Sakthivel K <DL.Team.PMC.SPC.Linux.open.source@pmcs.com>
Signed-off-by: Anand Kumar S <DL.Team.PMC.SPC.Linux.open.source@pmcs.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] megaraid_sas: Version and Changelog update
adam radford [Sat, 9 Feb 2013 23:29:25 +0000 (15:29 -0800)]
[SCSI] megaraid_sas: Version and Changelog update

This patch updates the megaraid_sas driver version and updates
Documentation/scsi/ChangeLog.megaraid_sas.

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] megaraid_sas: Dont load DevHandle unless FastPath enabled
adam radford [Sat, 9 Feb 2013 23:29:20 +0000 (15:29 -0800)]
[SCSI] megaraid_sas: Dont load DevHandle unless FastPath enabled

The following patch for megaraid_sas will fix an issue where the
driver should not be loading the DevHandle unless FastPath is enabled.
 If FastPath was not enabled, this means the hardware raid map
validation failed for some reason, or the map was corrupted, which
could mean the DevHandle could be invalid.

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] megaraid_sas: Add 4k FastPath DIF support
adam radford [Sat, 9 Feb 2013 23:29:15 +0000 (15:29 -0800)]
[SCSI] megaraid_sas: Add 4k FastPath DIF support

The following patch for megaraid_sas will allow Fastpath T10PI/DIF
frame builds to work with 4k sector size.

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Wait for IDC complete event to finish loopback operation.
Chad Dupuis [Fri, 8 Feb 2013 06:58:04 +0000 (01:58 -0500)]
[SCSI] qla2xxx: Wait for IDC complete event to finish loopback operation.

Wait for the IDC complete AEN before returning the loopback operation back to
the application to make sure the port is put back into normal operations.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Integrate generic card temperature with mezz card temperature.
Joe Carnuccio [Fri, 8 Feb 2013 06:58:03 +0000 (01:58 -0500)]
[SCSI] qla2xxx: Integrate generic card temperature with mezz card temperature.

Give priority to I2C thermal.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Don't process state change aen for reset owner.
Saurav Kashyap [Fri, 8 Feb 2013 06:58:02 +0000 (01:58 -0500)]
[SCSI] qla2xxx: Don't process state change aen for reset owner.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Don't process RSCNs for a vport on the same physical adapter.
Chad Dupuis [Fri, 8 Feb 2013 06:58:01 +0000 (01:58 -0500)]
[SCSI] qla2xxx: Don't process RSCNs for a vport on the same physical adapter.

Currently,the driver is processes RSCNs for each new NPIV ports that is created.
Processing the RSCN includes a name server query to see what has changed at the
name server side.  The name server query is performed by the physical port and
each virtual port on the physical adapter (since the RSCN is passed to each
virtual port for processing).  As the number of virtual ports being created
increases, this causes a lot of traffic and busies the firmware.

Processing the RSCN for a virtual port we already have a priori knowledge of is
not necessary so check the 24-bit fabric ID of the RSCN entry and skip
processing it if the RSCN is for a virtual port we already know about.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Add setting of driver version string for vendor application.
Joe Carnuccio [Fri, 8 Feb 2013 06:58:00 +0000 (01:58 -0500)]
[SCSI] qla2xxx: Add setting of driver version string for vendor application.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Correction of comment in MBC opcode defines.
Joe Carnuccio [Fri, 8 Feb 2013 06:57:59 +0000 (01:57 -0500)]
[SCSI] qla2xxx: Correction of comment in MBC opcode defines.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Correct list-iteration bug in Report-ID Acquisition codes.
Andrew Vasquez [Fri, 8 Feb 2013 06:57:58 +0000 (01:57 -0500)]
[SCSI] qla2xxx: Correct list-iteration bug in Report-ID Acquisition codes.

Code in qla24xx_report_id_acquisition() incorrectly assumed that
upon completion of list iteration (with no match), the 'pos'
(vp) variable passed to list_for_each_entry() would be set to
NULL.  In this context, if the firmware were to return an
unrecognized vp_idx, the follow-on assignments to vp-members
could result in corruption of the structure.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] Revert "[SCSI] qla2xxx: Optimize existing port name server query matching."
Joe Carnuccio [Fri, 8 Feb 2013 06:57:57 +0000 (01:57 -0500)]
[SCSI] Revert "[SCSI] qla2xxx: Optimize existing port name server query matching."

This reverts commit c0822b63ccbf3b019059f384c290b080cae859f1.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] Revert "[SCSI] qla2xxx: Avoid losing any fc ports when loop id's are exhausted."
Joe Carnuccio [Fri, 8 Feb 2013 06:57:56 +0000 (01:57 -0500)]
[SCSI] Revert "[SCSI] qla2xxx: Avoid losing any fc ports when loop id's are exhausted."

This reverts commit 4dc77c36f86c2dc4e3f483146d33b64d12c0da3f.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: silence two GCC warnings.
Paul Bolle [Fri, 8 Feb 2013 06:57:55 +0000 (01:57 -0500)]
[SCSI] qla2xxx: silence two GCC warnings.

Compiling qla_gs.o (part of the qla2xxx module) triggers two GCC
warnings:
    drivers/scsi/qla2xxx/qla_gs.c: In function ‘qla2x00_fdmi_rhba’:
    drivers/scsi/qla2xxx/qla_gs.c:1339:7: warning: array subscript is above array bounds [-Warray-bounds]
    drivers/scsi/qla2xxx/qla_gs.c: In function ‘qla2x00_fdmi_register’:
    drivers/scsi/qla2xxx/qla_gs.c:1663:15: warning: array subscript is above array bounds [-Warray-bounds]

It seems that the sequence of a strcpy followed by a strlen confuses GCC
when it is keeping track of array bounds here. (It is not clear to me
which array triggers this warning and by how much GCC thinks the
subscript is above its bounds. Neither is it clear to me why comparable
code in these two functions doesn't trigger this warning.)

An easy way to silence these warnings is to use preprocessor macros and
strncpy, as that apparently gives GCC enough information to keep track
of array bounds.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Update the copyright information.
Saurav Kashyap [Fri, 8 Feb 2013 06:57:54 +0000 (01:57 -0500)]
[SCSI] qla2xxx: Update the copyright information.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Display the lock owner on lock acquire failure.
Saurav Kashyap [Fri, 8 Feb 2013 06:57:53 +0000 (01:57 -0500)]
[SCSI] qla2xxx: Display the lock owner on lock acquire failure.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Move loopback mode reset after chip reset check.
Chad Dupuis [Fri, 8 Feb 2013 06:57:52 +0000 (01:57 -0500)]
[SCSI] qla2xxx: Move loopback mode reset after chip reset check.

If we need to do a chip reset because of a serious loopback error don't try to
reset the loopback mode on the port as the mailbox command will timeout.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Extra loopback error handling for ISP83xx.
Chad Dupuis [Fri, 8 Feb 2013 06:57:51 +0000 (01:57 -0500)]
[SCSI] qla2xxx: Extra loopback error handling for ISP83xx.

Add the following error handling for loopback diagnostic mode with ISP83xx:

1. If we do not receive an MBA_DCBX_COMPLETE after our initial set port
configuration command, try to reset the port back into normal operation.
If that fails, take a FCoE dump and then reset the chip.
2. After completing the loopback diagnostic operation, if the reset of the port
back into normal operation fails then reset the port so we take a FCoE dump
and then reset the chip.
3. When we receive an IDC notification and the requested operation is loopback
extend the loop down timer so the link does not appear to down for an
extended period of time.

[jejb: fix checkpatch issue]
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Unload hangs after issuing BSG commands to vport.
Chad Dupuis [Fri, 8 Feb 2013 06:57:50 +0000 (01:57 -0500)]
[SCSI] qla2xxx: Unload hangs after issuing BSG commands to vport.

BSG code path increments ref count in the send path, but does not
decrement in the return path leading to hang during unload of the
driver.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Do MPI reset only for ISP81xx.
Saurav Kashyap [Fri, 8 Feb 2013 06:57:49 +0000 (01:57 -0500)]
[SCSI] qla2xxx: Do MPI reset only for ISP81xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Do link initialization on get loop id failure.
Joe Carnuccio [Fri, 8 Feb 2013 06:57:48 +0000 (01:57 -0500)]
[SCSI] qla2xxx: Do link initialization on get loop id failure.

To avoid continually doing ISP resets when get loop id fails to
obtain the adapter loop id, first try to do a link initialization.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Update the FTP site references in the driver sources.
Giridhar Malavali [Fri, 8 Feb 2013 06:57:47 +0000 (01:57 -0500)]
[SCSI] qla2xxx: Update the FTP site references in the driver sources.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Reject loopback request if one is already in progress.
Chad Dupuis [Fri, 8 Feb 2013 06:57:46 +0000 (01:57 -0500)]
[SCSI] qla2xxx: Reject loopback request if one is already in progress.

If another function on the port has initiated a loopback operation do not
process the current request.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Print thermal unsupported message.
Joe Carnuccio [Fri, 8 Feb 2013 06:57:45 +0000 (01:57 -0500)]
[SCSI] qla2xxx: Print thermal unsupported message.

When the Read SFP mailbox command fails on the thermal device,
print a message explaining that thermal is not supported.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Avoid null pointer dereference in shutdown routine.
Masanari Iida [Fri, 8 Feb 2013 06:57:44 +0000 (01:57 -0500)]
[SCSI] qla2xxx: Avoid null pointer dereference in shutdown routine.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Get VPD information from common location for CNA.
Saurav Kashyap [Fri, 8 Feb 2013 06:57:43 +0000 (01:57 -0500)]
[SCSI] qla2xxx: Get VPD information from common location for CNA.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Correct race in loop_state assignment during reset handling.
Andrew Vasquez [Fri, 8 Feb 2013 06:57:42 +0000 (01:57 -0500)]
[SCSI] qla2xxx: Correct race in loop_state assignment during reset handling.

There's a subtle race in the loop/bus-reset handling whereby a
VHA's loop-state can get incorrectly set to 'down' after the
loop-reset and firmware's completion of link re-negotiation.  The
original code incorrectly assumes that firmware AENs would arrive
only after mailbox-command execution to initiate the link-flap.

Here's a good case with the old code (AENs arrive after
mailbox-command completion):

qla2xxx [0000:03:00.1]-8012:91: BUS RESET ISSUED nexus=91:0:4.
qla2xxx [0000:03:00.1]-287d:91: FCPort state transitioned from ONLINE to LOST - portid=010100.
qla2xxx [0000:03:00.1]-580e:91: Asynchronous P2P MODE received.
qla2xxx [0000:03:00.1]-287d:91: FCPort state transitioned from ONLINE to LOST - portid=010400.
qla2xxx [0000:03:00.1]-802b:91: BUS RESET SUCCEEDED nexus=91:0:4.
qla2xxx [0000:03:00.1]-480b:91: Reset marker scheduled.
qla2xxx [0000:03:00.1]-5812:91: Port database changed ffff 0006 0000.
qla2xxx [0000:03:00.1]-505f:91: Link is operational (4 Gbps).
qla2xxx [0000:03:00.1]-480c:91: Reset marker end.
qla2xxx [0000:03:00.1]-480f:91: Loop resync scheduled.
qla2xxx [0000:03:00.1]-8837:91: F/W Ready - OK.
qla2xxx [0000:03:00.1]-883a:91: fw_state=3 (7, 0, 0, 0) curr time=170b8f315.
qla2xxx [0000:03:00.1]-280e:91: HBA in F P2P topology.
qla2xxx [0000:03:00.1]-2812:91: qla2x00_configure_hba success
qla2xxx [0000:03:00.1]-2814:91: Configure loop -- dpc flags = 0x5260.

notice how the 'Port database changed' (8014) arrived after the
bus-reset handler completed 'BUS RESET SUCCEEDED'.

Now, here's a failing case with the old code (AENs arrive before
mailbox-command completion):

qla2xxx [0000:03:00.1]-8012:91: BUS RESET ISSUED nexus=91:0:0.
qla2xxx [0000:03:00.1]-580e:91: Asynchronous P2P MODE received.
qla2xxx [0000:03:00.1]-287d:91: FCPort state transitioned from ONLINE to LOST - portid=010100.
qla2xxx [0000:03:00.1]-287d:91: FCPort state transitioned from ONLINE to LOST - portid=010400.
qla2xxx [0000:03:00.1]-4800:91: DPC handler sleeping.
qla2xxx [0000:03:00.1]-5812:91: Port database changed ffff 0006 0000.
qla2xxx [0000:03:00.1]-505f:91: Link is operational (4 Gbps).
qla2xxx [0000:03:00.1]-802b:91: BUS RESET SUCCEEDED nexus=91:0:0.
qla2xxx [0000:03:00.1]-480b:91: Reset marker scheduled.
qla2xxx [0000:03:00.1]-480c:91: Reset marker end.
qla2xxx [0000:03:00.1]-480f:91: Loop resync scheduled.
qla2xxx [0000:03:00.1]-8837:91: F/W Ready - OK.
qla2xxx [0000:03:00.1]-883a:91: fw_state=3 (7, 0, 0, 0) curr time=170be9eb2.
qla2xxx [0000:03:00.1]-280e:91: HBA in F P2P topology.
qla2xxx [0000:03:00.1]-2812:91: qla2x00_configure_hba success
qla2xxx [0000:03:00.1]-2814:91: Configure loop -- dpc flags = 0x5260.
qla2xxx [0000:03:00.1]-281e:91: Needs RSCN update and loop transition.
qla2xxx [0000:03:00.1]-286a:91: qla2x00_configure_loop *** FAILED ***.
qla2xxx [0000:03:00.1]-4810:91: Loop resync end.
qla2xxx [0000:03:00.1]-4800:91: DPC handler sleeping.

This race would ultimately lead to devices go unexpectedly
offline until another link-flap or chip-reset would cause driver
re-discovery to take place.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Correction to the message ids.
Saurav Kashyap [Wed, 30 Jan 2013 08:34:42 +0000 (03:34 -0500)]
[SCSI] qla2xxx: Correction to the message ids.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Prevent enabling target mode for unsupported HBAs.
Arun Easi [Wed, 30 Jan 2013 08:34:41 +0000 (03:34 -0500)]
[SCSI] qla2xxx: Prevent enabling target mode for unsupported HBAs.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Allow ISP81xx to create ATIO queues.
Arun Easi [Wed, 30 Jan 2013 08:34:40 +0000 (03:34 -0500)]
[SCSI] qla2xxx: Allow ISP81xx to create ATIO queues.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Enable target mode support for ISP83xx.
Arun Easi [Wed, 30 Jan 2013 08:34:39 +0000 (03:34 -0500)]
[SCSI] qla2xxx: Enable target mode support for ISP83xx.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Ramp down queue depth for attached SCSI devices when driver resources...
Chad Dupuis [Wed, 30 Jan 2013 08:34:38 +0000 (03:34 -0500)]
[SCSI] qla2xxx: Ramp down queue depth for attached SCSI devices when driver resources are low.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Determine the number of outstanding commands based on available resou...
Chad Dupuis [Wed, 30 Jan 2013 08:34:37 +0000 (03:34 -0500)]
[SCSI] qla2xxx: Determine the number of outstanding commands based on available resources.

Base the number of outstanding requests the driver will keep track of on the
available resources instead of being hard-coded.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] libosd: check for kzalloc() failure
Dan Carpenter [Wed, 30 Jan 2013 07:06:02 +0000 (10:06 +0300)]
[SCSI] libosd: check for kzalloc() failure

There wasn't any error handling for this kzalloc().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: don't free NULL dma pool
Dan Carpenter [Wed, 30 Jan 2013 07:07:31 +0000 (10:07 +0300)]
[SCSI] qla4xxx: don't free NULL dma pool

The error path calls dma_pool_free() on this path but "chap_table" is
NULL and "chap_dma" is uninitialized.  It's cleaner to just return
directly.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mvsas: fixed timeout issue when removing module
Xiangliang Yu [Tue, 29 Jan 2013 16:25:53 +0000 (00:25 +0800)]
[SCSI] mvsas: fixed timeout issue when removing module

Root cause is libsas will clear asd_sas_port phy_mask value in sas_port_deform
after triggering destruct workqueue, but the workqueue will send sync cmd and
still need phy_mask value.  Now, mvsas using asd_sas_phy setting instead of
asd_sas_port setting.

Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] aacraid: 1024 max outstanding command support for Series 7 and above
Mahesh Rajashekhara [Thu, 10 Jan 2013 12:22:51 +0000 (17:52 +0530)]
[SCSI] aacraid: 1024 max outstanding command support for Series 7 and above

Signed-off-by: Mahesh Rajashekhara <Mahesh_Rajashekhara@pmc-sierra.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bnx2fc: adjust duplicate test
Julia Lawall [Mon, 21 Jan 2013 13:02:49 +0000 (14:02 +0100)]
[SCSI] bnx2fc: adjust duplicate test

Delete successive tests to the same location.  The code tested the result
of a previous allocation, that itself was already tested.  It is changed to
test the result of the most recent allocation.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@s exists@
local idexpression y;
expression x,e;
@@

*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
 { ... when forall
   return ...; }
... when != \(y = e\|y += e\|y -= e\|y |= e\|y &= e\|y++\|y--\|&y\)
    when != \(XT_GETPAGE(...,y)\|WMI_CMD_BUF(...)\)
*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
 { ... when forall
   return ...; }
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Update driver version to 5.03.00-k4
Vikas Chaudhary [Mon, 21 Jan 2013 04:51:05 +0000 (23:51 -0500)]
[SCSI] qla4xxx: Update driver version to 5.03.00-k4

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Fix return code for qla4xxx_session_get_param.
Manish Rangankar [Mon, 21 Jan 2013 04:51:04 +0000 (23:51 -0500)]
[SCSI] qla4xxx: Fix return code for qla4xxx_session_get_param.

While reading sysfs chap_in_idx and chap_out_idx attribute, if chap
authentication is not set we get an error as "Invalid argument".

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: wait for boot target login response during probe.
Manish Rangankar [Mon, 21 Jan 2013 04:51:03 +0000 (23:51 -0500)]
[SCSI] qla4xxx: wait for boot target login response during probe.

Boot from SAN fails in some cases where boot target login response
is slow. In this case, probe finishes early and triggers init, which
doesn't find remote disk to mount root which leads to BFS failure.

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Added support for force firmware dump
Vikas Chaudhary [Mon, 21 Jan 2013 04:51:02 +0000 (23:51 -0500)]
[SCSI] qla4xxx: Added support for force firmware dump

This patch force driver to collect firmware dump using following command:-
"echo 2 > /sys/class/scsi_host/hostX/device/fw_dump"

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Re-register IRQ handler while retrying initialize of adapter
Poornima Vonti [Mon, 21 Jan 2013 04:51:01 +0000 (23:51 -0500)]
[SCSI] qla4xxx: Re-register IRQ handler while retrying initialize of adapter

Problem:
If initialization of adapter fails for some reason, then the interrupt handlers
are released. The interrupt handlers are not registered again when initialization
of adapter is retried.

Solution:
Re-register the interrupt handler when adapter initialization is retried.

Signed-off-by: Poornima Vonti <poornima.vonti@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Throttle active IOCBs to firmware limits
Karen Higgins [Mon, 21 Jan 2013 04:51:00 +0000 (23:51 -0500)]
[SCSI] qla4xxx: Throttle active IOCBs to firmware limits

Problem:
QLA4xxx firmware may assert if given more IOCBs than it can handle.

Solution:
The driver was updated to throttle the number of active IOCBs based
on the total number of IOCB buffers received from get_firmware_status
mbx_sts[2].

Signed-off-by: Karen Higgins <karen.higgins@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Remove unnecessary code from qla4xxx_init_local_data
Karen Higgins [Mon, 21 Jan 2013 04:50:59 +0000 (23:50 -0500)]
[SCSI] qla4xxx: Remove unnecessary code from qla4xxx_init_local_data

Removed unnecessary calls to qla4xxx_get_firmware_status from
function qla4xxx_init_local_data

Signed-off-by: Karen Higgins <karen.higgins@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Quiesce driver activities while loopback
Nilesh Javali [Mon, 21 Jan 2013 04:50:58 +0000 (23:50 -0500)]
[SCSI] qla4xxx: Quiesce driver activities while loopback

Quiesce all different activities performed by driver upon the link events
while loopback diagnostics is in progress.

Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Rename MBOX_ASTS_IDC_NOTIFY to MBOX_ASTS_IDC_REQUEST_NOTIFICATION
Nilesh Javali [Mon, 21 Jan 2013 04:50:57 +0000 (23:50 -0500)]
[SCSI] qla4xxx: Rename MBOX_ASTS_IDC_NOTIFY to MBOX_ASTS_IDC_REQUEST_NOTIFICATION

Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Add spurious interrupt messages under debug level 2
Nilesh Javali [Mon, 21 Jan 2013 04:50:56 +0000 (23:50 -0500)]
[SCSI] qla4xxx: Add spurious interrupt messages under debug level 2

The spurious interrupt messages are seen when interrupt lines are
shared between different adapters or modules. Example, interrupt
lines are shared between qlcnic and qla4xxx and USB modules, then the
console is flooded with flurry of spurious interrupt messages
which are expected in such scenario.

Hence put these messages under debug level 2 for INTx interrupt mode.

Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] cxgb4i: Remove the scsi host device when removing device
Thadeu Lima de Souza Cascardo [Fri, 11 Jan 2013 19:12:09 +0000 (17:12 -0200)]
[SCSI] cxgb4i: Remove the scsi host device when removing device

When doing a hotplug remove of a cxgb4 device, there are still dandling
symlinks at /sys/class/scsi_host/hostX to the removed PCI device. The
upper layer device may also try to send data, which may crash the
system.

The DETACH message from the lower level driver is sent to the ULD when
the device is removed, when the scsi host should be removed from the
system, avoiding any problems.

After this patch, there are no more dangling symlinks and many attempts
to crash the system while there is SCSI activity and removing the device
have failed. Adding the device back again works as expected, with the
scsi hosts showing up again.

Based on a patch by Karen Xie.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Cc: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bfa: fix strncpy() limiter in bfad_start_ops()
Dan Carpenter [Thu, 10 Jan 2013 09:06:20 +0000 (12:06 +0300)]
[SCSI] bfa: fix strncpy() limiter in bfad_start_ops()

The closing parenthesis is in the wrong place so it takes the sizeof a
pointer instead of the sizeof the buffer minus one.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Anil Gurumurthy <agurumur@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Update driver version to 5.03.00-k3
Vikas Chaudhary [Sat, 29 Dec 2012 07:24:54 +0000 (02:24 -0500)]
[SCSI] qla4xxx: Update driver version to 5.03.00-k3

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Correct the validation to check in get_sys_info mailbox
Nilesh Javali [Sat, 29 Dec 2012 07:24:53 +0000 (02:24 -0500)]
[SCSI] qla4xxx: Correct the validation to check in get_sys_info mailbox

Check mbox_sts[3] instead of mbox_sts[4] for ISP83xx to validate size
of data returned

Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Pass correct function param to qla4_8xxx_rd_direct
Vikas Chaudhary [Sat, 29 Dec 2012 07:24:52 +0000 (02:24 -0500)]
[SCSI] qla4xxx: Pass correct function param to qla4_8xxx_rd_direct

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.37: Update lpfc version for 8.3.37 driver release
James Smart [Thu, 3 Jan 2013 20:44:24 +0000 (15:44 -0500)]
[SCSI] lpfc 8.3.37: Update lpfc version for 8.3.37 driver release

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.37: Fixed infinite loop in lpfc_sli4_fcf_rr_next_index_get.
James Smart [Thu, 3 Jan 2013 20:44:16 +0000 (15:44 -0500)]
[SCSI] lpfc 8.3.37: Fixed infinite loop in lpfc_sli4_fcf_rr_next_index_get.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.37: Fixed crash due to SLI Port invalid resource count
James Smart [Thu, 3 Jan 2013 20:44:09 +0000 (15:44 -0500)]
[SCSI] lpfc 8.3.37: Fixed crash due to SLI Port invalid resource count

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.37: Provide support for FCoE protocol dual-chute (ULP) operation
James Smart [Thu, 3 Jan 2013 20:44:00 +0000 (15:44 -0500)]
[SCSI] lpfc 8.3.37: Provide support for FCoE protocol dual-chute (ULP) operation

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.37: Fixed stale ndlp state when the node is marked for deferred removal.
James Smart [Thu, 3 Jan 2013 20:43:53 +0000 (15:43 -0500)]
[SCSI] lpfc 8.3.37: Fixed stale ndlp state when the node is marked for deferred removal.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.37: Fix potential memory corruption bug
James Smart [Thu, 3 Jan 2013 20:43:45 +0000 (15:43 -0500)]
[SCSI] lpfc 8.3.37: Fix potential memory corruption bug

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.37: Fixed no-context ABTS failed with BA_RJT
James Smart [Thu, 3 Jan 2013 20:43:37 +0000 (15:43 -0500)]
[SCSI] lpfc 8.3.37: Fixed no-context ABTS failed with BA_RJT

Fixed no-context ABTS received on unsolicited receive queue failed with BA_RJT

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.37: Removed use of NOP mailboxes for interrupt verification
James Smart [Thu, 3 Jan 2013 20:43:29 +0000 (15:43 -0500)]
[SCSI] lpfc 8.3.37: Removed use of NOP mailboxes for interrupt verification

Removed use of NOP mailboxes for interrupt verification in pci_probe_one_s4

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.37: Fixed exhausted retry for plogi to nameserver.
James Smart [Thu, 3 Jan 2013 20:43:19 +0000 (15:43 -0500)]
[SCSI] lpfc 8.3.37: Fixed exhausted retry for plogi to nameserver.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.37: Fixed ELS_REC received on the unsolicited receive queue
James Smart [Thu, 3 Jan 2013 20:43:11 +0000 (15:43 -0500)]
[SCSI] lpfc 8.3.37: Fixed ELS_REC received on the unsolicited receive queue

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.37: Provide support for change_queue_type
James Smart [Thu, 3 Jan 2013 20:43:03 +0000 (15:43 -0500)]
[SCSI] lpfc 8.3.37: Provide support for change_queue_type

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ipr: Fix sparse error in ipr driver
wenxiong@linux.vnet.ibm.com [Fri, 11 Jan 2013 23:43:54 +0000 (17:43 -0600)]
[SCSI] ipr: Fix sparse error in ipr driver

This patch fixes the following sparse error:

 CHECK   drivers/scsi/ipr.c
spinlock.h:147:9: warning: context imbalance in 'ipr_reset_reload' - unexpected unlock

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ipr: Driver version 2.6.0
wenxiong@linux.vnet.ibm.com [Fri, 11 Jan 2013 23:43:53 +0000 (17:43 -0600)]
[SCSI] ipr: Driver version 2.6.0

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ipr: Implement block iopoll
wenxiong@linux.vnet.ibm.com [Fri, 11 Jan 2013 23:43:52 +0000 (17:43 -0600)]
[SCSI] ipr: Implement block iopoll

This patch implements blk iopoll in ipr driver for performance improvement.

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ipr: Reduce lock contention
wenxiong@linux.vnet.ibm.com [Fri, 11 Jan 2013 23:43:51 +0000 (17:43 -0600)]
[SCSI] ipr: Reduce lock contention

This patch reduces lock contention while implementing distributed
completion processing.

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ipr: Add support for MSI-X and distributed completion
wenxiong@linux.vnet.ibm.com [Fri, 11 Jan 2013 23:43:50 +0000 (17:43 -0600)]
[SCSI] ipr: Add support for MSI-X and distributed completion

The new generation IBM SAS Controllers will support MSI-X interrupts and
Distributed Completion Processing features. This patch add these support
in ipr device driver.

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ipr: Resource path error logging cleanup
Brian King [Fri, 11 Jan 2013 23:43:49 +0000 (17:43 -0600)]
[SCSI] ipr: Resource path error logging cleanup

The resource path as displayed by the ipr driver is the
location string identifying a location on the SAS fabric.
This patch adds the SCSI host number such that error logs
can be more easily correlated in multiple adapter configurations.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ipr: Handler ID memory allocation failure at module load time
Brian King [Fri, 11 Jan 2013 23:43:48 +0000 (17:43 -0600)]
[SCSI] ipr: Handler ID memory allocation failure at module load time

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ipr: Add sereral new CCIN definitions for new adapters support
wenxiong@linux.vnet.ibm.com [Fri, 11 Jan 2013 23:43:47 +0000 (17:43 -0600)]
[SCSI] ipr: Add sereral new CCIN definitions for new adapters support

Add the appropriate definitions and table entries for new adapter support.

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] csiostor: Don't leak mem or fail to release firmware in csio_hw_flash_config()
Jesper Juhl [Wed, 26 Dec 2012 20:31:51 +0000 (21:31 +0100)]
[SCSI] csiostor: Don't leak mem or fail to release firmware in csio_hw_flash_config()

If kzalloc() or csio_hw_check_fwconfig() fail we may leave the
csio_hw_flash_config() function without freeing allocated memory or
firmware. This should take care of the leaks.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Naresh Kumar Inna <naresh@chelsio.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bnx2fc: Bumped version to 1.0.13
Bhanu Prakash Gollapudi [Sat, 22 Dec 2012 03:40:34 +0000 (19:40 -0800)]
[SCSI] bnx2fc: Bumped version to 1.0.13

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bnx2fc: Support max IO size to 512KB
Bhanu Prakash Gollapudi [Sat, 22 Dec 2012 03:40:33 +0000 (19:40 -0800)]
[SCSI] bnx2fc: Support max IO size to 512KB

Increase max_sectors from 512 to 1024 in order to support max IO size of 512KB.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bnx2fc: Tx/Rx byte counts reset to 0 when exceeding 32 bit values
Bhanu Prakash Gollapudi [Sat, 22 Dec 2012 03:40:32 +0000 (19:40 -0800)]
[SCSI] bnx2fc: Tx/Rx byte counts reset to 0 when exceeding 32 bit values

Since the FW counters are 32-bit, accumulate the stats in the driver.

[jejb: fix checkpatch warning]
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bnx2fc: Map the doorbell register between offload and enable requests
Bhanu Prakash Gollapudi [Sat, 22 Dec 2012 03:40:31 +0000 (19:40 -0800)]
[SCSI] bnx2fc: Map the doorbell register between offload and enable requests

We used to map doorbell register after FW enable request is complete.
This causes a race condition when unsolicited event is received, and FW
sends a CQE for it. Since the doorbell is not mapped, driver does not
arm CQ, which means FW will not notify the driver for further CQ
completions.  To resolve this, map the doorbell between offload and
enable, so that driver is ready to receive the unsolicited packets and
arm the CQ as soon as FW enable is performed.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bnx2fc: Move offload/upload wait logic into a function
Bhanu Prakash Gollapudi [Sat, 22 Dec 2012 03:40:30 +0000 (19:40 -0800)]
[SCSI] bnx2fc: Move offload/upload wait logic into a function

Moved the 'waiting for upload/offload completion' logic to respective
functions as it is called in multiple places. Also this is done in
preperation for the next patch.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bnx2fc: support software fcoe target
Bhanu Prakash Gollapudi [Fri, 11 Jan 2013 07:59:38 +0000 (23:59 -0800)]
[SCSI] bnx2fc: support software fcoe target

Software FCoE target always advertises RETRY bit even when there are no
tape LUNs behind the target. This causes the driver to enable FW support
for sequence level error recovery and perform REC/SRR. This patch
arrests the behavior by not enabling SLER feature for this target.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bnx2fc: Remove potential NULL dereference
Julia Lawall [Sat, 22 Dec 2012 03:40:28 +0000 (19:40 -0800)]
[SCSI] bnx2fc: Remove potential NULL dereference

If the NULL test is necessary, the initialization involving a dereference of
the tested value should be moved after the NULL test.

The sematic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bnx2fc: remove useless calls to memset().
Cyril Roelandt [Sat, 22 Dec 2012 03:40:27 +0000 (19:40 -0800)]
[SCSI] bnx2fc: remove useless calls to memset().

These calls are followed by calls to memcpy() on the same memory area, so they
can be safely removed.

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt2sas: fix for driver fails EEH, recovery from injected pci bus error
Sreekanth Reddy [Tue, 18 Dec 2012 13:45:30 +0000 (14:45 +0100)]
[SCSI] mpt2sas: fix for driver fails EEH, recovery from injected pci bus error

This patch stops the driver to invoke kthread (which remove the dead ioc)
for some time while EEH recovery has started.

[thenzl: add a 'non_operational_loop' reset.]
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt3sas: remove unused variables
Wei Yongjun [Tue, 11 Dec 2012 20:56:51 +0000 (02:26 +0530)]
[SCSI] mpt3sas: remove unused variables

The variable 'chain_flags' and 'phy_number' are initialized but never used
otherwise, So remove those unused variables.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt3sas: Remove unneeded version.h header inclusion
Sachin Kamat [Mon, 3 Dec 2012 10:00:17 +0000 (15:30 +0530)]
[SCSI] mpt3sas: Remove unneeded version.h header inclusion

linux/version.h is not necessary as detected by checkversion.pl script.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: "Sreekanth Reddy" <Sreekanth.reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bnx2i: fix the bit manipulation when setting the error mask
Tomas Henzl [Tue, 3 Jul 2012 08:08:41 +0000 (10:08 +0200)]
[SCSI] bnx2i: fix the bit manipulation when setting the error mask

The intention in bnx2i_send_fw_iscsi_init_msg was to zero out
only the lower 32bits, but instead the whole mask64 is zeroed.
This patch fixes it.

Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Acked-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] fnic: fix for trusted cos
Hiral Patel [Mon, 10 Dec 2012 09:21:30 +0000 (01:21 -0800)]
[SCSI] fnic: fix for trusted cos

Modified fnic driver to let hardware insert the COS value. Set bit
in descriptor to 0 telling hardware to use its lif COS configurations
to insert the COS value in the frames.

Signed-off-by: Narsimhulu Musini <nmusini@cisco.com>
Signed-off-by: Hiral Patel <hiralpat@cisco.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] fnic: updated MAINTAINERS list
Hiral Patel [Mon, 10 Dec 2012 09:21:29 +0000 (01:21 -0800)]
[SCSI] fnic: updated MAINTAINERS list

Updated MAINTAINERS list for fnic driver with appropriate names and email ids.

Signed-off-by: Brian Uchino <buchino@cisco.com>
Signed-off-by: Hiral Patel <hiralpat@cisco.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bfa: Update MAINTAINERS list for BFA driver
Vijaya Mohan Guvva [Mon, 10 Dec 2012 09:20:03 +0000 (01:20 -0800)]
[SCSI] bfa: Update MAINTAINERS list for BFA driver

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt3sas: cut and paste bug storing trigger mpi
Dan Carpenter [Fri, 7 Dec 2012 10:56:22 +0000 (13:56 +0300)]
[SCSI] mpt3sas: cut and paste bug storing trigger mpi

ioc->diag_trigger_mpi is an SL_WH_MPI_TRIGGERS_T struct.

There is a cut and paste error here and SL_WH_EVENT_TRIGGERS_T is used
instead of SL_WH_MPI_TRIGGERS_T.  Since the SL_WH_EVENT_TRIGGERS_T is
smaller than SL_WH_MPI_TRIGGERS_T, it means we only clear part of the
buffer.

I've changed it to use sizeof(ioc->diag_trigger_mpi) which is a bit
simpler.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: "Sreekanth Reddy" <Sreekanth.reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] csiostor: convert to use simple_open()
Wei Yongjun [Mon, 3 Dec 2012 06:22:39 +0000 (01:22 -0500)]
[SCSI] csiostor: convert to use simple_open()

This removes an open coded simple_open() function and
replaces file operations references to the function
with simple_open() instead.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Naresh Kumar Inna <naresh@chelsio.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Update driver version to 5.03.00-k2
Vikas Chaudhary [Fri, 23 Nov 2012 11:58:42 +0000 (06:58 -0500)]
[SCSI] qla4xxx: Update driver version to 5.03.00-k2

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>