GitHub/LineageOS/android_kernel_motorola_exynos9610.git
13 years ago[SCSI] megaraid_sas: Add driver workaround for PERC5/1068 kdump kernel panic
adam radford [Sun, 9 Oct 2011 01:15:19 +0000 (18:15 -0700)]
[SCSI] megaraid_sas: Add driver workaround for PERC5/1068 kdump kernel panic

The following patch for megaraid_sas adds a driver workaround for
PERC5/1068 based controller FW that keeps a command from the main
kernel that the driver cannot cancel which was causing a kernel panic
in shutdown of the kdump kernel.

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] megaraid_sas: Add multiple MSI-X vector/multiple reply queue support
adam radford [Sun, 9 Oct 2011 01:15:13 +0000 (18:15 -0700)]
[SCSI] megaraid_sas: Add multiple MSI-X vector/multiple reply queue support

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] megaraid_sas: Add support for MegaRAID 9360/9380 12GB/s controllers
adam radford [Sun, 9 Oct 2011 01:15:06 +0000 (18:15 -0700)]
[SCSI] megaraid_sas: Add support for MegaRAID 9360/9380 12GB/s controllers

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] megaraid_sas: Clear FUSION_IN_RESET before enabling interrupts
adam radford [Sun, 9 Oct 2011 01:14:59 +0000 (18:14 -0700)]
[SCSI] megaraid_sas: Clear FUSION_IN_RESET before enabling interrupts

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] megaraid_sas: Clear state change interrupts
adam radford [Sun, 9 Oct 2011 01:14:50 +0000 (18:14 -0700)]
[SCSI] megaraid_sas: Clear state change interrupts

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] megaraid_sas: Remove some unnecessary code
adam radford [Sun, 9 Oct 2011 01:14:45 +0000 (18:14 -0700)]
[SCSI] megaraid_sas: Remove some unnecessary code

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] megaraid_sas: Fix mismatch in megasas_reset_fusion() mutex lock-unlock
adam radford [Sun, 9 Oct 2011 01:14:39 +0000 (18:14 -0700)]
[SCSI] megaraid_sas: Fix mismatch in megasas_reset_fusion() mutex lock-unlock

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] megaraid_sas: Increase default cmds per lun to 256
adam radford [Sun, 9 Oct 2011 01:14:33 +0000 (18:14 -0700)]
[SCSI] megaraid_sas: Increase default cmds per lun to 256

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] megaraid_sas: Continue booting immediately if FW in FAULT at driver load time
adam radford [Sun, 9 Oct 2011 01:14:27 +0000 (18:14 -0700)]
[SCSI] megaraid_sas: Continue booting immediately if FW in FAULT at driver load time

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: Update driver version to 5.02.00-k8
Vikas Chaudhary [Fri, 7 Oct 2011 23:55:52 +0000 (16:55 -0700)]
[SCSI] qla4xxx: Update driver version to 5.02.00-k8

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>
13 years ago[SCSI] qla4xxx: updated device id check for BFS.
Manish Rangankar [Fri, 7 Oct 2011 23:55:51 +0000 (16:55 -0700)]
[SCSI] qla4xxx: updated device id check for BFS.

JIRA Key: UPSISCSI-75

Signed-off-by: Manish Rangankar <manish.rangankar@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>
13 years ago[SCSI] qla4xxx: Fixed target discovery failed issue.
Manish Rangankar [Fri, 7 Oct 2011 23:55:50 +0000 (16:55 -0700)]
[SCSI] qla4xxx: Fixed target discovery failed issue.

When sendtargets response is greater then max receive data segment length,
the passthrough IOCB failed with data overrun status. Solution is to
allocate space for iSCSI header in the IOCB response buffer.

JIRA Key: UPSISCSI-147

Signed-off-by: Manish Rangankar <manish.rangankar@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>
13 years ago[SCSI] qla4xxx: Fixed active session re-open issue.
Manish Rangankar [Fri, 7 Oct 2011 23:55:49 +0000 (16:55 -0700)]
[SCSI] qla4xxx: Fixed active session re-open issue.

When iscsid restarted for an existing active session, set DDB will
fail with status already logged in. In this case, we have to send
logged in event to iscsid.

JIRA Key: OPENISCSI-21

Signed-off-by: Manish Rangankar <manish.rangankar@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>
13 years ago[SCSI] qla4xxx: Fixed device blocked issue on link up-down.
Manish Rangankar [Fri, 7 Oct 2011 23:55:48 +0000 (16:55 -0700)]
[SCSI] qla4xxx: Fixed device blocked issue on link up-down.

Devices are getting blocked during continuous link up and down.
Solution is, during relogin unblock the session, using iscsi_conn_start,
before sending connection logged in event.

JIRA Key: UPSISCSI-138

Signed-off-by: Manish Rangankar <manish.rangankar@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>
13 years ago[SCSI] qla4xxx: Fixed session destroy issue on link up-down.
Manish Rangankar [Fri, 7 Oct 2011 23:55:47 +0000 (16:55 -0700)]
[SCSI] qla4xxx: Fixed session destroy issue on link up-down.

During link down, iscsid tries to do re-login to failed session. In case of
link down-up-down, LLD was sending connection login failed event to iscsid,
which is destroying the session, instead we have to continue re-login by
sending connection err event.

JIRA Key: UPSISCSI-134

Signed-off-by: Manish Rangankar <manish.rangankar@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>
13 years ago[SCSI] qla4xxx: Clear DDB map index on the basis of AEN.
Manish Rangankar [Fri, 7 Oct 2011 23:55:46 +0000 (16:55 -0700)]
[SCSI] qla4xxx: Clear DDB map index on the basis of AEN.

Unable to login to session if login-logout issued consecutively for
multiple sessions. Solution is to clear idx in DDB map on the basis
of no-active connection asynchronous event (AEN).

JIRA Key: UPSISCSI-135

Signed-off-by: Manish Rangankar <manish.rangankar@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>
13 years ago[SCSI] qla4xxx: Free Device Database (DDB) reserved by FW
Lalit Chandivade [Fri, 7 Oct 2011 23:55:45 +0000 (16:55 -0700)]
[SCSI] qla4xxx: Free Device Database (DDB) reserved by FW

