aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-02-22scsi: dc395x: Stop using the SCSI pointerBart Van Assche1-3/+0
Remove the code that sets SCSI pointer members since there is no code in this driver that reads these members. Link: https://lore.kernel.org/r/[email protected] Cc: Oliver Neukum <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: csio: Stop using the SCSI pointerBart Van Assche2-9/+21
Set .cmd_size in the SCSI host template instead of using the SCSI pointer from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer from struct scsi_cmnd. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: bfa: Stop using the SCSI pointerBart Van Assche2-13/+30
Set .cmd_size in the SCSI host template instead of using the SCSI pointer from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer from struct scsi_cmnd. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: aha152x: Move the SCSI pointer to private command dataBart Van Assche1-104/+155
Set .cmd_size in the SCSI host template instead of using the SCSI pointer from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer from struct scsi_cmnd. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: aha1542: Remove a set-but-not-used arrayBart Van Assche1-2/+1
This patch fixes the following W=1 warning: drivers/scsi/aha1542.c:209:12: warning: variable ‘inquiry_result’ set but not used [-Wunused-but-set-variable] 209 | u8 inquiry_result[4]; Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: advansys: Move the SCSI pointer to private command dataBart Van Assche1-6/+16
Set .cmd_size in the SCSI host template instead of using the SCSI pointer from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer from struct scsi_cmnd. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: aacraid: Move the SCSI pointer to private command dataBart Van Assche4-36/+54
Set .cmd_size in the SCSI host template instead of using the SCSI pointer from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer from struct scsi_cmnd. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: 53c700: Stop clearing SCSI pointer fieldsBart Van Assche1-2/+0
None of the 53c700 drivers uses the SCSI pointer. Hence remove the code from 53c700.c that clears two SCSI pointer fields. The 53c700 drivers are: $ git grep -l 'include.*53c700' drivers/scsi/53c700.c drivers/scsi/a4000t.c drivers/scsi/bvme6000_scsi.c drivers/scsi/lasi700.c drivers/scsi/mvme16x_scsi.c drivers/scsi/sim710.c drivers/scsi/sni_53c710.c drivers/scsi/zorro7xx.c Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: arm: Move the SCSI pointer to private command dataBart Van Assche4-29/+56
Set .cmd_size in the SCSI host template instead of using the SCSI pointer from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer from struct scsi_cmnd. The ARM SCSI drivers have been identified as follows: $ git grep -l '#include.*arm_scsi.h' drivers/scsi/arm/acornscsi.c drivers/scsi/arm/cumana_2.c drivers/scsi/arm/eesox.c drivers/scsi/arm/fas216.c drivers/scsi/arm/powertec.c Link: https://lore.kernel.org/r/[email protected] Cc: Russell King <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: arm: Rename arm/scsi.h into arm/arm_scsi.hBart Van Assche6-8/+6
The new name makes the purpose of this header file more clear and also makes it easier to find this header file with grep. Link: https://lore.kernel.org/r/[email protected] Cc: Russell King <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: NCR5380: Add SCp members to struct NCR5380_cmdFinn Thain6-56/+66
This is necessary for the eventual removal of SCp from struct scsi_cmnd. Link: https://lore.kernel.org/r/[email protected] Cc: Michael Schmitz <[email protected]> Cc: Ondrej Zary <[email protected]> Suggested-by: Bart Van Assche <[email protected]> Signed-off-by: Finn Thain <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: NCR5380: Remove the NCR5380_CMD_SIZE macroBart Van Assche8-9/+7
This makes it easier to find users of the NCR5380_cmd data structure with 'grep'. Link: https://lore.kernel.org/r/[email protected] Cc: Finn Thain <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: Ondrej Zary <[email protected]> Cc: Michael Schmitz <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Acked-by: Finn Thain <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: Remove drivers/scsi/scsi.hBart Van Assche25-82/+119
The following two header files have the same file name: include/scsi/scsi.h and drivers/scsi/scsi.h. This is confusing. Remove the latter since the following note was added in drivers/scsi/scsi.h in 2004: "NOTE: this file only contains compatibility glue for old drivers. All these wrappers will be removed sooner or later. For new code please use the interfaces declared in the headers in include/scsi/" Link: https://lore.kernel.org/r/[email protected] Cc: Christoph Hellwig <[email protected]> Cc: Ming Lei <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: nsp_cs: Use true and false instead of TRUE and FALSEBart Van Assche2-14/+14
This patch prepares for removal of the drivers/scsi/scsi.h header file. That header file defines the 'TRUE' and 'FALSE' constants. Link: https://lore.kernel.org/r/[email protected] Cc: Johannes Thumshirn <[email protected]> Cc: John Garry <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: nsp_cs: Change the return type of two functions into 'void'Bart Van Assche2-14/+7
nsp_reselected() and nsphw_init() always return TRUE. Change the return type of these functions into 'void'. Link: https://lore.kernel.org/r/[email protected] Cc: Johannes Thumshirn <[email protected]> Cc: John Garry <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: ips: Use true and false instead of TRUE and FALSEBart Van Assche1-19/+17
This patch prepares for removal of the drivers/scsi/scsi.h header file. That header file defines the 'TRUE' and 'FALSE' constants. Link: https://lore.kernel.org/r/[email protected] Cc: Johannes Thumshirn <[email protected]> Cc: John Garry <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: ips: Change the return type of ips_release() into 'void'Bart Van Assche1-5/+2
ips_release() has one caller and that caller ignores the value returned by ips_release(). Hence change the return type of that function into 'void'. Link: https://lore.kernel.org/r/[email protected] Cc: Johannes Thumshirn <[email protected]> Cc: John Garry <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: ips: Remove an unreachable statementBart Van Assche1-1/+0
Whether or not CONFIG_BUG is enabled, BUG() never returns. Hence, code past a BUG() statement is unreachable. Remove one such unreachable statement. Link: https://lore.kernel.org/r/[email protected] Cc: Johannes Thumshirn <[email protected]> Cc: John Garry <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-22scsi: libsas: Add sas_execute_ata_cmd()John Garry6-134/+34
Add a function to execute an ATA command using the TMF code, and use in the hisi_sas driver. That driver needs to be able to issue the command on a specific phy, so add an interface for that. With that, hisi_sas_exec_internal_tmf_task() may be deleted. Link: https://lore.kernel.org/r/[email protected] Tested-by: Yihang Li <[email protected]> Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Add sas_abort_task()John Garry5-259/+20
Add a generic implementation of abort task TMF handler, and use in LLDDs. With that, some LLDDs custom TMF functions can now be deleted. Link: https://lore.kernel.org/r/[email protected] Tested-by: Yihang Li <[email protected]> Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Add sas_query_task()John Garry5-25/+20
Add a generic implementation of query task TMF handler, and use in LLDDs. Link: https://lore.kernel.org/r/[email protected] Tested-by: Yihang Li <[email protected]> Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Add sas_lu_reset()John Garry5-9/+14
Add a generic implementation of LU reset TMF handler, and use in LLDDs. Link: https://lore.kernel.org/r/[email protected] Tested-by: Yihang Li <[email protected]> Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Add sas_clear_task_set()John Garry7-20/+14
Add a generic implementation of clear task set TMF handler, and use in LLDDs. Link: https://lore.kernel.org/r/[email protected] Tested-by: Yihang Li <[email protected]> Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Add sas_abort_task_set()John Garry9-31/+17
Add a generic implementation of abort task set TMF handler, and use in LLDDs. Link: https://lore.kernel.org/r/[email protected] Tested-by: Yihang Li <[email protected]> Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Add TMF handler aborted callbackJohn Garry6-0/+33
The hisi_sas and pm8001 TMF handlers have some special processing for when the TMF is aborted, so add a callback and fill it in for those drivers. Link: https://lore.kernel.org/r/[email protected] Tested-by: Yihang Li <[email protected]> Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Add TMF handler exec complete callbackJohn Garry5-0/+22
The pm8001 TMF handler has some special processing when the TMF completes, so add a callback and fill it in for the pm8001 driver. Link: https://lore.kernel.org/r/[email protected] Tested-by: Yihang Li <[email protected]> Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Add sas_execute_ssp_tmf()John Garry1-0/+18
Add a function to issue an SSP TMF. Add a temp prototype to keep make W=1 happy. Link: https://lore.kernel.org/r/[email protected] Tested-by: Yihang Li <[email protected]> Tested-by: Damien Le Moal <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Add sas_execute_tmf()John Garry2-0/+108
Drivers using libsas have to issue their own TMFs, and the code to do this is duplicated between drivers. Add a common function to handle TMFs. This will be also used for sending ATA commands, but use name "tmf" as the purpose is similar between SCSI and ATA in the usage. The force_phy_id argument will be used for a hisi_sas HW bug workaround. We check the sas task status stat field against TMF codes, as according to the SAS v1.1 spec 9.2.2.5.3, if response_data is in datapres, then the response code should be a TMF code - see table 128. Link: https://lore.kernel.org/r/[email protected] Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Add sas_task.tmfJohn Garry4-37/+23
Add a pointer to a sas_tmf_task to the sas_task struct, as this will be used when the common LLDD TMF code is factored out. Also set it for the LLDDs to store per-sas_task TMF info. Link: https://lore.kernel.org/r/[email protected] Tested-by: Yihang Li <[email protected]> Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Add struct sas_tmf_taskJohn Garry11-56/+49
Some of the LLDDs which use libsas have their own definition of a struct to hold TMF info, so add a common struct for libsas. Also add an interim force phy id field for hisi_sas driver, which will be removed once the STP "TMF" code is factored out. Even though some LLDDs (pm8001) use a u32 for the tag, u16 will be adequate, as that named driver only uses tags in range [0, 1024). Link: https://lore.kernel.org/r/[email protected] Tested-by: Yihang Li <[email protected]> Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Move SMP task handlers to coreJohn Garry3-22/+29
Move the SMP task handlers to the core host code as they will be re-used for executing internal abort and TMF tasks. Link: https://lore.kernel.org/r/[email protected] Tested-by: Yihang Li <[email protected]> Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: hisi_sas: Delete unused I_T_NEXUS_RESET_PHYUP_TIMEOUTJohn Garry1-2/+0
There is no user, so delete it. Link: https://lore.kernel.org/r/[email protected] Tested-by: Yihang Li <[email protected]> Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Jack Wang <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Delete SAS_SG_ERRJohn Garry3-6/+0
No LLDD sets exec status as SAS_SG_ERR, so remove support. Link: https://lore.kernel.org/r/[email protected] Tested-by: Damien Le Moal <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Delete lldd_clear_aca callbackJohn Garry15-72/+0
This callback is never called, so remove support. Link: https://lore.kernel.org/r/[email protected] Tested-by: Yihang Li <[email protected]> Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Jack Wang <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Xiang Chen <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Use enum for response frame DATAPRES fieldJohn Garry5-10/+22
As defined in table 126 of the SAS spec 1.1, use an enum for the DATAPRES field, which makes reading the code easier. Also change sas_ssp_task_response() to use a switch statement, which is more suitable (than if-else), as suggested by Christoph. Link: https://lore.kernel.org/r/[email protected] Suggested-by: Xiang Chen <[email protected]> Tested-by: Yihang Li <[email protected]> Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Jack Wang <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Handle non-TMF codes in sas_scsi_find_task()John Garry1-2/+4
LLDD TMF callbacks may return linux or other error codes instead of TMF codes. This may cause problems in sas_scsi_find_task() -> .lldd_query_task(), as only TMF codes are handled there. As such, we may not return a task_disposition type from sas_scsi_find_task(). Function sas_eh_handle_sas_errors() only handles that type, and will only progress error handling for those recognised types. Return TASK_ABORT_FAILED upon exit on the assumption that the command may still be alive and error handling should be escalated. Link: https://lore.kernel.org/r/[email protected] Tested-by: Damien Le Moal <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-14Merge branch '5.17/scsi-fixes' into 5.18/scsi-stagingMartin K. Petersen24-120/+161
Pull 5.17 fixes branch into 5.18 tree to resolve a few pm8001 driver merge conflicts. Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-11scsi: mpi3mr: Bump driver version to 8.0.0.68.0Sreekanth Reddy1-2/+2
Bump mpi3mr driver version to 8.0.0.68.0. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-11scsi: mpi3mr: Fix memory leaksSreekanth Reddy1-1/+1
Fix memory leaks related to operational reply queue's memory segments which are not getting freed while unloading the driver. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-11scsi: mpi3mr: Update the copyright yearSreekanth Reddy4-4/+4
Update the copyright year to 2017-2022. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-11scsi: mpi3mr: Fix reporting of actual data transfer sizeSreekanth Reddy1-0/+2
The driver is missing to set the residual size while completing an I/O. Ensure proper data transfer size is reported to the kernel on I/O completion based on the transfer length reported by 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-02-11scsi: mpi3mr: Fix cmnd getting marked as in use foreverSreekanth Reddy1-2/+14
When a driver command which requires the driver to issue a follow up command using the same command frame is outstanding and a soft reset operation occurs, then that driver command frame is getting marked as in use permanently and won't be reused again. Clear the driver command frames while flushing out the outstanding commands and avoid issuing any new requests using these command frames while soft reset is going on. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-11scsi: mpi3mr: Fix hibernation issueSreekanth Reddy1-1/+1
Hibernation operation fails when it is issued for second time. This is because the driver is trying to release the IOC's PCI resources after setting power state to D3. Set the IOC's power state to D3 only after releasing the IOC's PCI resources. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-11scsi: mpi3mr: Update MPI3 headersSreekanth Reddy7-101/+116
Update MPI3 headers. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-11scsi: mpi3mr: Fix printing of pending I/O countSreekanth Reddy1-1/+1
Print proper pending I/O count after issuing target reset TM operation. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-11scsi: mpi3mr: Fix deadlock while canceling the fw eventSreekanth Reddy3-21/+91
During controller reset, the driver tries to flush all the pending firmware event works from worker queue that are queued prior to the reset. However, if any work is waiting for device addition/removal operation to be completed at the SML, then a deadlock is observed. This is due to the controller reset waiting for the device addition/removal to be completed and the device/addition removal is waiting for the controller reset to be completed. To limit this deadlock, continue with the controller reset handling without canceling the work which is waiting for device addition/removal operation to complete at SML. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-11scsi: Remove unused member cmd_pool for structure scsi_host_templateXiang Chen1-3/+0
After commit e9c787e65c0c ("scsi: allocate scsi_cmnd structures as part of struct request"), the member cmd_pool in structure scsi_host_template is not used, so remove it. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: John Garry <[email protected]> Signed-off-by: Xiang Chen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-11scsi: libsas: Remove unused parameter for function sas_ata_eh()Xiang Chen3-7/+4
Input parameter work_q is not unused in function sas_ata_eh(), so remove it. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: John Garry <[email protected]> Signed-off-by: Xiang Chen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-11scsi: libsas: Remove duplicated setting for task->task_state_flagsXiang Chen1-1/+0
Task->task_state_flags is already set in function sas_alloc_task(), so remove duplicated setting. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: John Garry <[email protected]> Signed-off-by: Xiang Chen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-11scsi: libsas: Use void for sas_discover_event() return codeXiang Chen2-5/+3
The callers of function sas_discover_event() do not check its return value. The function also only ever returns 0, so use void instead. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: John Garry <[email protected]> Signed-off-by: Xiang Chen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>