GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git
10 years ago[SCSI] qla4xxx: Improve loopback failure messages
Nilesh Javali [Mon, 16 Dec 2013 11:49:35 +0000 (06:49 -0500)]
[SCSI] qla4xxx: Improve loopback failure messages

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>
10 years ago[SCSI] qla4xxx: Use IDC_CTRL bit1 directly instead of AF_83XX_NO_FWDUMP flag.
Vikas Chaudhary [Mon, 16 Dec 2013 11:49:34 +0000 (06:49 -0500)]
[SCSI] qla4xxx: Use IDC_CTRL bit1 directly instead of AF_83XX_NO_FWDUMP flag.

Removed AF_83XX_NO_FWDUMP flag and directly checking IDC_CTRL bit1
while taking minidump, to check for graceful reset.

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>
10 years ago[SCSI] qla4xxx: Fix comments in code
Vikas Chaudhary [Mon, 16 Dec 2013 11:49:33 +0000 (06:49 -0500)]
[SCSI] qla4xxx: Fix comments in code

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>
10 years ago[SCSI] qla4xxx: Print WARN_ONCE() if iSCSI function presence bit removed
Vikas Chaudhary [Mon, 16 Dec 2013 11:49:32 +0000 (06:49 -0500)]
[SCSI] qla4xxx: Print WARN_ONCE() if iSCSI function presence bit removed

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>
10 years ago[SCSI] qla4xxx: ISP8xxx: Correct retry of adapter initialization
Nilesh Javali [Mon, 16 Dec 2013 11:49:31 +0000 (06:49 -0500)]
[SCSI] qla4xxx: ISP8xxx: Correct retry of adapter initialization

Issue:

For ISP8xxx, adapter initialization is not retried if
qla4xxx_initialize_adapter fails.

Fix:

If qla4xxx_initialize_adapter fails, first check if failure is due to IRQs not
attached in order to skip retrial, then free the IRQs and then retry
initializing the adapter.

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>
10 years ago[SCSI] be2iscsi : Bump the driver version
Jayamohan Kallickal [Wed, 29 Jan 2014 07:16:46 +0000 (02:16 -0500)]
[SCSI] be2iscsi : Bump the driver version

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] be2iscsi : Fix DMA Out of SW-IOMMU space error
Jayamohan Kallickal [Wed, 29 Jan 2014 07:16:45 +0000 (02:16 -0500)]
[SCSI] be2iscsi : Fix DMA Out of SW-IOMMU space error

Setting DMA bit mask 64 and roll back to 32 if not supported.

Signed-off-by: Minh Tran <minhduc.tran@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] be2iscsi: Fix scsi_cmnd leakage in driver.
Jayamohan Kallickal [Wed, 29 Jan 2014 07:16:44 +0000 (02:16 -0500)]
[SCSI] be2iscsi: Fix scsi_cmnd leakage in driver.

scsi_cmnd n io_task was not NULL when
 - Link goes down while IO was happening and session is closed.
 - Task for which TMF was sent.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] be2iscsi: Fix the session cleanup when reboot/shutdown happens
Jayamohan Kallickal [Wed, 29 Jan 2014 07:16:43 +0000 (02:16 -0500)]
[SCSI] be2iscsi: Fix the session cleanup when reboot/shutdown happens

In iSCSI Boot scenario, when machine is reboot/shutdown phase
the active sessions are not closed. Driver queue cleanup is
done as part of unload and device is disabled.

Sessions are still active, iSCSI commands are issued from
session which comes to driver, as driver cleanup and device
disabled there is kernel stack dump with errors.

Fix is invoking iscsi_session_failure with ISCSI_ERR_INVALID_HOST
on all the active sessions when shutdown routine is called.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] be2iscsi: Fix doorbell format for EQ/CQ/RQ s per SLI spec.
Jayamohan Kallickal [Wed, 29 Jan 2014 07:16:42 +0000 (02:16 -0500)]
[SCSI] be2iscsi: Fix doorbell format for EQ/CQ/RQ s per SLI spec.

The doorbel format has been updated to support additonal functionalities
of SKH-R adapter. These changes are made such that older FW also works fine.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] be2iscsi: Fix port speed typo in driver.
Jayamohan Kallickal [Wed, 29 Jan 2014 07:16:40 +0000 (02:16 -0500)]
[SCSI] be2iscsi: Fix port speed typo in driver.

The 100Mbps port speed macro used was not proper.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] be2iscsi: Fix handling timed out MBX completion from FW
Jayamohan Kallickal [Wed, 29 Jan 2014 07:16:39 +0000 (02:16 -0500)]
[SCSI] be2iscsi: Fix handling timed out MBX completion from FW

When an MBX command timeout happens,the resources associated with
the MBX command were freed. If FW were to give the response to
host after the timeout value set by driver then driver crashes as the MBX Cmd
resources were already freed.