Firmware reserves DDBs if there are entries in the FLASH.
So there are no free DDBs left when a iSCSI login is initiated
by user space tool like iscsiadm.
Since now login is not controlled by firmware, LLD need to free
up the DDBs after firmware init. This will ensure free DDBs are
available for iSCSI logins using iscsiadm.

JIRA Key: UPSISCSI-151

Signed-off-by: Lalit Chandivade <lalit.chandivade@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>
13 years ago[SCSI] qla4xxx: Fix getting BIDI CHAP for boot targets
Lalit Chandivade [Fri, 7 Oct 2011 23:55:44 +0000 (16:55 -0700)]
[SCSI] qla4xxx: Fix getting BIDI CHAP for boot targets

If a boot target has a BIDI CHAP enabled, then read the user/secret from
CHAP table. Do not assume BIDI chap at peer CHAP index + 1

JIRA Key: UPSISCSI-156

Signed-off-by: Lalit Chandivade <lalit.chandivade@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>
13 years ago[SCSI] qla4xxx: Fix exporting boot targets to sysfs
Lalit Chandivade [Fri, 7 Oct 2011 23:55:43 +0000 (16:55 -0700)]
[SCSI] qla4xxx: Fix exporting boot targets to sysfs

The driver failed to export primary boot target if secondary target did not
exist in the FLASH. If boot targets are not valid then driver assumed 0 and
1 as default boot targets. Since these target did not exist in flash, the
driver failed exporting all the targets.

JIRA Key: UPSISCSI-148

Signed-off-by: Lalit Chandivade <lalit.chandivade@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>
13 years ago[SCSI] qla4xxx: Do not add duplicate CHAP entry in FLASH
Lalit Chandivade [Fri, 7 Oct 2011 23:55:42 +0000 (16:55 -0700)]
[SCSI] qla4xxx: Do not add duplicate CHAP entry in FLASH

QLogic applications store the CHAP information in FLASH. During login,
authentication information is provided using an index into the CHAP region.

In order to support QLogic applications along with iscsiadm, updated the
LLD to not add duplicate CHAP entries in the CHAP region and preserve the
existing CHAP info in the CHAP region in FLASH.
This allows QLogic applications to pre-write the CHAP entries in the
CHAP region.

With iscsiadm, when the CHAP authentication information is sent to the LLD, the
LLD searches for the entry in CHAP region in FLASH, if exists then do not add.
If CHAP entry does not exist then add the CHAP entry in the CHAP region.

JIRA Key: UPSISCSI-146

Signed-off-by: Lalit Chandivade <lalit.chandivade@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>
13 years ago[SCSI] qla4xxx: Fix bidirectional CHAP.
Lalit Chandivade [Fri, 7 Oct 2011 23:55:41 +0000 (16:55 -0700)]
[SCSI] qla4xxx: Fix bidirectional CHAP.

Driver was not setting the bidirectional CHAP bit correctly in
the DDB entry.

JIRA Key: UPSISCSI-108

Signed-off-by: Lalit Chandivade <lalit.chandivade@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>
13 years ago[SCSI] qla4xxx: Update license
Vikas Chaudhary [Fri, 7 Oct 2011 23:55:40 +0000 (16:55 -0700)]
[SCSI] qla4xxx: Update license

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>
13 years ago[SCSI] qla4xxx: Add new FLT firmware region
Nilesh Javali [Fri, 7 Oct 2011 23:55:39 +0000 (16:55 -0700)]
[SCSI] qla4xxx: Add new FLT firmware region

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>
13 years ago[SCSI] be2iscsi: Move driver Version to 4.1.239.0
Jayamohan Kallickal [Sat, 8 Oct 2011 00:31:12 +0000 (19:31 -0500)]
[SCSI] be2iscsi: Move driver Version to 4.1.239.0

Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] be2iscsi: memset wrb for ring create
Jayamohan Kallickal [Sat, 8 Oct 2011 00:31:11 +0000 (19:31 -0500)]
[SCSI] be2iscsi: memset wrb for ring create

   This patch fixes a situation when  wrb was not being memset to zero
before being used

Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] be2iscsi: Fix for case where task->sc was cleanedup earlier
Jayamohan Kallickal [Sat, 8 Oct 2011 00:31:10 +0000 (19:31 -0500)]
[SCSI] be2iscsi: Fix for case where task->sc was cleanedup earlier

This patch fixes a bug where the task->sc was cleaned up earlier on a
different thread, possibly abort, and the completion comes later.

This was causing a crash which has been reported in multiple places

Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] be2iscsi: Fix for wrong dmsg setting in wrb
Jayamohan Kallickal [Sat, 8 Oct 2011 00:31:09 +0000 (19:31 -0500)]
[SCSI] be2iscsi: Fix for wrong dmsg setting in wrb

   This patch fixes wrong dmsg setting when we send out wrb.

If the ttt is not ISCSI_RESERVED_TAG then we should be setting
dmsg=1 so that the completion is done without waiting for a
iscsi level response from the target

Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] be2iscsi: Fix for kdump failure
Jayamohan Kallickal [Sat, 8 Oct 2011 00:31:08 +0000 (19:31 -0500)]
[SCSI] be2iscsi: Fix for kdump failure

This patch fixes the Kdump failure reported by Redhat wich was caused by
be2iscsi resetting the Chip when be2iscsi detects it is in crashdump mode. If
be2net was loaded before be2iscsi then this leaves be2net driver hanging on to
resources that the chip stopped recognising after the reset.

This patch replaces  chip reset with Function reset so that only the
particular function and not the whole chip is affected

Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qlogicpti: fix timeout
Meelis Roos [Fri, 7 Oct 2011 15:05:08 +0000 (18:05 +0300)]
[SCSI] qlogicpti: fix timeout

qlogicpti times out for some tape library operations (like mtx
inventory). It seems SCSI command timeout is hardcoded into the driver.
Fix it by propagating the timeout from scsi request to the controller as
suggested by James Bottomley.

