aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-07-26scsi: target: Remove XDWRITEREAD emulated supportMike Christie1-99/+0
This patch removes XDWRITEREAD support because it never fully worked when it was added in the initial LIO merge and it's been fully broken since 2013 from commit a2890087499a ("target: Add compare_and_write_post() completion callback fall through"). The two issues above are: 1. XDWRITEREAD support was just never completed when LIO was merged. We never did the DISABLE WRITE check and so we never write data out. 2. Since the commit above, we never complete the command. After we do the XOR, we return from xdreadwrite_callback and that's it. We never send a response for the command, so the command will always time out and fail. Since this has been fully broken for almost nine years this patch just removes emulated support. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mike Christie <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-26scsi: megaraid: Remove the static variable initialisationJason Wang1-1/+1
Initialising global and static variables to 0 is unnecessary. Remove the initialisation. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jason Wang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-26scsi: ch: Do not initialise statics to 0Xin Gao1-1/+1
Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Xin Gao <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-26scsi: ufs: core: Fix spelling mistake "Cannnot" -> "Cannot"Colin Ian King1-1/+1
There is a spelling mistake in a dev_dbg message. Fix it. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-26scsi: target: iscsi: Do not require target authenticationDmitry Bogdanov2-6/+12
RFC7143 states that Initiator decides what type of authentication to use: The initiator MUST continue with: CHAP_N=<N> CHAP_R=<R> or, if it requires target authentication, with: CHAP_N=<N> CHAP_R=<R> CHAP_I=<I> CHAP_C=<C> Allow one way authentication if mutual authentication is configured. That passes some tests from Windows HLK for Mutual CHAP with iSNS. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Mike Christie <[email protected]> Signed-off-by: Dmitry Bogdanov <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-26scsi: target: iscsi: Allow AuthMethod=NoneDmitry Bogdanov3-2/+15
Allow negotiating AuthMethod=None at CSG=0 (Security Negotiation) when authentication is not required. That is required by the CHAP test in Windows HLK. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Mike Christie <[email protected]> Signed-off-by: Dmitry Bogdanov <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-26scsi: target: iscsi: Support base64 in CHAPDmitry Bogdanov3-24/+94
RFC7143 allows both Base64 and Hex encoding for CHAP binary entities like Challenge and Response. Currently the Linux iSCSI target supports only Hex encoding. Add support for Base64 encoded CHAP Challenge and CHAP Response required for CHAP tests in Windows HLK. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Mike Christie <[email protected]> Signed-off-by: Dmitry Bogdanov <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-26scsi: target: iscsi: Add support for extended CDB AHSDmitry Bogdanov1-3/+52
Variable length SCSI commands are transferred over iSCSI via two CDB buffers - in Basic Header Segment and in Additional Header Segment (AHS). Since AHS is not supported yet, a target reads just BHS (48 byte) from TCP and treats the remaining octets as a next new iSCSI PDU that causes protocol errors. Add support for the Extended CDB AHS type. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Mike Christie <[email protected]> Signed-off-by: Dmitry Bogdanov <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-26scsi: ufs: dt-bindings: Add SC8280XP bindingJohan Hovold1-0/+2
Add SC8280XP to the DT schema. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Alim Akhtar <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: target: iscsi: Fix clang -Wformat warningsJustin Stitt2-3/+3
When building with Clang we encounter these warnings: | drivers/target/iscsi/iscsi_target_login.c:719:24: error: format | specifies type 'unsigned short' but the argument has type 'int' | [-Werror,-Wformat] " from node: %s\n", atomic_read(&sess->nconn), - | drivers/target/iscsi/iscsi_target_login.c:767:12: error: format | specifies type 'unsigned short' but the argument has type 'int' | [-Werror,-Wformat] " %s\n", atomic_read(&sess->nconn), - | drivers/target/iscsi/iscsi_target.c:4365:12: error: format specifies | type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat] | " %s\n", atomic_read(&sess->nconn) For all warnings, the format specifier is '%hu' which describes an unsigned short. The resulting type of atomic_read is an int. The proposed fix is to listen to Clang and swap the format specifier. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Nick Desaulniers <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: Justin Stitt <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: ufs: core: Read device property for ref clockDaniil Lunev2-0/+31
UFS storage devices require bRefClkFreq attribute to be set to operate correctly at high speed mode. The necessary value is determined by what the SoC / board supports. The standard doesn't specify a method to query the value, so the information needs to be fed in separately. DT information feeds into setting up the clock framework, so platforms using DT can get the UFS reference clock frequency from the clock framework. A special node "ref_clk" from the clock array for the UFS controller node is used as the source for the information. On the platforms that do not use DT (e.g. Intel), the alternative mechanism to feed the intended reference clock frequency is necessary. Specifying the necessary information in DSD of the UFS controller ACPI node is an alternative mechanism proposed in this patch. Those can be accessed via firmware property facility in the kernel and in many ways simillar to querying properties defined in DT. This patch introduces a small helper function to query a predetermined ACPI supplied property of the UFS controller, and uses it to attempt retrieving reference clock value, unless that was already done by the clock infrastructure. Link: https://lore.kernel.org/r/20220715210230.1.I365d113d275117dee8fd055ce4fc7e6aebd0bce9@changeid Reviewed-by: Adrian Hunter <[email protected]> Signed-off-by: Daniil Lunev <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: libsas: Resume SAS host for phy reset or enable via sysfsXiang Chen1-0/+4
Currently if a phy reset or enable phy is issued via sysfs when controller is suspended, those operations will be ignored as SAS_HA_REGISTERED is cleared. If RPM is enabled then we may aggressively suspend automatically. In this case it may be difficult to enable or reset a phy via sysfs, so resume the host in these scenarios. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Xiang Chen <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: hisi_sas: Modify v3 HW SATA completion error processingXingui Yang1-1/+8
If the I/O completion response frame returned by the target device has been written to the host memory and the err bit in the status field of the received fis is 1, ts->stat should set to SAS_PROTO_RESPONSE, and this will let EH analyze and further determine cause of failure. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Xingui Yang <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: hisi_sas: Relocate DMA unmap of SMP taskXiang Chen4-7/+5
Currently SMP tasks are DMA unmapped only when cq of SMP I/O is returned normally. If the cq of SMP I/O is returned with exception actually SMP TAS is never unmapped. Relocate DMA unmap of SMP task to fix the issue. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Xiang Chen <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: hisi_sas: Remove unnecessary variable to hold DMA map elementsXiang Chen1-25/+18
Use slot->n_elem to store the return value of dma_map_sg() for SSP and SMP IOs, and remove unnecessary variable n_elem_req. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Xiang Chen <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: hisi_sas: Call hisi_sas_slave_configure() from slave_configure_v3_hw()John Garry1-4/+1
There is duplicated code between slave_configure_v3_hw() and hisi_sas_slave_configure(), so call common function hisi_sas_slave_configure() from slave_configure_v3_hw(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: mpi3mr: Delete a stray tabDan Carpenter1-1/+1
This code is indented one more tab than it should be. Link: https://lore.kernel.org/r/YtVCFshEJNC7ELid@kili Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: mpi3mr: Unlock on error pathDan Carpenter1-1/+2
There is some clean up necessary before returning. Smatch complains: drivers/scsi/mpi3mr/mpi3mr_fw.c:4786 mpi3mr_soft_reset_handler() warn: inconsistent returns '&mrioc->reset_mutex'. Locked on : 4730 Unlocked on: 4786 Link: https://lore.kernel.org/r/YtVCEsxMU8buuMjP@kili Fixes: f10af057325c ("scsi: mpi3mr: Resource Based Metering") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: mpi3mr: Reduce VD queue depth on detecting throttlingSreekanth Reddy3-0/+136
Reduce the VD queue depth on detecting the throttling condition. [mkp: incorporate fix for pointer cast issue reported by the test robot and Guenter Roeck] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: mpi3mr: Resource Based MeteringSreekanth Reddy3-10/+280
Update driver to track cumulative pending large data size at the controller level and at the throttle group level. When one of the values meet or exceed the controller's firmware-determined high threshold value, then the driver will divert future selective I/O to the firmware. Once both controller level and at the throttle group level cumulative pending large data size reach controller's firmware determined low threshold value, then the driver will stop diverting I/Os to the firmware. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: sg: Allow waiting for commands to complete on removed deviceTony Battersby1-20/+33
When a SCSI device is removed while in active use, currently sg will immediately return -ENODEV on any attempt to wait for active commands that were sent before the removal. This is problematic for commands that use SG_FLAG_DIRECT_IO since the data buffer may still be in use by the kernel when userspace frees or reuses it after getting ENODEV, leading to corrupted userspace memory (in the case of READ-type commands) or corrupted data being sent to the device (in the case of WRITE-type commands). This has been seen in practice when logging out of a iscsi_tcp session, where the iSCSI driver may still be processing commands after the device has been marked for removal. Change the policy to allow userspace to wait for active sg commands even when the device is being removed. Return -ENODEV only when there are no more responses to read. Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: Tony Battersby <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: qla2xxx: Update version to 10.02.07.800-kNilesh Javali1-2/+2
Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: qla2xxx: Update manufacturer detailsBikash Hazarika2-2/+2
Update manufacturer details to indicate Marvell Semiconductors. Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Bikash Hazarika <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: qla2xxx: Fix sparse warning for dport_dataNilesh Javali1-2/+2
Use le16_to_cpu to fix sparse warning reported for dport_data. sparse warnings: (new ones prefixed by >>) >> drivers/scsi/qla2xxx/qla_bsg.c:2485:34: sparse: sparse: incorrect >> type in assignment (different base types) @@ expected unsigned >> short [usertype] mbx1 @@ got restricted __le16 @@ drivers/scsi/qla2xxx/qla_bsg.c:2485:34: sparse: expected unsigned short [usertype] mbx1 drivers/scsi/qla2xxx/qla_bsg.c:2485:34: sparse: got restricted __le16 >> drivers/scsi/qla2xxx/qla_bsg.c:2486:34: sparse: sparse: >> incorrect type in assignment (different base types) @@ >> expected unsigned short [usertype] mbx2 @@ got restricted __le16 @@ drivers/scsi/qla2xxx/qla_bsg.c:2486:34: sparse: expected unsigned short [usertype] mbx2 drivers/scsi/qla2xxx/qla_bsg.c:2486:34: sparse: got restricted __le16 Link: https://lore.kernel.org/r/[email protected] Fixes: 476da8faa336 ("scsi: qla2xxx: Add a new v2 dport diagnostic feature") Cc: [email protected] Reported-by: kernel test robot <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: qla2xxx: Fix discovery issues in FC-AL topologyArun Easi3-2/+35
A direct attach tape device, when gets swapped with another, was not discovered. Fix this by looking at loop map and reinitialize link if there are devices present. Link: https://lore.kernel.org/linux-scsi/[email protected]/ Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Reported-by: Tony Battersby <[email protected]> Tested-by: Tony Battersby <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: qla2xxx: Fix imbalance vha->vref_countQuinn Tran1-0/+4
vref_count took an extra decrement in the task management path. Add an extra ref count to compensate the imbalance. Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: qla2xxx: edif: Fix dropped IKE messageQuinn Tran1-30/+24
This patch fixes IKE message being dropped due to error in processing Purex IOCB and Continuation IOCBs. Link: https://lore.kernel.org/r/[email protected] Fixes: fac2807946c1 ("scsi: qla2xxx: edif: Add extraction of auth_els from the wire") Cc: [email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: qla2xxx: Fix response queue handler reading stale packetsArun Easi3-1/+35
On some platforms, the current logic of relying on finding new packet solely based on signature pattern can lead to driver reading stale packets. Though this is a bug in those platforms, reduce such exposures by limiting reading packets until the IN pointer. Two module parameters are introduced: ql2xrspq_follow_inptr: When set, on newer adapters that has queue pointer shadowing, look for response packets only until response queue in pointer. When reset, response packets are read based on a signature pattern logic (old way). ql2xrspq_follow_inptr_legacy: Like ql2xrspq_follow_inptr, but for those adapters where there is no queue pointer shadowing. Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: qla2xxx: Zero undefined mailbox IN registersBikash Hazarika1-0/+2
While requesting a new mailbox command, driver does not write any data to unused registers. Initialize the unused register value to zero while requesting a new mailbox command to prevent stale entry access by firmware. Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Bikash Hazarika <[email protected]> Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: qla2xxx: Fix incorrect display of max frame sizeBikash Hazarika4-9/+7
Replace display field with the correct field. Link: https://lore.kernel.org/r/[email protected] Fixes: 8777e4314d39 ("scsi: qla2xxx: Migrate NVME N2N handling into state machine") Cc: [email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Bikash Hazarika <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-18scsi: Revert "scsi: qla2xxx: Fix disk failure to rediscover"Nilesh Javali2-8/+2
This fixes the regression of NVMe discovery failure during driver load time. This reverts commit 6a45c8e137d4e2c72eecf1ac7cf64f2fdfcead99. Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: smartpqi: Update version to 2.1.18-045Don Brace1-3/+3
Link: https://lore.kernel.org/r/165730608687.177165.11815510982277242966.stgit@brunhilda Reviewed-by: Gerry Morong <[email protected]> Reviewed-by: Scott Benesh <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: smartpqi: Update copyright to current yearDon Brace6-6/+6
Update copyright to current year. Link: https://lore.kernel.org/r/165730608177.177165.13184715486635363193.stgit@brunhilda Reviewed-by: Scott Benesh <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: smartpqi: Add ctrl ready timeout module parameterKevin Barnett3-1/+33
Allow user to override the default driver timeout for controller ready. There are some rare configurations which require the driver to wait longer than the normal 3 minutes for the controller to complete its bootup sequence and be ready to accept commands from the driver. The module parameter is: ctrl_ready_timeout= { 0 | 30-1800 } and specifies the timeout in seconds for the driver to wait for controller ready. The valid range is 0 or 30-1800. The default value is 0, which causes the driver to use a timeout of 180 seconds (3 minutes). Link: https://lore.kernel.org/r/165730607666.177165.9221211345284471213.stgit@brunhilda Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Mike McGowen <[email protected]> Signed-off-by: Kevin Barnett <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: smartpqi: Update deleting a LUN via sysfsKevin Barnett1-18/+30
Change removing a LUN using sysfs from an internal driver function pqi_remove_all_scsi_devices() to using the .slave_destroy entry in the scsi_host_template. A LUN can be deleted via sysfs using this syntax: echo 1 > /sys/block/sdX/device/delete Link: https://lore.kernel.org/r/165730607154.177165.9723066932202995774.stgit@brunhilda Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Mike McGowen <[email protected]> Signed-off-by: Kevin Barnett <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: smartpqi: Add module param to disable managed intsMike McGowen2-2/+13
Allow SMP affinity to be changeable by disabling managed interrupts. On distributions where the driver is enabled for multi-queue support the driver utilizes kernel managed interrupts, which automatically distributes interrupts to all available CPUs and assigns SMP affinity. On most distributions, the affinity can not be changed by the user. This change will allow managed interrupts to be disabled by the user via a module parameter while still allowing multi-queue support to function properly. Use the module parameter disable_managed_interrupts=1 Link: https://lore.kernel.org/r/165730606638.177165.12846020942931640329.stgit@brunhilda Reviewed-by: Scott Benesh <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Signed-off-by: Mike McGowen <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: smartpqi: Fix RAID map race conditionKevin Barnett1-39/+71
Correct a rare stale RAID map access when performing AIO during a RAID configuration change. A race condition in the driver could cause it to access a stale RAID map when a logical volume is reconfigured. Modify the driver logic to invalidate a RAID map very early when a RAID configuration change is detected and only switch to a new RAID map after the driver detects that the RAID map has changed. Link: https://lore.kernel.org/r/165730606128.177165.7671413443814750829.stgit@brunhilda Reviewed-by: Scott Benesh <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Mike McGowen <[email protected]> Signed-off-by: Kevin Barnett <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: smartpqi: Fix DMA direction for RAID requestsMahesh Rajashekhara1-2/+2
Correct a SOP READ and WRITE DMA flags for some requests. This update corrects DMA direction issues with SCSI commands removed from the controller's internal lookup table. Currently, SCSI READ BLOCK LIMITS (0x5) was removed from the controller lookup table and exposed a DMA direction flag issue. SCSI READ BLOCK LIMITS was recently removed from our controller lookup table so the controller uses the respective IU flag field to set the DMA data direction. Since the DMA direction is incorrect the FW never completes the request causing a hang. Some SCSI commands which use SCSI READ BLOCK LIMITS * sg_map * mt -f /dev/stX status After updating controller firmware, users may notice their tape units failing. This patch resolves the issue. Also, the AIO path DMA direction is correct. The DMA direction flag is a day-one bug with no reported BZ. Fixes: 6c223761eb54 ("smartpqi: initial commit of Microsemi smartpqi driver") Link: https://lore.kernel.org/r/165730605618.177165.9054223644512926624.stgit@brunhilda Reviewed-by: Scott Benesh <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Mike McGowen <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Signed-off-by: Mahesh Rajashekhara <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: smartpqi: Stop logging spurious PQI reset failuresKevin Barnett1-2/+1
Change method used to detect controller firmware crash during PQI reset. PQI reset can fail with error -6 if firmware takes > 100ms to complete reset. Method used by driver to detect controller firmware crash during PQI was incorrect in some cases. Link: https://lore.kernel.org/r/165730605108.177165.1132931838384767071.stgit@brunhilda Reviewed-by: Scott Benesh <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Mike McGowen <[email protected]> Signed-off-by: Kevin Barnett <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: smartpqi: Add PCI IDs for Lenovo controllersMike McGowen1-0/+32
Add PCI IDs for Lenovo controllers (values in hex): VID / DID / SVID / SDID ---- ---- ---- ---- Lenovo 4350-8i HBA 9005 / 028f / 1d49 / 0220 Lenovo 4350-16i HBA 9005 / 028f / 1d49 / 0221 Lenovo 5350-8i RAID 9005 / 028f / 1d49 / 0520 Lenovo 5350-8i Internal RAID 9005 / 028f / 1d49 / 0522 Lenovo 9350-8i RAID 9005 / 028f / 1d49 / 0620 Lenovo 9350-8i Internal RAID 9005 / 028f / 1d49 / 0621 Lenovo 9350-16i RAID 9005 / 028f / 1d49 / 0622 Lenovo 9350-16i Internal RAID 9005 / 028f / 1d49 / 0623 Link: https://lore.kernel.org/r/165730604598.177165.9910276232981721083.stgit@brunhilda Reviewed-by: Scott Benesh <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Signed-off-by: Mike McGowen <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: smartpqi: Add PCI ID for Adaptec SmartHBA 2100-8iMike McGowen1-0/+4
Add the PCI ID for (values in hex): VID / DID / SVID / SDID ---- ---- ---- ---- Adaptec SmartHBA 2100-8i-o 9005 / 0285 / 9005 / 0659 Link: https://lore.kernel.org/r/165730604089.177165.17257514581321583667.stgit@brunhilda Reviewed-by: Scott Benesh <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Signed-off-by: Mike McGowen <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: smartpqi: Fix PCI control linkdown system hangSagar Biradar3-5/+52
Fail all outstanding requests after a PCI linkdown. Block access to device SCSI attributes during the following conditions: "Cable pull" is called PQI_CTRL_SURPRISE_REMOVAL. "PCIe Link Down" is called PQI_CTRL_GRACEFUL_REMOVAL. Block access to device SCSI attributes during and in rare instances when the controller goes offline. Either outstanding requests or the access of SCSI attributes post linkdown can lead to a hang. Post linkdown, driver does not fail the outstanding requests leading to long wait time before all the IOs eventually fail. Also access of the SCSI attributes by host applications can lead to a system hang. Link: https://lore.kernel.org/r/165730603578.177165.4699352086827187263.stgit@brunhilda Reviewed-by: Scott Benesh <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Mike McGowen <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Signed-off-by: Sagar Biradar <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: smartpqi: Add driver support for multi-LUN devicesKumar Meiyappan2-35/+72
Add driver support for up to 256 LUNs per device. Update AIO path to pass the appropriate LUN number for base-code to target the correct LUN. Update RAID IO path to pass the appropriate LUN number for FW to target the correct LUN. Pass the correct LUN number while doing a LUN reset. Count the outstanding commands based on LUN number. While removing a Multi-LUN device, wait for all outstanding commands to complete for all LUNs. Add Feature bit support. Link: https://lore.kernel.org/r/165730603067.177165.14016422176841798336.stgit@brunhilda Reviewed-by: Scott Benesh <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Mike McGowen <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Signed-off-by: Kumar Meiyappan <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: smartpqi: Close write read holesMike McGowen1-0/+3
Insert a minimum 1 millisecond delay after writing to a register before reading from it. SIS and PQI registers that can be both written to and read from can return stale data if read from too soon after having been written to. There is no read/write ordering or hazard detection on the inbound path to the MSGU from the PCIe bus, therefore reads could pass writes. Link: https://lore.kernel.org/r/165730602555.177165.11181012469428348394.stgit@brunhilda Reviewed-by: Scott Teel <[email protected]> Signed-off-by: Mike McGowen <[email protected]> Co-developed-by: Kevin Barnett <[email protected]> Signed-off-by: Kevin Barnett <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: smartpqi: Add PCI IDs for ramaxel controllersMurthy Bhat1-0/+8
Add the following controllers (values in hex): VID / DID / SVID / SDID ---- / ---- / ---- / ---- Ramaxel FBGF-RAD PM8204 9005 / 028F / 1CC4 / 0101 Ramaxel FBGF-RAD PM8222 9005 / 028F / 1CC4 / 0201 Link: https://lore.kernel.org/r/165730602045.177165.3720208650043407285.stgit@brunhilda Reviewed-by: Scott Benesh <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Mike McGowen <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Signed-off-by: Murthy Bhat <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: smartpqi: Add controller fw version to console logGilbert Wu1-0/+3
Print controller firmware version to OS message log during driver initialization or after OFA. Link: https://lore.kernel.org/r/165730601536.177165.17698744242908911822.stgit@brunhilda Reviewed-by: Scott Benesh <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Mike McGowen <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Signed-off-by: Gilbert Wu <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: smartpqi: Shorten drive visibility after removalMike McGowen2-2/+9
Check the response code returned from the LUN reset task management function and if it indicates the LUN is not valid, do not retry. Reduce rescan worker delay to 5 seconds for the event handler only. The removal of a drive from the OS could have been delayed up to 30 seconds after being physically pulled. The driver was retrying a LUN reset 3 times even though the return code indiciated the LUN was no longer valid. There was a 10 second delay between each retry. Additionally, the rescan worker was scheduled to run 10 seconds after the driver received the event. Link: https://lore.kernel.org/r/165730601025.177165.9416869335174437006.stgit@brunhilda Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Signed-off-by: Mike McGowen <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: fnic: Refactor code in fnic probe to initialize SCSI layerKaran Tilak Kumar1-11/+34
Refactor code from fnic probe into a different function so that scsi layer initialization code is grouped together. Also, add log messages for better debugging. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Gian Carlo Boffa <[email protected]> Signed-off-by: Gian Carlo Boffa <[email protected]> Co-developed-by: Arulprabhu Ponnusamy <[email protected]> Signed-off-by: Arulprabhu Ponnusamy <[email protected]> Signed-off-by: Karan Tilak Kumar <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: gvp11.c: Fix DMA mask calculation errorMichael Schmitz1-3/+3
DMA masks given in the Zorro ID table don't contain the 2 byte alignment quirk seen in the GVP11_XFER_MASK macro from gvp11.h so no need to account for that. DMA masks passed to dma_set_mask_and_coherent() must be 64 bit, add the missing cast in the TO_DMA_MASK macro used to convert driver DMA masks to DMA API masks. Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Fixes: 158da6bcae7a ("scsi: gvp11: Convert m68k WD33C93 drivers to DMA API") CC: [email protected] Signed-off-by: Michael Schmitz <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-07-13scsi: ufs: core: Remove UIC_HIBERN8_ENTER_RETRIESKeoseong Park1-3/+0
Commit 4db7a2360597 ("scsi: ufs: Fix concurrency of error handler and other error recovery paths") removed all callers of UIC_HIBERN8_ENTER_RETRIES. Hence also remove the macro itself. Link: https://lore.kernel.org/r/20220708052006epcms2p2d1129dbf95fd77f46906200ccb0a9ccd@epcms2p2 Reviewed-by: Avri Altman <[email protected]> Signed-off-by: Keoseong Park <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>