This patch fixes this issue by maintaing a state flag for each of
the MBX command posted/timedout/completed.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: Add support for a few HP Storage controllers
Stephen M. Cameron [Tue, 18 Feb 2014 19:58:02 +0000 (13:58 -0600)]
[SCSI] hpsa: Add support for a few HP Storage controllers

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: add HP/3PAR vendor id to pci_ids.h
Stephen M. Cameron [Tue, 18 Feb 2014 19:57:57 +0000 (13:57 -0600)]
[SCSI] hpsa: add HP/3PAR vendor id to pci_ids.h

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa add sysfs debug switch for raid map debugging messages
Stephen M. Cameron [Tue, 18 Feb 2014 19:57:52 +0000 (13:57 -0600)]
[SCSI] hpsa add sysfs debug switch for raid map debugging messages

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: improve error messages for driver initiated commands
Stephen M. Cameron [Tue, 18 Feb 2014 19:57:47 +0000 (13:57 -0600)]
[SCSI] hpsa: improve error messages for driver initiated commands

On encountering unexpected error conditions from driver initiated
commands, print something useful like CDB and sense data rather than
something useless like the kernel virtual address of the command buffer.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: only do device rescan for certain events
Stephen M. Cameron [Tue, 18 Feb 2014 19:57:42 +0000 (13:57 -0600)]
[SCSI] hpsa: only do device rescan for certain events

Do no rescan on every events -- way too many rescans are
triggered if we don't filter the events.  Limit rescans
to be triggered by the following set of events:

 * controller state change
 * enclosure hot plug
 * physical drive state change
 * logical drive state change
 * redundant controller state change
 * accelerated io enabled/disabled
 * accelerated io configuration change

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: when switching out of accel mode await only accel command completions
Stephen M. Cameron [Tue, 18 Feb 2014 19:57:37 +0000 (13:57 -0600)]
[SCSI] hpsa: when switching out of accel mode await only accel command completions

Don't wait for *all* commands to complete, only for accelerated mode
commands.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: add controller base data-at-rest encryption compatibility ioaccel2
Scott Teel [Tue, 18 Feb 2014 19:57:31 +0000 (13:57 -0600)]
[SCSI] hpsa: add controller base data-at-rest encryption compatibility ioaccel2

Add controller-based data-at-rest encryption compatibility
to ioaccel2 path (HP SSD Smart Path).

Encryption feature requires driver to supply additional fields
for encryption enable, tweak index, and data encryption key index
in the ioaccel2 request structure.

Encryption enable flag and data encryption key index come from
raid_map data structure from raid offload command.

During ioaccel2 submission, check device structure's raid map to see if
encryption is enabled for the device. If so, call new function below.

Add function set_encrypt_ioaccel2 to set encryption flag, data encryption key
index, and calculate tweak value from request's logical block address.

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: update source file copyrights
Scott Teel [Tue, 18 Feb 2014 19:57:26 +0000 (13:57 -0600)]
[SCSI] hpsa: update source file copyrights

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: retry certain ioaccel error cases on the RAID path
Scott Teel [Tue, 18 Feb 2014 19:57:21 +0000 (13:57 -0600)]
[SCSI] hpsa: retry certain ioaccel error cases on the RAID path

Change the handling of HP SSD Smart Path errors with status:
  0x02 CHECK CONDITION
  0x08 BUSY
  0x18 RESERVATION CONFLICT
  0x40 TASK ABORTED
So that they get retried on the RAID Path.

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: do not inquire for unsupported ioaccel status vpd page
Stephen M. Cameron [Tue, 18 Feb 2014 19:57:16 +0000 (13:57 -0600)]
[SCSI] hpsa: do not inquire for unsupported ioaccel status vpd page

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: allow VPD page zero to be queried
Stephen M. Cameron [Tue, 18 Feb 2014 19:57:11 +0000 (13:57 -0600)]
[SCSI] hpsa: allow VPD page zero to be queried

Code was confused and assumed that page zero was not
VPD page and all non-zero pages were VPD pages.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: rescan devices on ioaccel2 error
Scott Teel [Tue, 18 Feb 2014 19:57:05 +0000 (13:57 -0600)]
[SCSI] hpsa: rescan devices on ioaccel2 error

Allow driver to schedule a rescan whenever a request fails on the ioaccel2 path.
This eliminates the possibility of driver getting stuck in non-ioaccel mode.

IOaccel mode (HP SSD Smart Path) is disabled by driver upon error detection.
Driver relied on idea that request would be retried through normal path, and a
subsequent error would occur on that path, and be processed by controller
firmware.  As part of that process, controller disables ioaccel mode and later
reinstates it, signalling driver to change modes.