Tested on Sun Ultra 1 with Sun StorEdge L8 Autoloader.

Signed-off-by: Meelis Roos <mroos@linux.ee>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] scsi_dh_alua: Add one more check-condition for alua handler
Moger, Babu [Thu, 6 Oct 2011 17:22:07 +0000 (13:22 -0400)]
[SCSI] scsi_dh_alua: Add one more check-condition for alua handler

This patch adds one more check-condition for scsi_dh_alua handler. Without
this, the handler attach fails sometimes during the discovery. I have noticed
this with NetApp E-Series storage with alua mode. Also removed some
unnecessary brackets {} for consistency.

Signed-off-by: Babu Moger <babu.moger@netapp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] ipr: Add support to flash FPGA and flash back DRAM images
Wayne Boyer [Tue, 4 Oct 2011 03:54:37 +0000 (20:54 -0700)]
[SCSI] ipr: Add support to flash FPGA and flash back DRAM images

The write buffer command is used to download and burn new IOA FW images.
The same interface can now be used to flash FPGA and flash back DRAM images.
To download and flash the new images takes more than 15 minutes, so increase
the write buffer command timeout to 30 minutes.

The FPGA and flash back DRAM images don't have the same card_type as the IOA FW
image. So, remove the sanity checking from the driver.  The adapter has sanity
checking and will only accept a valid image.

Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] libsas: fix port->dev_list locking
Dan Williams [Thu, 22 Sep 2011 05:05:34 +0000 (22:05 -0700)]
[SCSI] libsas: fix port->dev_list locking

port->dev_list maintains a list of devices attached to a given sas root port.
It needs to be mutated under a lock as contexts outside of the
single-threaded-libsas-workqueue access the list via sas_find_dev_by_rphy().
Fixup locations where the list was being mutated without a lock.

This is a follow-up to commit 5911e963 "[SCSI] libsas: remove expander
from dev list on error", where Luben noted [1]:

    > 2/ We have unlocked list manipulations in sas_ex_discover_end_dev(),
    > sas_unregister_common_dev(), and sas_ex_discover_end_dev()

    Yes, I can see that and that is very unfortunate.

[1]: http://marc.info/?l=linux-scsi&m=131480962006471&w=2

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Bumped version to 1.0.8
Bhanu Prakash Gollapudi [Mon, 3 Oct 2011 23:45:03 +0000 (16:45 -0700)]
[SCSI] bnx2fc: Bumped version to 1.0.8

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Return error statistics of remote peer
Bhanu Prakash Gollapudi [Mon, 3 Oct 2011 23:45:02 +0000 (16:45 -0700)]
[SCSI] bnx2fc: Return error statistics of remote peer

Add support for get_lesb so that the valid statistics are returned by the
remote peer when RLS command is issued.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] fcoe,libfcoe: Move common code for fcoe_get_lesb to fcoe_transport
Bhanu Prakash Gollapudi [Mon, 3 Oct 2011 23:45:01 +0000 (16:45 -0700)]
[SCSI] fcoe,libfcoe: Move common code for fcoe_get_lesb to fcoe_transport

Except for obtaining the netdev from lport, fcoe_get_lesb is the common code
for the LLDs.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Acked-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: call ctlr_link_up only when the interface is enabled
Bhanu Prakash Gollapudi [Mon, 3 Oct 2011 23:45:00 +0000 (16:45 -0700)]
[SCSI] bnx2fc: call ctlr_link_up only when the interface is enabled

Link may not be up when the driver receives ulp_start event, and hence
fcoe_ctlr_link_up is not called. Call fcoe_ctlr_link_up during
indicate_netevent only when the interface is enabled. (It has to be called when
enabled because that is an indication that the vlan discovery is completed).

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: export phy events via ->lldd_control_phy()
Dan Williams [Thu, 29 Sep 2011 01:48:02 +0000 (18:48 -0700)]
[SCSI] isci: export phy events via ->lldd_control_phy()

Allow the sas-transport-class to update events for local phys via a new
PHY_FUNC_GET_EVENTS command to ->lldd_control_phy().  Fixup drivers that
are not prepared for new enum phy_func values, and unify
->lldd_control_phy() error codes.

These are the SAS defined phy events that are reported in a
smp-report-phy-error-log command:
 * /sys/class/sas_phy/<phyX>/invalid_dword_count
 * /sys/class/sas_phy/<phyX>/running_disparity_error_count
 * /sys/class/sas_phy/<phyX>/loss_of_dword_sync_count
 * /sys/class/sas_phy/<phyX>/phy_reset_problem_count

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: The port state should be set to stopping on the last phy.
Jeff Skirvin [Thu, 29 Sep 2011 01:47:56 +0000 (18:47 -0700)]
[SCSI] isci: The port state should be set to stopping on the last phy.

Fixes a bug where any phy removed from the port set the port
state to "stopping" - do this only when the last phy removed
from the port.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: fix decode of DONE_CRC_ERR TC completion status
Jeff Skirvin [Thu, 29 Sep 2011 01:47:51 +0000 (18:47 -0700)]
[SCSI] isci: fix decode of DONE_CRC_ERR TC completion status

DONE_CRC_ERR is not a RNC suspension condition, so do not change the
state to expect the incoming suspension notification.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
[djbw: dropped DONE_CMD_LL_R_ERR change]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: SATA/STP I/O is only returned in the normal path to libsas
Jeff Skirvin [Thu, 29 Sep 2011 01:47:46 +0000 (18:47 -0700)]
[SCSI] isci: SATA/STP I/O is only returned in the normal path to libsas

Since libsas has it's own means to escalate SATA/STP device error
handling depending on task status codes, return all SATA/STP I/O
on the normal path.

i.e. skip sas_task_abort() and let sas_ata_task_done() disposition the
qc.  Longer term we want to audit non-essential calls to
sas_task_abort().

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: atapi support
Dan Williams [Sat, 1 Oct 2011 01:52:19 +0000 (18:52 -0700)]
[SCSI] isci: atapi support

Based on original implementation from Jiangbi Liu and Maciej Trela.

