summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
Commit message (Collapse)AuthorAgeFilesLines
* mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header filesSreekanth Reddy2015-08-273-5/+18
| | | | | | | | | | | | | Following is the change set, 1. Added more defines for the BiosOptions field of MPI2_CONFIG_PAGE_BIOS_1. 2. Added MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC definition. Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* mpt3sas: Update MPI2 strings to MPI2.5Sreekanth Reddy2015-08-272-3/+1Star
| | | | | | | Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* mpt3sas: Bump mpt3sas Driver version to v5.100.00.00Sreekanth Reddy2015-08-271-2/+2
| | | | | | | Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* mpt3sas: Provides the physical location of sas drivesSreekanth Reddy2015-08-272-39/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This Patch will provide more details of the devices such as slot number, enclosure logical id, enclosure level & connector name in the following scenarios, - When end device is added in the topology, - When the end device is removed from the setup, - When the SCSI mid layer issues TASK ABORT/ DEVICE RESET/ TARGET RESET during error handling, - When any command to the device fails with Sense key Hardware error or Medium error or Unit Attention, - When firmware returns device error or device not ready status for the end device, - When a Predicted fault is detected on an end device. This information can be used by the user to identify the location of the desired drive in the topology. Driver will get these information by reading the sas device page0. Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* mpt3sas: MPI 2.5 Rev I (2.5.4) specifications.Sreekanth Reddy2015-08-273-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | | Update MPI 2.5 Release: MPI 2.5 Rev I (2.5.4) specification and 2.00.33 header files Below is the change set from the MPI specification for I Rev 1) Added Base Enclosure Level bit to the Flags field of Manufacturing Page 7. 2) Updated description of the MaxTargetPortConnectTime field of SAS IO Unit Page 1. 3) Added EnclosureLevel and ConnectorName fields to SAS Device Page 0. Also, added EnclosureLevel and ConnectorName Valid bit to the Flags field. 4) Added EnclosureLevel field to SAS Enclosure Page 0. Also, added EnclosureLevel Valid bit to the Flags field. 5) Added value for BIOS image to HashImageType. Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* mpt3sas: Remove redundancy code while freeing the controller resources.Sreekanth Reddy2015-08-271-25/+32
| | | | | | | Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* mpt3sas: Don't block the drive when drive addition under the control of SMLSreekanth Reddy2015-08-273-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | During hot-plugging of a disk(having a flaky link), the disk addition stops and any further disk addition or removal doesn't happen on that controller. This is because, when driver receives DELAY_NOT_RESPONDING event for a disk while it is undergoing addition at the SCSI Transport layer, the driver would block the I/O to that disk resulting in a deadlock. i.e the disk addition work couldn't be completed at the SCSI Transport Layer as it can't send any I/Os (such as Inquiry, Report LUNs etc) to the disk as I/Os are blocked to this drive. Also any subsequent device removal (TARGET_NOT_RESPONDING) or link update(RC_PHY_CHANGED) event couldn't be processed as they are in the queue to get processed after disk addition event. Description of Change: Don't block the drive when drive addition is under the control of SML. So that SML won't be blocked of issuing the device dicovery commands (such as Inquiry, Report LUNs etc). Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* mpt3sas: Get IOC_FACTS information using handshake protocol only after HBA ↵Sreekanth Reddy2015-08-271-0/+68
| | | | | | | | | | | | | | | | | | | | | | | card gets into READY or Operational state. Driver initialization fails if driver tries to send IOC facts request message when the IOC is in reset or in a fault state. This patch will make sure that 1.Driver to send IOC facts request message only if HBA is in operational or ready state. 2.If IOC is in fault state, a diagnostic reset would be issued. 3.If IOC is in reset state then driver will wait for 10 seconds to exit out of reset state. If the HBA continues to be in reset state, then the HBA wouldn't be claimed by the driver. Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector ↵Sreekanth Reddy2015-08-272-9/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | support In this patch, increased the number of MSIX vector support for SAS3 C0 HBAs to up-to 96. Following are changes that are done in this patch 1. This feature is enabled only for SAS3 C0 and higher revision cards and also only when reply post free queue count is greater than 8. 2. To support this feature 12 SupplementalReplyPostHostIndex system interfaces are used. MSI-X index numbered from 0 to 7 use the first SupplementalReplyPostHostIndex system interface to update its corresponding ReplyPostHostIndex values, MSI-X index numbered from 8 to 15 will use the second SupplementalReplyPostHostIndex system interface and so on. These 12 SuppementalReplyPostHostIndex system interfaces address are saved in the array replyPostRegisterIndex[]. 3. As each SupplementalReplyPostHostIndex register supports 8 MSI-X vectors. So MSIxIndex field in these register must contain a value between 0 and 7. 4. After processing the reply descriptors from a reply post free queues then update the new reply post host index value in ReplyPostHostIndex field and (msix_index mod 8) value in MSIxIndex field of SupplementalReplyPostHostIndex register. The Address of this SupplementalReplyPostHostIndex register is retrived from (msix_index/8)th entry of replyPostRegisterIndex[] array. Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* aic94xx: set an error code on failureDan Carpenter2015-08-271-0/+1
| | | | | | | | | | We recently did some cleanup here and now the static checkers notice that there is a missing error code when ioremap() fails. Let's set it to -ENOMEM. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* storvsc: Set the error code correctly in failure conditionsK. Y. Srinivasan2015-08-271-3/+9
| | | | | | | | | In the function storvsc_channel_init(), error code was not getting set correctly in some of the failure cases. Fix this issue. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* storvsc: Allow write_same when host is windows 10Keith Mange2015-08-271-1/+5
| | | | | | | | | Allow WRITE_SAME for Windows10 and above hosts. Tested-by: Alex Ng <alexng@microsoft.com> Signed-off-by: Keith Mange <keith.mange@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* storvsc: use storage protocol version to determine storage capabilitiesKeith Mange2015-08-271-4/+4
| | | | | | | | | | Use storage protocol version instead of vmbus protocol version when determining storage capabilities. Tested-by: Alex Ng <alexng@microsoft.com> Signed-off-by: Keith Mange <keith.mange@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* storvsc: use correct defaults for values determined by protocol negotiationKeith Mange2015-08-271-14/+19
| | | | | | | | | | Use correct defaults for values determined by protocol negotiation, instead of resetting them with every scsi controller. Tested-by: Alex Ng <alexng@microsoft.com> Signed-off-by: Keith Mange <keith.mange@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* storvsc: Untangle the storage protocol negotiation from the vmbus protocol ↵Keith Mange2015-08-271-22/+86
| | | | | | | | | | | | | | | negotiation. Currently we are making decisions based on vmbus protocol versions that have been negotiated; use storage potocol versions instead. [jejb: fold ARRAY_SIZE conversion suggested by Johannes Thumshirn <jthumshirn@suse.de> make vmstor_protocol static] Tested-by: Alex Ng <alexng@microsoft.com> Signed-off-by: Keith Mange <keith.mange@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* storvsc: Use a single value to track protocol versionsKeith Mange2015-08-271-26/+9Star
| | | | | | | | | | Use a single value to track protocol versions to simplify comparisons and to be consistent with vmbus version tracking. Tested-by: Alex Ng <alexng@microsoft.com> Signed-off-by: Keith Mange <keith.mange@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* storvsc: Rather than look for sets of specific protocol versions, make ↵Keith Mange2015-08-271-8/+3Star
| | | | | | | | | | | | | decisions based on ranges. Rather than look for sets of specific protocol versions, make decisions based on ranges. This will be safer and require fewer changes going forward as we add more storage protocol versions. Tested-by: Alex Ng <alexng@microsoft.com> Signed-off-by: Keith Mange <keith.mange@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* cxlflash: Remove unused variable from queuecommandMatthew R. Ochs2015-08-271-3/+4
| | | | | | | | | | | | | | | The queuecommand routine has a local dev pointer used for the dev_* prints. The two prints that currently exist are tucked under a debug define and thus can be left out. Use the actual location instead of a local to avoid this warning. This patch is intended to be applied after the "CXL Flash Error Recovery and Superpipe" series. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* cxlflash: shift wrapping bug in afu_link_reset()Dan Carpenter2015-08-271-2/+2
| | | | | | | | | | "port_sel" is a u64 so the shifting should also be a 64 bit shift. Fixes: c21e0bbfc485 ('cxlflash: Base support for IBM CXL Flash Adapter') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* cxlflash: off by one bug in cxlflash_show_port_status()Dan Carpenter2015-08-271-1/+1
| | | | | | | | | The > should be >= or we read one element past the end of the array. Fixes: c21e0bbfc485 ('cxlflash: Base support for IBM CXL Flash Adapter') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* cxlflash: Virtual LUN supportMatthew R. Ochs2015-08-279-16/+1454
| | | | | | | | | | | | | | Add support for physical LUN segmentation (virtual LUNs) to device driver supporting the IBM CXL Flash adapter. This patch allows user space applications to virtually segment a physical LUN into N virtual LUNs, taking advantage of the translation features provided by this adapter. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com> Reviewed-by: Michael Neuling <mikey@neuling.org> Reviewed-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* cxlflash: Superpipe supportMatthew R. Ochs2015-08-277-4/+2469
| | | | | | | | | | | | | | Add superpipe supporting infrastructure to device driver for the IBM CXL Flash adapter. This patch allows userspace applications to take advantage of the accelerated I/O features that this adapter provides and bypass the traditional filesystem stack. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com> Reviewed-by: Michael Neuling <mikey@neuling.org> Reviewed-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Reviewed-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* cxlflash: Base error recovery supportMatthew R. Ochs2015-08-275-16/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce support for enhanced I/O error handling. A device state is added to track 3 possible states of the device: Normal - the device is operating normally and is fully operational Limbo - the device is in a reset/recovery scenario and its operational status is paused Failed/terminating - the device has either failed to be reset/recovered or is being terminated (removed); it is no longer operational All operations are allowed when the device is operating normally. When the device transitions to limbo state, I/O must be paused. To help accomplish this, a wait queue is introduced where existing and new threads can wait until the device is no longer in limbo. When coming out of limbo, threads need to check the state and error out gracefully when encountering the failed state. When the device transitions to the failed/terminating state, normal operations are no longer allowed. Only specially designated operations related to graceful cleanup are permitted. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com> Reviewed-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Michael Neuling <mikey@neuling.org> Reviewed-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Reviewed-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* qla2xxx: Update driver version to 8.07.00.26-kHimanshu Madhani2015-08-271-1/+1
| | | | | | Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* qla2xxx: Add pci device id 0x2261.Sawan Chandak2015-08-272-3/+15
| | | | | | Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* qla2xxx: Fix missing device login retries.Arun Easi2015-08-271-1/+2
| | | | | | | | | | | On certain conditions, login failures will just invoke qla2x00_mark_device_lost() with the intend to do login again; but if login_retry has been set already, that would fail to set the relogin needed flag which is required to wakeup the DPC to retry. Signed-off-by: Arun Easi <arun.easi@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* qla2xxx: do not clear slot in outstanding cmd arrayHimanshu Madhani2015-08-271-6/+0Star
| | | | | | Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* qla2xxx: Remove decrement of sp reference count in abort handler.Chad Dupuis2015-08-271-7/+2Star
| | | | | | | | | Fix for memory leak when command is not found by firmware due to mismatch in sp reference count. Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* qla2xxx: Add support to show MPI and PEP FW version for ISP27xx.Sawan Chandak2015-08-273-2/+31
| | | | | | Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* qla2xxx: Do not reset ISP for error entry with an out of range handle.Chad Dupuis2015-08-271-7/+1Star
| | | | | | | | | | Instead of resetting the adapter wait for the login to timeout and retry. Resetting the adapter can cause extended path recovery times. Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* qla2xxx: Do not reset adapter if SRB handle is in range.Chad Dupuis2015-08-273-11/+15
| | | | | | | | | | | | If an SRB is NULL but the handle is in range just drop the command instead of also resetting the adapter. If the handle is in range then the command was valid at some point and may have been aborted. Resetting the adapter can lead to extended recovery times in this case. Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* qla2xxx: Do not crash system for sp ref count zeroHiral Patel2015-08-271-1/+1
| | | | | | | | | | | | Aovid crashing the system in the scenario where firmware just completes the command and it can not find the command during abort mailbox processing. This scenario can lead to sp reference counter being zero. Instead of crashing the system, use WARN_ON to print warning in log file. Signed-off-by: Hiral Patel <hiral.patel@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* qla2xxx: Add adapter checks for FAWWN functionality.Saurav Kashyap2015-08-272-14/+17
| | | | | | Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* qla2xxx: Pause risc before manipulating risc semaphore.Joe Carnuccio2015-08-271-0/+3
| | | | | | Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* qla2xxx: Use ssdid to gate semaphore manipulation.Joe Carnuccio2015-08-271-2/+2
| | | | | | | | | Execute qla25xx_manipulate_risc_semaphore() only for ssdid 0x0175 and 0x0240. Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* qla2xxx: Handle AEN8014 incoming port logout.Joe Carnuccio2015-08-272-4/+33
| | | | | | | | When we get logged out, mark the port lost and set dpc flag for relogin. Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* qla2xxx: Add serdes register read/write support for ISP25xx.Joe Carnuccio2015-08-271-2/+4
| | | | | | Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* scsi_error: should not get sense for timeout IO in scsi error handlerjiang.biao2@zte.com.cn2015-08-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | scsi_error: should not get sense for timeout IO in scsi error handler When an IO timeout occurs, the IO will be aborted in scsi_abort_command() and SCSI_EH_ABORT_SCHEDULED will be set. Because of that, the SCSI_EH_CANCEL_CMD will be clear in scsi_eh_scmd_add(). So when scsi error handler starts, it will get sense for this timeout IO and the scmd of the IO request will be reused. In that case, the scmd may be double released when racing with io_done(), which will result in crash. SO SCSI_EH_ABORT_SCHEDULED should also be checked when getting sense. The bug maybe reproduced when the link between host and disk is unstable. Signed-off-by: Jiang Biao <jiang.biao2@zte.com.cn> Signed-off-by: Long Chun <long.chun@zte.com.cn> Reviewed-by: Tan Hu <tan.hu@zte.com.cn> Reviewed-by: Chen Donghai <chen.donghai@zte.com.cn> Reviewed-by: Cai Qu <cai.qu@zte.com.cn> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* pm80xx: Bump pm80xx driver version to 0.1.38Viswas G2015-08-271-1/+1
| | | | | | | | | | | Bump pm80xx driver version to 0.1.38. Signed-off-by: Viswas G <Viswas.G@pmcs.com> Reviewed-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* pm80xx: Handling Invalid SSP Response frameViswas G2015-08-272-1/+8
| | | | | | | | | | | | The request has to be retried incase if the length of the SSP Response IU is invalid. Signed-off-by: Viswas G <Viswas.G@pmcs.com> Reviewed-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* pm80xx: Add PORT RECOVERY TIMEOUT supportViswas G2015-08-272-17/+68
| | | | | | | | | | | | | | | | | PORT RECOVERY TIMEOUT is the maximum time between the controller's detection of the PHY down until the receipt of the ID_Frame (from the same remote SAS port). If the time expires before the ID_FRAME is received, the port is considered INVALID and can be removed. The IOP_EVENT_PORT_RECOVERY_TIMER_TMO event is reported following the IOP_EVENT_ PHY_DOWN event when the PHY/port does not recover after Port Recovery Time. Signed-off-by: Viswas G <Viswas.G@pmcs.com> Reviewed-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* pm80xx: Remove unnecessary phy disconnect while link errorViswas G2015-08-271-12/+0Star
| | | | | | | | | | | | | If the link error happens, we don't need to disconnect the phy, which will remove the drive. Instead acknowledging the controller and logging the error will be enough. Signed-off-by: Viswas G <Viswas.G@pmcs.com> Reviewed-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* pm80xx: Fix for Incorrect DMA Unmapping of SG ListViswas G2015-08-271-0/+1
| | | | | | | | | | | | | | | | | | | In pm8001_ccb_task_free(), the dma unmapping is done based on ccb->n_elem value. This should be initialized to zero in the task_abort(). Otherwise, pm8001_ccb_task_free() will try for dma_unmap_sg() which is invalid for task abort and can lead to kernel crash. Changes From V1: None Signed-off-by: Viswas G <Viswas.G@pmcs.com> Reviewed-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* pm80xx: Update For Thermal Page CodeViswas G2015-08-272-2/+10
| | | | | | | | | | | Thermal page code has been changed to 7 for the 12G controllers. Signed-off-by: Viswas G <Viswas.G@pmcs.com> Reviewed-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* pm80xx: Corrected device state changes in I_T_Nexus_Reset.Viswas G2015-08-272-5/+21
| | | | | | | | | | In Nexus reset the device state request are not needed. Signed-off-by: Viswas G <Viswas.G@pmcs.com> Reviewed-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Acked-by: Jack Wang <jinpu.wang@profitbricks.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* pm80xx: Updated link rateViswas G2015-08-272-0/+5
| | | | | | | | | | | Updated 12G linkrate to libsas. Signed-off-by: Viswas G <Viswas.G@pmcs.com> Reviewed-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Use && instead of & for boolean expressionSebastian Herbszt2015-08-271-1/+1
| | | | | | | | Use logical instead of bitwise AND. Signed-off-by: Sebastian Herbszt <herbszt@gmx.de> Reviewed-by: James Smart <james.smart@avagotech.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* qla2xxx: Return the fabric command state for non-task management requestsDilip Kumar Uppugandla2015-08-271-0/+6
| | | | | | | | | | | Invoking get_cmd_state for qla2xxx always returns 0. Instead change it to return the actual fabric state from qla_tgt_cmd. This will help with debugging. Signed-off-by: Dilip Kumar Uppugandla <dilip@purestorage.com> Signed-off-by: Spencer Baugh <sbaugh@catern.com> Acked-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* hpsa: fix rmmod issuesDon Brace2015-08-271-2/+8
| | | | | | | | | | | | | | | | The driver is calling hpsa_shutdown before calling scsi_remove_host. hpsa_shutdown is disabling interrupts. scsi_remove_host can trigger I/O operations, such as SYNCHRONIZE CACHE when multipath is enabled which hang the system. Call scsi_remove_host before calling hpsa_shutdown. Reviewed-by: Kevin Barnett <kevin.barnett@pmcs.com> Reviewed-by: Scott Teel <scott.teel@pmcs.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* hpsa: fix issues with multilun devicesshane.seymour2015-08-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A regression was introduced into the hpsa driver a while back so non-zero LUNs of multi-LUN devices may no longer be presented via a SAS based Smart Array. I have not done a bisection to discover the change that caused it. The CISS firmware specification (available on sourceforge) defines an 8 byte lunid that describes devices that the Smart Array can see/present to the system. The current code in the hpsa driver attempts to find matches for non-zero LUNs with LUN 0 for a bus/target by zeroing out byte 4 of the lunid and find a match. This method is sufficient for SCSI based Smart Arrays because byte 5 is always 0. For SAS based Smart arrays byte 5 of the lunid contains the path number for a multipath device and either one or two bits (the documentation does not define how many bits are used but it appears it may be one only) that indicate if the given path number in byte 5 must always be used to access that device. Byte 5 may not always be zero. The following are lunids (spaces added for clarity) for a MSL2024 single drive library connected via a H241 Smart Array: 00 00 00 00 01 00 00 01 (changer) 00 00 00 00 00 80 00 01 (tape) In the 4th byte (counting from 0) you can see that the tape is LUN 0 and the changer is LUN 1. The 0x80 set in the 5th byte for the tape drive means the driver should force access to path 0 (the library in this case was connected to one path only anyway). After the changes we can see the following in the dmesg output: scsi 0:3:0:0: RAID HP H241 1.18 \ PQ: 0 ANSI: 5 scsi 0:2:0:0: Sequential-Access HP Ultrium 6-SCSI 354W \ PQ: 0 ANSI: 6 scsi 0:2:0:1: Medium Changer HP MSL G3 Series 8.70 \ PQ: 0 ANSI: 5 Showing that the changer is correctly identified as LUN 1 of bus 2 target 0. Before the change the changer device is not seen. Suggested-by: shane.seymour <shane.seymour@hp.com> Reviewed-by: Kevin Barnett <kevin.barnett@pmcs.com> Reviewed-by: Scott Teel <scott.teel@pmcs.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>