In some error cases, the error will not duplicate on the standard path,
so the driver could get stuck in non-ioaccel mode.
To avoid that, we allow driver to request a rescan during the next run of the
rescan thread.

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: allow user to disable accelerated i/o path
Scott Teel [Tue, 18 Feb 2014 19:57:00 +0000 (13:57 -0600)]
[SCSI] hpsa: allow user to disable accelerated i/o path

Allow SSD Smart Path for a controller to be disabled by
the user, regardless of settings in controller firmware
or array configuration.

To disable:     echo 0 > /sys/class/scsi_host/host<id>/acciopath_status
To re-enable:   echo 1 > /sys/class/scsi_host/host<id>/acciopath_status
To check state: cat /sys/class/scsi_host/host<id>/acciopath_status

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: complete the ioaccel raidmap code
Scott Teel [Tue, 18 Feb 2014 19:56:55 +0000 (13:56 -0600)]
[SCSI] hpsa: complete the ioaccel raidmap code

Load balance across members of a N-way mirror set, and
handle the meta-RAID levels: R10, R50, R60.

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: make device update copy the raid map also
Stephen M. Cameron [Tue, 18 Feb 2014 19:56:50 +0000 (13:56 -0600)]
[SCSI] hpsa: make device update copy the raid map also

Otherwise we could wind up using incorrect raid map data, and
then very bad things would likely happen.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: add task management for ioaccel mode 2
Scott Teel [Tue, 18 Feb 2014 19:56:45 +0000 (13:56 -0600)]
[SCSI] hpsa: add task management for ioaccel mode 2

Underlying firmware cannot handle task abort on accelerated path (SSD Smart Path).
Change abort requests for accelerated path commands to physical target reset.
Send reset request on normal IO path.

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Mike Miller <michael.miller@canonical.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: teach hpsa_device_reset to do either target or lun reset
Scott Teel [Tue, 18 Feb 2014 19:56:39 +0000 (13:56 -0600)]
[SCSI] hpsa: teach hpsa_device_reset to do either target or lun reset

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: get ioaccel mode 2 i/o working
Scott Teel [Tue, 18 Feb 2014 19:56:34 +0000 (13:56 -0600)]
[SCSI] hpsa: get ioaccel mode 2 i/o working

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Joe Handzik <Joseph.T.Handzik@hp.com>
Signed-off-by: Mike Miller <michael.miller@canonical.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: initialize controller to perform io accelerator mode 2
Stephen M. Cameron [Tue, 18 Feb 2014 19:56:29 +0000 (13:56 -0600)]
[SCSI] hpsa: initialize controller to perform io accelerator mode 2

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: get physical device handles for io accel mode 2 as well as mode 1
Mike MIller [Tue, 18 Feb 2014 19:56:20 +0000 (13:56 -0600)]
[SCSI] hpsa: get physical device handles for io accel mode 2 as well as mode 1

Signed-off-by: Mike MIller <michael.miller@canonical.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: do ioaccel mode 2 resource allocations
Stephen M. Cameron [Tue, 18 Feb 2014 19:56:14 +0000 (13:56 -0600)]
[SCSI] hpsa: do ioaccel mode 2 resource allocations

Signed-off-by: Mike Miller <michael.miller@canonical.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: Acknowledge controller events in ioaccell mode 2 as well as mode 1
Stephen M. Cameron [Tue, 18 Feb 2014 19:56:09 +0000 (13:56 -0600)]
[SCSI] hpsa: Acknowledge controller events in ioaccell mode 2 as well as mode 1

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: add ioaccel mode 2 structure definitions
Mike Miller [Tue, 18 Feb 2014 19:56:04 +0000 (13:56 -0600)]
[SCSI] hpsa: add ioaccel mode 2 structure definitions

Signed-off-by: Mike Miller <michael.miller@canonical.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: complain if physical or logical aborts are not supported
Scott Teel [Tue, 18 Feb 2014 19:55:59 +0000 (13:55 -0600)]
[SCSI] hpsa: complain if physical or logical aborts are not supported

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: add hp_ssd_smart_path_enabled sysfs attribute
Scott Teel [Tue, 18 Feb 2014 19:55:54 +0000 (13:55 -0600)]
[SCSI] hpsa: add hp_ssd_smart_path_enabled sysfs attribute

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: do not rescan controllers known to be locked up
Stephen M. Cameron [Tue, 18 Feb 2014 19:55:48 +0000 (13:55 -0600)]
[SCSI] hpsa: do not rescan controllers known to be locked up

* Do not check event bits on locked up controllers to
  see if they need to be rescanned.
* Do not initiate any device rescans on controllers
  which are known to be locked up.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: poll controller to detect device change event
Stephen M. Cameron [Tue, 18 Feb 2014 19:55:43 +0000 (13:55 -0600)]
[SCSI] hpsa: poll controller to detect device change event