ATAPI transfers happen in two-to-three stages.  The two stage atapi
commands are those that include a dma data transfer.  The data transfer
portion of these operations is handled by the hardware packet-dma
acceleration.  The three-stage commands do not have a data transfer and
are handled without hardware assistance in raw frame mode.

stage1: transmit host-to-device fis to notify the device of an incoming
atapi cdb.  Upon reception of the pio-setup-fis repost the task_context
to perform the dma transfer of the cdb+data (go to stage3), or repost
the task_context to transmit the cdb as a raw frame (go to stage 2).

stage2: wait for hardware notification of the cdb transmission and then
go to stage 3.

stage3: wait for the arrival of the terminating device-to-host fis and
terminate the command.

To keep the implementation simple we only support ATAPI packet-dma
protocol (for commands with data) to avoid needing to handle the data
transfer manually (like we do for SATA-PIO).  This may affect
compatibility for a small number of devices (see
ATA_HORKAGE_ATAPI_MOD16_DMA).

If the data-transfer underruns, or encounters an error the
device-to-host fis is expected to arrive in the unsolicited frame queue
to pass to libata for disposition.  However, in the DONE_UNEXP_FIS (data
underrun) case it appears we need to craft a response.  In the
DONE_REG_ERR case we do receive the UF and propagate it to libsas.

Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mvsas: update driver version
Xiangliang Yu [Thu, 29 Sep 2011 07:35:38 +0000 (00:35 -0700)]
[SCSI] mvsas: update driver version

This will synchronize the version string with internal driver.

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mvsas: fixed SMP request watchdog timeout issue.
Xiangliang Yu [Thu, 29 Sep 2011 07:35:15 +0000 (00:35 -0700)]
[SCSI] mvsas: fixed SMP request watchdog timeout issue.

set SMP link timeout value to maximum.

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mvsas: expander write performance enhancement
Xiangliang Yu [Thu, 29 Sep 2011 07:34:55 +0000 (00:34 -0700)]
[SCSI] mvsas: expander write performance enhancement

with 1 expander, connect 8 HDD, the write performance will be
improved by 80%.

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mvsas: change SL mode0 register value
Xiangliang Yu [Thu, 29 Sep 2011 07:34:32 +0000 (00:34 -0700)]
[SCSI] mvsas: change SL mode0 register value

-- change connection behavior
-- set bit8 to 1 for performance tuning
-- set bit0 to 0 to enable retry for no_dest reject case.

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mvsas: fixed wrong destination when hiting NAK for command frame
Xiangliang Yu [Thu, 29 Sep 2011 07:34:11 +0000 (00:34 -0700)]
[SCSI] mvsas: fixed wrong destination when hiting NAK for command frame

disable non data frame retry

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mvsas: fixed some disk spin up issue
Xiangliang Yu [Thu, 29 Sep 2011 07:33:49 +0000 (00:33 -0700)]
[SCSI] mvsas: fixed some disk spin up issue

spin up issue: some direct attached SAS device can't spin up

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mvsas: add support for 9480 device id
Xiangliang Yu [Thu, 29 Sep 2011 07:33:24 +0000 (00:33 -0700)]
[SCSI] mvsas: add support for 9480 device id

Add support for Marvell 88SE9480 SAS/SATA HBA

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mvsas: fix expander link error
Xiangliang Yu [Thu, 29 Sep 2011 07:32:37 +0000 (00:32 -0700)]
[SCSI] mvsas: fix expander link error

Expanders fail to link when the phy rates are mismatched.

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: fix missed unlock in apc_agent_timeout()
Jeff Skirvin [Thu, 29 Sep 2011 01:35:32 +0000 (18:35 -0700)]
[SCSI] isci: fix missed unlock in apc_agent_timeout()

Needed to jump to scic_lock unlock.

Also spotted by coccicheck.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Cc: <stable@kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: fix support for large smp requests
Dan Williams [Thu, 29 Sep 2011 01:35:27 +0000 (18:35 -0700)]
[SCSI] isci: fix support for large smp requests

Kill the local smp response buffer.

Besides being unnecessary, it is too small (currently truncates
responses to 60 bytes).  The mid-layer will have already allocated a
sufficiently sized buffer, just kmap and copy into it directly.

Cc: <stable@kernel.org>
Reported-by: Derick Marks <derick.w.marks@intel.com>
Tested-by: Derick Marks <derick.w.marks@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] pm8001: missing break statements
Mark Salyzyn [Mon, 26 Sep 2011 14:57:36 +0000 (07:57 -0700)]
[SCSI] pm8001: missing break statements

Code Inspection: found two missing break directives. First one will
result in not retrying an a task that report
IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY, the second will result in cosmetic
debug printk conflicting statement stutter. Because checkpatch.pl came
up with a warning regarding unnecessary space before a newline on one of
the fragments associated with the diff context, I took the liberty of
fixing all the cases of this issue in the pair of files touched by this
defect. These cosmetic changes hide the break changes :-(

To help focus, break changes are in pm8001_hwi.c fragment line 1649 for
the IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY case statement and pm8001_sas.c
line 1000 deals with the conflicting debug print stutter.

Signed-off-by: Mark Salyzyn <mark_salyzyn@us.xyratex.com>
Acked-by: Jack Wang <jack_wang@usish.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] pm8001: fix DEV_IS_GONE infinite retry
Mark Salyzyn [Thu, 22 Sep 2011 15:50:01 +0000 (08:50 -0700)]
[SCSI] pm8001: fix DEV_IS_GONE infinite retry

On the pm8001, when a device is in the process of going away (device
power off or hot plug), depending on the timing, the driver would return
SAS_PHY_DOWN as the return value to the queuecommand DEV_IS_GONE logic.
The net result is an near infinite retry (especially if SAS debugging is
enabled), the logs will fill with:

kernel: mpi_ssp_completion 2119:e21:SSP IO status 0x13 tag 0xcc1c0000
dlen=90 param=0xe
kernel: wwn=5000c50034069e86  cdb=12 00 00 00 5a 00 00 00 00 00 00 00 00
00 00 00
kernel: sas: lldd_execute_task returned: 138
kernel: sas: lldd_execute_task returned: 138
kernel: sas: lldd_execute_task returned: 138
kernel: sas: lldd_execute_task returned: 138
kernel: sas: lldd_execute_task returned: 138
kernel: sas: lldd_execute_task returned: 138
kernel: sas: lldd_execute_task returned: 138
. . .

This patch changes to leverage the port_attached logic to complete the
command with a status of PHY_DOWN so that the disposition can be handled
immediately and correctly.

Signed-off-by: Mark Salyzyn <mark_salyzyn@us.xyratex.com>
Acked-by: Jack Wang <jack_wang@usish.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] fcoe: setup default initial value for DDP threshold
Vasu Dev [Wed, 28 Sep 2011 04:38:18 +0000 (21:38 -0700)]
[SCSI] fcoe: setup default initial value for DDP threshold

Currently fcoe_ddp_min doesn't have default value
so by default not used, so setting up default value
as 4k as this works better by avoiding overhead
of programing DDP for small IOs.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] fcoe: use real dev in case of HW vlan acceleration
Vasu Dev [Wed, 28 Sep 2011 04:38:13 +0000 (21:38 -0700)]
[SCSI] fcoe: use real dev in case of HW vlan acceleration

Use real dev in case it has HW vlan acceleration
support since in this case the real dev would
do needed vlan processing, this way unnecessary
vlan layer processing avoided and it gives
slightly better IOPS with 512B size IOs.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] libfc: cache align fc_exch_pool
Vasu Dev [Wed, 28 Sep 2011 04:38:08 +0000 (21:38 -0700)]
[SCSI] libfc: cache align fc_exch_pool

fix holes and better cache aligned fields.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] libfc: cache align struct fc_exch fields
Vasu Dev [Wed, 28 Sep 2011 04:38:02 +0000 (21:38 -0700)]
[SCSI] libfc: cache align struct fc_exch fields

cache aligned xid and ex_lock beside
removing holes.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] libfc: cache align struct fc_fcp_pkt fields
Vasu Dev [Wed, 28 Sep 2011 04:37:57 +0000 (21:37 -0700)]
[SCSI] libfc: cache align struct fc_fcp_pkt fields

Re-arrange its fields to avoid padding and have better
cacheline alignments.

Removed not used start_time, end_time and last_pkt_time
fields.

This all reduced this struct size to 448 from 480 and
that also reduced one cacheline on x86_64 beside
eliminating 8 pads. However kept logical fields together.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] fcoe: use kthread_create_on_node
Eric Dumazet [Wed, 28 Sep 2011 04:37:52 +0000 (21:37 -0700)]
[SCSI] fcoe: use kthread_create_on_node

Since fcoe_percpu_thread_create() creates percpu kthread, it makes sense
to use kthread_create_on_node() to get proper NUMA affinity for kthread
stack.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] libsas: fix warnings when checking sata/stp protocol
Dan Williams [Sat, 24 Sep 2011 01:09:11 +0000 (18:09 -0700)]
[SCSI] libsas: fix warnings when checking sata/stp protocol

Several sas drivers legitimately check the protocol against the union of
SAS_PROTOCOL_SATA and SAS_PROTOCOL_STP.  Provide a SAS_PROTOCOL_STP_ALL
to silence warnings like:

drivers/scsi/pm8001/pm8001_sas.c:438:3: warning: case value â€˜5’ not in enumerated type â€˜enum sas_protocol’ [-Wswitch]
drivers/scsi/mvsas/mv_sas.c:798:2: warning: case value â€˜5’ not in enumerated type â€˜enum sas_protocol’ [-Wswitch]
drivers/scsi/mvsas/mv_sas.c:1783:2: warning: case value â€˜5’ not in enumerated type â€˜enum sas_protocol’ [-Wswitch]
drivers/scsi/mvsas/mv_sas.c:1886:2: warning: case value â€˜5’ not in enumerated type â€˜enum sas_protocol’ [-Wswitch]
drivers/scsi/isci/request.c:3565:2: warning: case value â€˜5’ not in enumerated type â€˜enum sas_protocol’ [-Wswitch]

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] libsas: set sas_address and device type of rphy
Jack Wang [Fri, 23 Sep 2011 06:32:32 +0000 (14:32 +0800)]
[SCSI] libsas: set sas_address and device type of rphy

Libsas forget to set the sas_address and device type of rphy lead to file
under /sys/class/sas_x show wrong value, fix that.

Signed-off-by: Jack Wang <jack_wang@usish.com>
Tested-by: Crystal Yu <crystal_yu@usish.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] libsas: fix try_test_sas_gpio_gp_bit() build error
Dan Williams [Fri, 23 Sep 2011 23:43:45 +0000 (16:43 -0700)]
[SCSI] libsas: fix try_test_sas_gpio_gp_bit() build error

If the user has disabled CONFIG_SCSI_SAS_HOST_SMP then libsas drivers
will not be receiving smp-gpio frames and do not need this lookup code.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Tested-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] pm8001: remove pm8001_slave_{alloc|configure}
Dan Williams [Tue, 20 Sep 2011 22:11:03 +0000 (15:11 -0700)]
[SCSI] pm8001: remove pm8001_slave_{alloc|configure}

libsas handles:
1/ limiting ata scanning to lun0
2/ changes to /sys/block/<sdX>/device/queue_depth for ata devices

libata handles turning off ncq globally via kernel command line
(libata.force=noncq) or sysfs (echo 1 >
/sys/block/<sdX>/device/queue_depth).  A lldd specific compile option is
not necessary.

Cc: Jack Wang <jack_wang@usish.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mvsas: remove mvs_slave_{alloc|configure}
Dan Williams [Tue, 20 Sep 2011 22:10:55 +0000 (15:10 -0700)]
[SCSI] mvsas: remove mvs_slave_{alloc|configure}

libsas now handles:
1/ limiting ata scanning to lun0
2/ maximizing the queue_depth of sas devices (up to 256, mvsas only
   supports 64)