For shared SAS configurations, hosts need to poll Smart Arrays
periodically in order to be able to detect configuration changes
such as logical drives being added or removed from remote hosts.
A register on the controller indicates when such events have
occurred, and the driver polls the register via a workqueue
and kicks off a rescan of devices if such an event is detected.
Additionally, changes to logical drive raid offload eligibility
are autodetected in this way.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: update raid offload status on device rescan
Stephen M. Cameron [Tue, 18 Feb 2014 19:55:38 +0000 (13:55 -0600)]
[SCSI] hpsa: update raid offload status on device rescan

When rescanning for logical drives, store information about whather
raid offload is enabled for each logical drive, and update the driver's
internal record of this.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: add ioaccell mode 1 RAID offload support.
Stephen M. Cameron [Tue, 18 Feb 2014 19:55:33 +0000 (13:55 -0600)]
[SCSI] hpsa: add ioaccell mode 1 RAID offload support.

This enables sending i/o's destined for RAID logical drives
which can be serviced by a single physical disk down a different,
faster i/o path directly to physical drives for certain logical
volumes on SSDs bypassing the Smart Array RAID stack for a
performance improvement.

Signed-off-by: Matt Gates <matthew.gates@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Mike Miller <michael.miller@canonical.com>
Signed-off-by: Don Brace <brace@beardog.cce.hp.com>
Signed-off-by: Joe Handzik <joseph.t.handzik@hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: fix task management for mode-1 ioaccell path
Scott Teel [Tue, 18 Feb 2014 19:55:28 +0000 (13:55 -0600)]
[SCSI] hpsa: fix task management for mode-1 ioaccell path

For "mode 1" io accelerated commands, the command tag is in
a different location than for commands that go down the normal
RAID path, so the abort handler needs to take this into account.

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Mike Miller <michael.miller@canonical.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: only allow REQ_TYPE_FS to use fast path
Stephen M. Cameron [Tue, 18 Feb 2014 19:55:22 +0000 (13:55 -0600)]
[SCSI] hpsa: only allow REQ_TYPE_FS to use fast path

When commands sent down the "fast path" fail, they must be re-tried down the
normal RAID path.  We do this by kicking i/o's back to the scsi mid layer with
a DID_SOFT_ERROR status, which causes them to be retried.  This won't work for
SG_IO's and other non REQ_TYPE_FS i/o's which could get kicked all the way back
to the application, which may have no idea that the command needs resubmitting
and likely no way to resubmit it in such a way the that driver can recognize it
as a resubmit and send it down the normal RAID path.  So we just always send
non REQ_TYPE_FS i/o's down the normal RAID path, never down the "fast path".

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: add support for 'fastpath' i/o
Matt Gates [Tue, 18 Feb 2014 19:55:17 +0000 (13:55 -0600)]
[SCSI] hpsa: add support for 'fastpath' i/o

For certain i/o's to certain devices (unmasked physical disks) we
can bypass the RAID stack firmware and do the i/o to the device
directly and it will be faster.

Signed-off-by: Matt Gates <matthew.gates@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: mark last scatter gather element as the last
Matt Gates [Tue, 18 Feb 2014 19:55:12 +0000 (13:55 -0600)]
[SCSI] hpsa: mark last scatter gather element as the last

This is normally optional, but for SSD Smart Path support (in
subsequent patches) it is required.

Signed-off-by: Matt Gates <matthew.gates@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: use extended report luns command for HP SSD SmartPath
Matt Gates [Tue, 18 Feb 2014 19:55:07 +0000 (13:55 -0600)]
[SCSI] hpsa: use extended report luns command for HP SSD SmartPath

There is an extended report luns command which contains
additional information about physical devices.  In particular
we need to get the physical device handle so we can use an
alternate i/o path for fast physical devices like SSDs so
we can speed up certain i/o's by bypassing the RAID stack
code in the controller firmware.

Signed-off-by: Matt Gates <matthew.gates@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] pm80xx: Spinlock fix
Suresh Thiagarajan [Thu, 16 Jan 2014 09:56:21 +0000 (15:26 +0530)]
[SCSI] pm80xx: Spinlock fix

spin_lock_irqsave for the HBA lock is called in one function where flag
is local to that function. Another function is called from the first
function where lock has to be released using spin_unlock_irqrestore for
calling task_done of libsas. In the second function also flag is declared
and used. For calling task_done there is no need to enable the irq. So
instead of using spin_lock_irqsave and spin_unlock_irqrestore, spin_lock
and spin_unlock is used now. This also avoids passing the flags across all
the functions where HBA lock is being used. Also removed redundant code.

Reported-by: Jason Seba <jason.seba42@gmail.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com>
Signed-off-by: Viswas G <viswas.g@pmcs.com>
Acked-by: Jack Wang <xjtuwjp@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] hpsa: fixup MSI-X registration
Hannes Reinecke [Wed, 15 Jan 2014 12:30:53 +0000 (13:30 +0100)]
[SCSI] hpsa: fixup MSI-X registration

Commit 254f796b9f22b1944c64caabc356a56caaa2facd updated
the driver to use 16 MSI-X vectors, despite the fact that
older controllers would provide only 4.
This was causing MSI-X registration to drop down to INTx
mode. But as the controller support performant mode, the
initialisation will become confused and cause the machine
to stall during boot.

This patch fixes up the MSI-X registration to re-issue
the pci_enable_msix() call with the correct number of
MSI-X vectors. With that the hpsa driver continues to
works on older controllers like the P200.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] aacraid: kdump fix
Mahesh Rajashekhara [Mon, 13 Jan 2014 08:20:30 +0000 (13:50 +0530)]
[SCSI] aacraid: kdump fix

This patch fixes kernel panic issue while booting into the kdump kernel.

We have triggered crash and kdump vmcore was successful. No issues seen while
booting into the OS.

Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] megaraid: missing bounds check in mimd_to_kioc()
Dan Carpenter [Wed, 30 Oct 2013 17:13:51 +0000 (20:13 +0300)]
[SCSI] megaraid: missing bounds check in mimd_to_kioc()

pthru32->dataxferlen comes from the user so we need to check that it's
not too large so we don't overflow the buffer.

Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] iscsi: fix wrong order of opcode and itt in iscsi_handle_reject prompt
Vaughan Cao [Thu, 9 Jan 2014 02:21:34 +0000 (10:21 +0800)]
[SCSI] iscsi: fix wrong order of opcode and itt in iscsi_handle_reject prompt

This patch makes reject messages show right value for opcode and itt, which
is converse previously.

Signed-off-by: Vaughan Cao <vaughan.cao@oracle.com>
Acked-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: Fix smatch warnings
Vijaya Mohan Guvva [Mon, 23 Dec 2013 08:18:21 +0000 (00:18 -0800)]
[SCSI] bfa: Fix smatch warnings

Fixed following smatch warnings in bfa.
drivers/scsi/bfa/bfa_ioc.c:3882 bfa_sfp_show_comp() error: memcpy()
'des' too small (64 vs 248)
drivers/scsi/bfa/bfa_ioc.c:6859 bfa_flash_status_read() warn: unsigned
'status' is never less than zero.
drivers/scsi/bfa/bfa_ioc.c:6881 bfa_flash_status_read() warn: unsigned
'status' is never less than zero.
drivers/scsi/bfa/bfa_ioc.c:6917 bfa_flash_read_start() warn: unsigned
'status' is never less than zero.
drivers/scsi/bfa/bfa_ioc.c:7043 bfa_flash_raw_read() warn: unsigned
'status' is never less than zero.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: fix missing unlock on error in bfad_iocmd_cfg_trunk()
Wei Yongjun [Fri, 20 Dec 2013 02:51:23 +0000 (10:51 +0800)]
[SCSI] bfa: fix missing unlock on error in bfad_iocmd_cfg_trunk()

Add the missing unlock before return from function bfad_iocmd_cfg_trunk()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] scsi_error: disable eh_deadline if no host_reset_handler is set
Hannes Reinecke [Fri, 17 Jan 2014 15:05:38 +0000 (16:05 +0100)]
[SCSI] scsi_error: disable eh_deadline if no host_reset_handler is set

When the host template doesn't declare an eh_host_reset_handler
the eh_deadline mechanism is pointless and will set the
device to offline. So disable eh_deadline if no
eh_host_reset_handler is present.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] dual scan thread bug fix
James Bottomley [Tue, 21 Jan 2014 15:01:41 +0000 (07:01 -0800)]
[SCSI] dual scan thread bug fix

In the highly unusual case where two threads are running concurrently through
the scanning code scanning the same target, we run into the situation where
one may allocate the target while the other is still using it.  In this case,
because the reap checks for STARGET_CREATED and kills the target without
reference counting, the second thread will do the wrong thing on reap.

Fix this by reference counting even creates and doing the STARGET_CREATED
check in the final put.

Tested-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org # delay backport for 2 months for field testing
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] fix our current target reap infrastructure
James Bottomley [Tue, 21 Jan 2014 15:00:50 +0000 (07:00 -0800)]
[SCSI] fix our current target reap infrastructure

This patch eliminates the reap_ref and replaces it with a proper kref.
On last put of this kref, the target is removed from visibility in
sysfs.  The final call to scsi_target_reap() for the device is done from
__scsi_remove_device() and only if the device was made visible.  This
ensures that the target disappears as soon as the last device is gone
rather than waiting until final release of the device (which is often
too long).

Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org # delay backport by 2 months for field testing
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] pm80xx: Enable BAR shift to avoid BIOS conflict with MPI space for ATTO pm8001...
Bradley Grove [Thu, 19 Dec 2013 15:50:57 +0000 (10:50 -0500)]
[SCSI] pm80xx: Enable BAR shift to avoid BIOS conflict with MPI space for ATTO pm8001 based HBAs.