3/ changes to /sys/block/<sdX>/device/queue_depth for ata devices

Acked-by: Xiangliang Yu <yuxiangl@marvell.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] libsas: dynamic queue depth
Dan Williams [Tue, 20 Sep 2011 22:10:46 +0000 (15:10 -0700)]
[SCSI] libsas: dynamic queue depth

The queue-depth for libsas-attached devices initializes to 32 and can
only be increased manually via sysfs to a max of 64, while mpt2sas
attached devices initialize to 254 and dynamically float via the
midlayer ->change_queue_depth interface.

No performance regression was observed with this change on the isci
driver.

Tested-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] libsas,libata: fix ->change_queue_{depth|type} for sata devices
Dan Williams [Tue, 20 Sep 2011 22:10:33 +0000 (15:10 -0700)]
[SCSI] libsas,libata: fix ->change_queue_{depth|type} for sata devices

Pass queue_depth change requests to libata, and prevent queue_type
changes for ATA devices.

Otherwise:
1/ we do not honor the libata specific restrictions on the queue depth
2/ libsas drivers that do not set sdev->tagged_supported are unable to
   change the queue_depth of ata devices via sysfs

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] libsas: disable scanning lun > 0 on ata devices
Dan Williams [Tue, 20 Sep 2011 22:10:19 +0000 (15:10 -0700)]
[SCSI] libsas: disable scanning lun > 0 on ata devices

Currently mvsas and pm8001 have custom ->slave_alloc implementations to
achieve this.  Uplevel it for all libsas drivers as isci encounters problems
with atapi devices when scanning past lun0.

Just do what Darrick suggested [1], and limit the scan for ata devices.

[1] http://marc.info/?l=linux-scsi&m=116604101119861&w=2

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] libsas: Allow expander T-T attachments
Luben Tuikov [Thu, 22 Sep 2011 16:41:36 +0000 (09:41 -0700)]
[SCSI] libsas: Allow expander T-T attachments

Allow expander table-to-table attachments for
expanders that support it.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] ipr: Stop reading adapter dump prematurely
Brian King [Wed, 21 Sep 2011 13:51:11 +0000 (08:51 -0500)]
[SCSI] ipr: Stop reading adapter dump prematurely

When the ipr driver decides to dump the adapter, it changes the
sdt_state to GET_DUMP, then prepares the adapter so that the dump
can be read. However, if the ipr worker thread wakes up for some
reason before the driver has put the adapter in a state where it
can succesfully dump the adapter, the driver will start dumping
the adapter too early, which can potentially trigger a BUG check
in the pci config blocking API. Fix this by adding a new
sdt_state to differentiate between the ipr driver wanting to dump
the adapter in the near future and wanting to dump the adapter now.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] scsi_dh_rdac: Adding NetApp as a brand name for rdac
Chauhan, Vijay [Fri, 2 Sep 2011 07:56:32 +0000 (13:26 +0530)]
[SCSI] scsi_dh_rdac: Adding NetApp as a brand name for rdac

Signed-off-by: Vijay Chauhan <Vijay.chauhan@netapp.com>
Reviewed-by: Bob Stankey <Robert.stankey@netapp.com>
Reviewed-by: Babu Moger <Babu.moger@netapp.com>
Acked-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Bumped version to 1.0.7
Bhanu Prakash Gollapudi [Mon, 19 Sep 2011 23:52:14 +0000 (16:52 -0700)]
[SCSI] bnx2fc: Bumped version to 1.0.7

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Handle bnx2fc_map_sg failure
Bhanu Prakash Gollapudi [Mon, 19 Sep 2011 23:52:13 +0000 (16:52 -0700)]
[SCSI] bnx2fc: Handle bnx2fc_map_sg failure

Gracefully handle bnx2fc_map_sg failure, so that queuecommand returns host busy
and SCSI-ml can retry the IO.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Replace scsi_dma_map() with dma_map_sg().
Bhanu Prakash Gollapudi [Mon, 19 Sep 2011 23:52:12 +0000 (16:52 -0700)]
[SCSI] bnx2fc: Replace scsi_dma_map() with dma_map_sg().

scsi_dma_map doesn't work for NPIV since vport dev isn't fully initialized.

For more details: http://marc.info/?l=linux-scsi&m=118312448030633&w=2 and
commit - c59fd9ebc46da8d48b76955d4d48e3597f8c8726.

Signed-off-by: Nithin Sujir <nsujir@broadcom.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mptfusion: Added check for SILI bit in READ_16 CDB for DATA UNDERRUN ERRATA
nagalakshmi.nandigama@lsi.com [Mon, 19 Sep 2011 04:57:20 +0000 (10:27 +0530)]
[SCSI] mptfusion: Added check for SILI bit in READ_16 CDB for DATA UNDERRUN ERRATA

When READ_16 command is issued, the setting of SILI Bit in CDB is confirmed
and if SILI bit is off, the processing of relavent Errata is executed.

Added code for checking SILI bit for READ_16 as described in "SSC-4".

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mpt2sas: take size of pointed value, not pointer
Julia Lawall [Fri, 16 Sep 2011 06:57:34 +0000 (08:57 +0200)]
[SCSI] mpt2sas: take size of pointed value, not pointer

Sizeof a pointer-typed expression returns the size of the pointer, not that
of the pointed data.

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

// <smpl>
@@
expression *e;
type T;
identifier f;
@@

f(...,(T)e,...,
-sizeof(e)
+sizeof(*e)
,...)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Add driver documentation
Bhanu Prakash Gollapudi [Tue, 13 Sep 2011 18:55:14 +0000 (11:55 -0700)]
[SCSI] bnx2fc: Add driver documentation

bnx2fc.txt outlines the driver usage model.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mac_esp: remove redundant mutual exclusion
Finn Thain [Sun, 11 Sep 2011 09:57:51 +0000 (19:57 +1000)]
[SCSI] mac_esp: remove redundant mutual exclusion

Mutual exclusion is redundant here because all the paths in the call graph
leading to esp_driver_ops.send_dma_cmd() happen under spin_lock_irqsave/
spin_lock_irqrestore. Remove it.