Signed-off-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] pm80xx: Read saved WWN from NVMD for ATTO pm8001 based HBAs.
Bradley Grove [Thu, 19 Dec 2013 15:50:56 +0000 (10:50 -0500)]
[SCSI] pm80xx: Read saved WWN from NVMD for ATTO pm8001 based HBAs.

Signed-off-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] esas2r: fix potential format string flaw
Kees Cook [Wed, 18 Dec 2013 18:00:54 +0000 (10:00 -0800)]
[SCSI] esas2r: fix potential format string flaw

This makes sure format strings cannot leak into the printk call via the
constructed buffer.

Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc: use NULL instead of 0 for pointer
Daeseok Youn [Fri, 21 Feb 2014 00:03:32 +0000 (09:03 +0900)]
[SCSI] lpfc: use NULL instead of 0 for pointer

sparse says:
drivers/scsi/lpfc/lpfc_sli.c:16547:37: warning:
 Using plain integer as NULL pointer

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Acked-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc: remove self-assignments
James Smart [Thu, 20 Feb 2014 19:22:16 +0000 (14:22 -0500)]
[SCSI] lpfc: remove self-assignments

Report from coverity

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc 8.3.45: Update lpfc version to driver version 8.3.45
James Smart [Thu, 20 Feb 2014 14:58:08 +0000 (09:58 -0500)]
[SCSI] lpfc 8.3.45: Update lpfc version to driver version 8.3.45

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc 8.3.45: Fixed crash during driver unload.
James Smart [Thu, 20 Feb 2014 14:57:57 +0000 (09:57 -0500)]
[SCSI] lpfc 8.3.45: Fixed crash during driver unload.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc 8.3.45: Fixed driver error messages after firmware download
James Smart [Thu, 20 Feb 2014 14:57:43 +0000 (09:57 -0500)]
[SCSI] lpfc 8.3.45: Fixed driver error messages after firmware download

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc 8.3.45: Fixed missing initialization for task management IOCBs
James Smart [Thu, 20 Feb 2014 14:57:28 +0000 (09:57 -0500)]
[SCSI] lpfc 8.3.45: Fixed missing initialization for task management IOCBs

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc 8.3.45: Fix sysfs buffer overrun in read of lpfc_fcp_cpu_map for 128...
James Smart [Thu, 20 Feb 2014 14:57:18 +0000 (09:57 -0500)]
[SCSI] lpfc 8.3.45: Fix sysfs buffer overrun in read of lpfc_fcp_cpu_map for 128 CPUs.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc 8.3.45: Incorporate changes to use reason in change_queue_depth function.
James Smart [Thu, 20 Feb 2014 14:57:08 +0000 (09:57 -0500)]
[SCSI] lpfc 8.3.45: Incorporate changes to use reason in change_queue_depth function.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc 8.3.45: Incorporated support of a low-latency io path
James Smart [Thu, 20 Feb 2014 14:56:45 +0000 (09:56 -0500)]
[SCSI] lpfc 8.3.45: Incorporated support of a low-latency io path

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc 8.3.45: Added dport mailbox pass through support.
James Smart [Thu, 20 Feb 2014 14:56:28 +0000 (09:56 -0500)]
[SCSI] lpfc 8.3.45: Added dport mailbox pass through support.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc 8.3.44: Update lpfc version to driver version 8.3.44
James Smart [Wed, 18 Dec 2013 01:30:18 +0000 (20:30 -0500)]
[SCSI] lpfc 8.3.44: Update lpfc version to driver version 8.3.44

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc 8.3.44: Fixed unassigned variable in ELS timeout message
James Smart [Wed, 18 Dec 2013 01:30:09 +0000 (20:30 -0500)]
[SCSI] lpfc 8.3.44: Fixed unassigned variable in ELS timeout message

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc 8.3.44: Fixed incorrect allocation of iDiags directories/files in debugfs
James Smart [Wed, 18 Dec 2013 01:29:59 +0000 (20:29 -0500)]
[SCSI] lpfc 8.3.44: Fixed incorrect allocation of iDiags directories/files in debugfs

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc 8.3.44: Fix kernel panics from corrupted ndlp list
James Smart [Wed, 18 Dec 2013 01:29:47 +0000 (20:29 -0500)]
[SCSI] lpfc 8.3.44: Fix kernel panics from corrupted ndlp list

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc 8.3.44: Fix Crash in lpfc_els_timeout_handler
James Smart [Wed, 18 Dec 2013 01:29:36 +0000 (20:29 -0500)]
[SCSI] lpfc 8.3.44: Fix Crash in lpfc_els_timeout_handler

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc 8.3.44: Fixed stopped FCF discovery on failed FCF record read
James Smart [Wed, 18 Dec 2013 01:29:22 +0000 (20:29 -0500)]
[SCSI] lpfc 8.3.44: Fixed stopped FCF discovery on failed FCF record read

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] lpfc 8.3.44: Fixed IO hang when in msi mode.
James Smart [Wed, 18 Dec 2013 01:29:01 +0000 (20:29 -0500)]
[SCSI] lpfc 8.3.44: Fixed IO hang when in msi mode.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] qla2xxx: Fixup looking for a space in the outstanding_cmds array in qla2x00_al...
Chad Dupuis [Fri, 7 Mar 2014 07:43:52 +0000 (02:43 -0500)]
[SCSI] qla2xxx: Fixup looking for a space in the outstanding_cmds array in qla2x00_alloc_iocbs().

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>
10 years ago[SCSI] qla2xxx: Re-sync module parameter descriptions with the code
Steven J. Magnani [Tue, 4 Feb 2014 18:50:35 +0000 (12:50 -0600)]
[SCSI] qla2xxx: Re-sync module parameter descriptions with the code

Fix module parameter descriptions mentioning default values that no longer
match the code.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] qla2xxx: fix error handling of qla2x00_mem_alloc()
Dan Carpenter [Tue, 21 Jan 2014 07:00:10 +0000 (10:00 +0300)]
[SCSI] qla2xxx: fix error handling of qla2x00_mem_alloc()

qla2x00_mem_alloc() returns 1 on success and -ENOMEM on failure.  On the
one hand the caller assumes non-zero is success but on the other hand
the caller also assumes that it returns an error code.

I've fixed it to return zero on success and a negative error code on
failure.  This matches the documentation as well.

[jejb: checkpatch fix]
Fixes: e315cd28b9ef ('[SCSI] qla2xxx: Code changes for qla data structure refactoring')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] isci: fix needless ata reset escalations
Dan Williams [Thu, 6 Feb 2014 20:23:15 +0000 (12:23 -0800)]
[SCSI] isci: fix needless ata reset escalations

isci is needlessly tying libata's hands by returning
SAM_STAT_CHECK_CONDITION to some ata errors.  Instead, prefer
SAS_PROTO_RESPONSE to let libata (via sas_ata_task_done()) disposition
the device-to-host fis.

For example isci is triggering an HSM Violation where AHCI is showing a
simple media error for the same bus condition:

isci:
ata7.00: failed command: READ VERIFY SECTOR(S)
ata7.00: cmd 40/00:01:00:00:00/00:00:00:00:00/e0 tag 0
         res 01/04:00:00:00:00/00:00:00:00:00/e0 Emask 0x3 (HSM violation)

ahci:
ata6.00: failed command: READ VERIFY SECTOR(S)
ata6.00: cmd 40/00:01:00:00:00/00:00:00:00:00/e0 tag 0
         res 51/40:01:00:00:00/00:00:00:00:00/e0 Emask 0x9 (media error)

Note that the isci response matches this from sas_ata_task_done():
/* We saw a SAS error. Send a vague error. */
[..]
dev->sata_dev.fis[3] = 0x04; /* status err */
dev->sata_dev.fis[2] = ATA_ERR;

The end effect is that isci is needlessly triggering hard resets when
they are not necessary.

Reported-by: Xun Ni <xun.ni@intel.com>
Tested-by: Nelson Cheng <nelson.cheng@intel.com>
Acked-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] libsas: introduce scmd_dbg() to quiet false positive "timeout" messages
Dan Williams [Thu, 6 Feb 2014 20:23:07 +0000 (12:23 -0800)]
[SCSI] libsas: introduce scmd_dbg() to quiet false positive "timeout" messages

libsas sometimes short circuits timeouts to force commands into error
recovery.  It is misleading to log that the command timed-out in
sas_scsi_timed_out() when in fact it was just queued for error handling.
It's also redundant in the case of a true timeout as libata eh will
detect and report timeouts via it's AC_ERR_TIMEOUT facility.

Given that some environments consider "timeout" errors to be indicative
of impending device failure demote the sas_scsi_timed_out() timeout
message to be disabled by default.  This parallels ata_scsi_timed_out().