Tested on a Mac Quadra 660av and a Mac LC 630.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mpt2sas: Bump driver version 09.100.00.01
nagalakshmi.nandigama@lsi.com [Thu, 8 Sep 2011 01:43:35 +0000 (07:13 +0530)]
[SCSI] mpt2sas: Bump driver version 09.100.00.01

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mpt2sas: Added NUNA IO support in driver which uses multi-reply queue support...
nagalakshmi.nandigama@lsi.com [Thu, 8 Sep 2011 00:48:50 +0000 (06:18 +0530)]
[SCSI] mpt2sas: Added NUNA IO support in driver which uses multi-reply queue support of the HBA

Support added for controllers capable of multi reply queues.

The following are the modifications to the driver to support NUMA.

1) Create the new structure adapter_reply_queue to contain the reply queue
   info for every msix vector.  This object will contain a
   reply_post_host_index, reply_post_free for each instance, msix_index, among
   other parameters.  We will track all the reply queues on a link list called
   ioc->reply_queue_list. Each reply queue is aligned with each IRQ, and is
   passed to the interrupt via the bus_id parameter.

(2) The driver will figure out the msix_vector_count from the PCIe MSIX
    capabilities register instead of the IOC Facts->MaxMSIxVectors. This is
    because the firmware is not filling in this field until the driver has
    already registered MSIX support.

(3) If the ioc_facts reports that the controller is MSIX compatible in the
    capabilities, then the driver will request for multiple irqs.  This count
    is calculated based on the minimum between the online cpus available and
    the ioc->msix_vector_count.  This count is reported to firmware in the
    ioc_init request.

(4) New routines were added _base_free_irq and _base_request_irq, so
    registering and freeing msix vectors were done thru simple function API.

(5) The new routine _base_assign_reply_queues was added to align the msix
    indexes across cpus. This will initialize the array called
    ioc->cpu_msix_table.  This array is looked up on every MPI request so the
    MSIxIndex is set appropriately.

(6) A new shost sysfs attribute was added to report the reply_queue_count.

(7) User needs to set the affinity cpu mask, so the interrupts occur on the
    same cpu that sent the original request.

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] scsi_dh_rdac: Adding couple more vendor product ids
Moger, Babu [Fri, 2 Sep 2011 15:21:17 +0000 (11:21 -0400)]
[SCSI] scsi_dh_rdac: Adding couple more vendor product ids

This patch adds couple more Vendor/Product IDs for RDAC.. There are no
functional changes.

Signed-off-by: Babu Moger <babu.moger@netapp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: initial sgpio write support
Dan Williams [Fri, 2 Sep 2011 04:18:31 +0000 (21:18 -0700)]
[SCSI] isci: initial sgpio write support

Basic support to initialize the gpio unit, accept an incomming
SAS_GPIO_REG_TX_GP bitstream, and translate it to the ODx.n fields in
the hardware registers.  If register indexes outside the supported range
are specified in the SMP frame we simply accept the write and return how
many registers (SFF-8485) were written (libsas reports this as residue
in the request).

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: fix sgpio register definitions
Dan Williams [Fri, 2 Sep 2011 04:18:26 +0000 (21:18 -0700)]
[SCSI] isci: fix sgpio register definitions

output_data_select registers are off by one u32

delete the macros we will never use.

Reported-by: Artur Wojcik <artur.wojcik@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] libsas: sgpio write support
Dan Williams [Fri, 2 Sep 2011 04:18:20 +0000 (21:18 -0700)]
[SCSI] libsas: sgpio write support

Add SFF-8485 v0.7 / SAS-1 smp-write-gpio register support to libsas.
Defer SAS-2 support unless/until it defines an sgpio interface.

Minimum implementation needed to get the lights blinking.
try_test_sas_gpio_gp_bit() provides a common method to parse the
incoming write data (raw bitstream), and the to_sas_gpio_gp_bit() helper
routine can be used as a basis for the set/clear operations for the
'read' implementation.  Host implementations parse as many bits
(ODx.[012]) as are locally supported and report the number of registers
successfully written.  If the submitted data overruns the internal
number of registers available report the write as a success with the
number of bytes remaining reported in ->resid_len.

Example (assuming an active backplane) set the "identify" pattern for
the first 21 devices:

smp_write_gpio --count=2 --data=92,49,24,92,24,92,49,24 -t 4 --index=1 /dev/bsg/sas_hostX

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: select iscsi boot sysfs attrs
Mike Christie [Thu, 1 Sep 2011 02:53:40 +0000 (21:53 -0500)]
[SCSI] qla4xxx: select iscsi boot sysfs attrs

qla4xxx now uses iscsi_boot_sysfs to export the targets used
for boot to sysfs. It needs to select that config option
to make sure that module is also built.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Bumped version to 1.0.6
Bhanu Prakash Gollapudi [Tue, 30 Aug 2011 22:54:54 +0000 (15:54 -0700)]
[SCSI] bnx2fc: Bumped version to 1.0.6

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Fix FW assert during RSCN stress tests
Bhanu Prakash Gollapudi [Tue, 30 Aug 2011 22:54:53 +0000 (15:54 -0700)]
[SCSI] bnx2fc: Fix FW assert during RSCN stress tests

Firmware asserts when the same CQE is armed twice. This scenario happens during
RSCN stress tests as driver incorrects arms the CQ after the session is
offloaded.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Fix panic caused because of incorrect errror handling in create().
Bhanu Prakash Gollapudi [Tue, 30 Aug 2011 22:54:52 +0000 (15:54 -0700)]
[SCSI] bnx2fc: Fix panic caused because of incorrect errror handling in create().

Driver incorrectly calls bnx2fc_interface_cleanup() when bnx2fc_if_create fails
which accesses bad pointer. Handle bnx2fc_if_create failure by directly calling
bnx2fc_net_cleanup.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Avoid calling bnx2fc_if_destroy with unnecessary locks
Bhanu Prakash Gollapudi [Tue, 30 Aug 2011 22:54:51 +0000 (15:54 -0700)]
[SCSI] bnx2fc: Avoid calling bnx2fc_if_destroy with unnecessary locks