[jejb: checkpatch fix]
Reported-by: Xun Ni <xun.ni@intel.com>
Tested-by: Nelson Cheng <nelson.cheng@intel.com>
Acked-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] qla2xxx: Add IOCB Abort command asynchronous handling.
Armen Baloyan [Wed, 26 Feb 2014 09:15:18 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Add IOCB Abort command asynchronous handling.

Send aborts to the firmware via the request/response queue mechanism.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] qla2xxx: Fix Task Management command asynchronous handling
Armen Baloyan [Wed, 26 Feb 2014 09:15:17 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Fix Task Management command asynchronous handling

- Fix interpreting the wrong IOCB type for task management
functions in the response path.
- Merge the task management function handling for various adapters.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] qla2xxx: Correct the port no assignment for ISP82XX.
Saurav Kashyap [Wed, 26 Feb 2014 09:15:16 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Correct the port no assignment for ISP82XX.

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>
10 years ago[SCSI] qla2xxx: Update the driver version to 8.07.00.02-k.
Saurav Kashyap [Wed, 26 Feb 2014 09:15:15 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Update the driver version to 8.07.00.02-k.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] qla2xxx: Correctly set the read_optrom pointer for ISP8044.
Saurav Kashyap [Wed, 26 Feb 2014 09:15:13 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Correctly set the read_optrom pointer for ISP8044.

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>
10 years ago[SCSI] qla2xxx: Read capture firmware dump on mailbox timeout for ISP8044 and ISP82XX.
Chad Dupuis [Wed, 26 Feb 2014 09:15:12 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Read capture firmware dump on mailbox timeout for ISP8044 and ISP82XX.

Allow for the capture of a firmware dump but have a sysfs node
(allow_cna_fw_dump) to allow the feature to be enabled/disabled dynamically.

The default is off.

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>
10 years ago[SCSI] qla2xxx: Simplify the ISPFX00 interrupt handler code for ISPFX00.
Saurav Kashyap [Wed, 26 Feb 2014 09:15:11 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Simplify the ISPFX00 interrupt handler code for ISPFX00.

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>
10 years ago[SCSI] qla2xxx: Avoid poisoning in the response queue for ISPFX00.
Saurav Kashyap [Wed, 26 Feb 2014 09:15:10 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Avoid poisoning in the response queue for ISPFX00.

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>
10 years ago[SCSI] qla2xxx: Add changes in the IOCB structures to adjust driver source codes...
Armen Baloyan [Wed, 26 Feb 2014 09:15:09 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Add changes in the IOCB structures to adjust driver source codes to ISPFX00 firmware spec.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] qla2xxx: Remove ISP_ABORT_NEEDED and ISP_ABORT_RETRY checks from watchdog...
Atul Deshmukh [Wed, 26 Feb 2014 09:15:08 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Remove ISP_ABORT_NEEDED and ISP_ABORT_RETRY checks from watchdog function for ISP8044.

Signed-off-by: Atul Deshmukh <atul.deshmukh@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] qla2xxx: Remove Marker type IOCB logic for ISPFX00.
Armen Baloyan [Wed, 26 Feb 2014 09:15:07 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Remove Marker type IOCB logic for ISPFX00.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] qla2xxx: Add support for ISP2071.
Chad Dupuis [Wed, 26 Feb 2014 09:15:06 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Add support for ISP2071.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
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>
10 years ago[SCSI] scsi_transport_fc: Add 32Gbps speed definition.
Chad Dupuis [Wed, 26 Feb 2014 09:15:05 +0000 (04:15 -0500)]
[SCSI] scsi_transport_fc: Add 32Gbps speed definition.

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>
10 years ago[SCSI] qla2xxx: Set host can_queue value based on available resources.
Chad Dupuis [Wed, 26 Feb 2014 09:15:04 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Set host can_queue value based on available resources.

Tell the mid-layer that number of commands we can queue is the available
resources we have minus a small amount for internal commands.

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>
10 years ago[SCSI] qla2xxx: Properly handle 32 bit mailbox register for ISPFX00.
Saurav Kashyap [Wed, 26 Feb 2014 09:15:03 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Properly handle 32 bit mailbox register for ISPFX00.

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>
10 years ago[SCSI] qla2xxx: Enable the Flash Access Control (FAC) mailbox command.
Joe Carnuccio [Wed, 26 Feb 2014 09:15:02 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Enable the Flash Access Control (FAC) mailbox command.

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>
10 years ago[SCSI] qla2xxx: Select correct request queue for error type IOCB for ISPFX00.
Saurav Kashyap [Wed, 26 Feb 2014 09:15:01 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Select correct request queue for error type IOCB for ISPFX00.

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>
10 years ago[SCSI] qla2xxx: Remove init control block related dead code for ISPFX00.
Saurav Kashyap [Wed, 26 Feb 2014 09:15:00 +0000 (04:15 -0500)]
[SCSI] qla2xxx: Remove init control block related dead code for ISPFX00.

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>
10 years ago[SCSI] qla2xxx: Use proper message for Non owner reset ACK Timeout.
Atul Deshmukh [Wed, 26 Feb 2014 09:14:59 +0000 (04:14 -0500)]
[SCSI] qla2xxx: Use proper message for Non owner reset ACK Timeout.

Signed-off-by: Atul Deshmukh <atul.deshmukh@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>