It is not required to hold rtnl_lock and bnx2fc_dev_lock when calling
bnx2fc_if_destroy, as the locking is only required to serialize creation and
deletion of fcoe instances. More importantly, this unnecessary locking causes
deadlock as bnx2fc_if_destroy calls fc_remove_host holding rtnl_lock.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Validate vlan id in NETDEV_UNREGISTER handler
Nithin Nayak Sujir [Tue, 30 Aug 2011 22:54:50 +0000 (15:54 -0700)]
[SCSI] bnx2fc: Validate vlan id in NETDEV_UNREGISTER handler

When bnx2fc receives an UNREGISTER event on a vlan interface it calls
destroy on all interfaces that matches the physical interface. Add
vlan_id check to destroy only the vlan interface that generated the
event.

Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: No abort issued for REC when it times out
Bhanu Prakash Gollapudi [Tue, 30 Aug 2011 22:54:49 +0000 (15:54 -0700)]
[SCSI] bnx2fc: No abort issued for REC when it times out

ABTS was not issued for timed out REC, as REC completion handler exits out if
the IO completed. Check for timed out REC and issue ABTS before proceeding with
further processing in REC completion handler. Also, initialize rec_retry and
srr_retry before starting the IO.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Send solicitation only after vlan discovery is complete
Bhanu Prakash Gollapudi [Tue, 30 Aug 2011 22:54:48 +0000 (15:54 -0700)]
[SCSI] bnx2fc: Send solicitation only after vlan discovery is complete

Link up event is generated to the driver even before vlan discovery has
started. Because of this driver can send discovery solicitation on a stale
vlan. Call fcoe_ctlr_link_up() only when the driver is in enabled state, which
implies the vlan discovery is complete before sending solicitation.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Reset max receive frame size during link up
Bhanu Prakash Gollapudi [Tue, 30 Aug 2011 22:54:47 +0000 (15:54 -0700)]
[SCSI] bnx2fc: Reset max receive frame size during link up

If the max receive frame size is changed during link down, the driver uses the
same value after linkup unless it is reset to default.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] scsi_dh_alua: Decrease retry interval
Hannes Reinecke [Wed, 24 Aug 2011 08:51:19 +0000 (10:51 +0200)]
[SCSI] scsi_dh_alua: Decrease retry interval

The alua device handler starts the first retry after 10 seconds,
and increases it times 10 for each round.
This leads to an unnecessary delay. This patch modifies it to
start after one second, and increase by a factor of two.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] scsi_dh_alua: Fix Erroneous TPG ID check
Hannes Reinecke [Wed, 24 Aug 2011 08:51:18 +0000 (10:51 +0200)]
[SCSI] scsi_dh_alua: Fix Erroneous TPG ID check

For Target Portal Group IDs occupying the full 2 bytes in the
RTPG response, the following group_id check in the alua_rtpg
routine always fails in scsi_dh_alua.c:

if (h->group_id == (ucp[2] << 8) + ucp[3]) {

This causes the ALUA handler to wrongly identify the AAS of
a specified device as well as incorrectly interpreting the
supported AAS of the target as seen by the following entries
in the /var/log/messages:

"alua: port group 3ea state A supports tousna"
"alua: port group 3e9 state A supports tousna"

This is because 'ucp' is wrongly declared in alua_rtpg as
a character pointer instead of an unsigned character pointer.

Signed-off-by: Martin George <marting@netapp.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] scsi_dh: Check for sdev state in store_dh_state()
Hannes Reinecke [Wed, 24 Aug 2011 08:51:17 +0000 (10:51 +0200)]
[SCSI] scsi_dh: Check for sdev state in store_dh_state()

Avoid attaching a hardware handler to a device which is
already scheduled for deletion.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] scsi_dh_alua: always update TPGS status on activate
Hannes Reinecke [Wed, 24 Aug 2011 08:51:16 +0000 (10:51 +0200)]
[SCSI] scsi_dh_alua: always update TPGS status on activate

When activating a patch we should always update the TPGS state
as it might have changed in between.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] scsi_dh: Implement match callback function
Hannes Reinecke [Wed, 24 Aug 2011 08:51:15 +0000 (10:51 +0200)]
[SCSI] scsi_dh: Implement match callback function

Some device handler types are not tied to the vendor/model
but rather to a specific capability. Eg ALUA is supported
if the 'TPGS' setting in the standard inquiry is set.
This patch implements a 'match' callback for device handler
which supersedes the original vendor/model lookup and
implements the callback for the ALUA handler.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] scsi_dh: Fixup kernel-doc comments
Hannes Reinecke [Wed, 24 Aug 2011 08:51:14 +0000 (10:51 +0200)]
[SCSI] scsi_dh: Fixup kernel-doc comments

Fixup some kernel-doc comments to reference to the
correct function name.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] scsi_dh_alua: Evaluate TPGS setting from inquiry data
Hannes Reinecke [Wed, 24 Aug 2011 08:51:13 +0000 (10:51 +0200)]
[SCSI] scsi_dh_alua: Evaluate TPGS setting from inquiry data

Instead of issuing a standard inquiry from within the
alua device handler we can evaluate the TPGS setting from
the existing inquiry data of the sdev and save us the I/O.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] libsas: fix sas_queuecommand return values
Christoph Hellwig [Sat, 16 Jul 2011 19:00:35 +0000 (15:00 -0400)]
[SCSI] libsas: fix sas_queuecommand return values

->queuecommand must return either 0, or one of the SCSI_MLQUEUE_* return
values.  Non-transient errors are indicated by setting cmd->result before
calling ->scsi_done and returning 0.  Fix libsas to adhere to this calling
convention.  Note that the DID_ERROR for returns from the low-level driver
might not be correct for all cases, but it's the best we can do with
the current layering in libsas.  I also suspect that the pre-existing
handling of -SAS_QUEUE_FULL should really be SCSI_MLQUEUE_HOST_BUSY, but
I'll leave that for a separate change.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>