linux/drivers/scsi/mpt3sas
Damien Le Moal 90e6f08915 scsi: mpi3mr: Fix ATA NCQ priority support
The function mpi3mr_qcmd() of the mpi3mr driver is able to indicate to
the HBA if a read or write command directed at an ATA device should be
translated to an NCQ read/write command with the high prioiryt bit set
when the request uses the RT priority class and the user has enabled NCQ
priority through sysfs.

However, unlike the mpt3sas driver, the mpi3mr driver does not define
the sas_ncq_prio_supported and sas_ncq_prio_enable sysfs attributes, so
the ncq_prio_enable field of struct mpi3mr_sdev_priv_data is never
actually set and NCQ Priority cannot ever be used.

Fix this by defining these missing atributes to allow a user to check if
an ATA device supports NCQ priority and to enable/disable the use of NCQ
priority. To do this, lift the function scsih_ncq_prio_supp() out of the
mpt3sas driver and make it the generic SCSI SAS transport function
sas_ata_ncq_prio_supported(). Nothing in that function is hardware
specific, so this function can be used in both the mpt3sas driver and
the mpi3mr driver.

Reported-by: Scott McCoy <scott.mccoy@wdc.com>
Fixes: 023ab2a9b4 ("scsi: mpi3mr: Add support for queue command processing")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20240611083435.92961-1-dlemoal@kernel.org
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2024-06-11 21:40:23 -04:00
..
mpi scsi: mpt3sas: Fix an outdated comment 2023-11-15 08:52:02 -05:00
Kconfig scsi: mpt3sas: Fix spelling mistake in Kconfig "compatiblity" -> "compatibility" 2021-01-05 23:25:07 -05:00
Makefile scsi: mpt3sas: Capture IOC data for debugging purposes 2020-05-07 22:24:27 -04:00
mpt3sas_base.c scsi: mpt3sas: Avoid test/set_bit() operating in non-allocated memory 2024-06-05 20:15:41 -04:00
mpt3sas_base.h scsi: mpi3mr: Fix ATA NCQ priority support 2024-06-11 21:40:23 -04:00
mpt3sas_config.c scsi: mpt3sas: Fix typo of "TRIGGER" 2023-11-15 08:52:02 -05:00
mpt3sas_ctl.c scsi: mpi3mr: Fix ATA NCQ priority support 2024-06-11 21:40:23 -04:00
mpt3sas_ctl.h scsi: mpt3sas: Reload SBR without rebooting HBA 2024-01-24 21:40:26 -05:00
mpt3sas_debug.h
mpt3sas_debugfs.c scsi: mpt3sas: Remove unused including <linux/version.h> 2020-05-11 23:09:21 -04:00
mpt3sas_scsih.c scsi: mpi3mr: Fix ATA NCQ priority support 2024-06-11 21:40:23 -04:00
mpt3sas_transport.c scsi: mpt3sas: Replace deprecated strncpy() with strscpy() 2024-03-10 18:37:43 -04:00
mpt3sas_trigger_diag.c scsi: mpt3sas: Additional diagnostic buffer query interface 2021-02-08 22:02:07 -05:00
mpt3sas_trigger_diag.h scsi: mpt3sas: Fix spelling mistake 2020-06-15 23:28:46 -04:00
mpt3sas_trigger_pages.h scsi: mpt3sas: Fix typo of "TRIGGER" 2023-11-15 08:52:02 -05:00
mpt3sas_warpdrive.c scsi: mpt3sas: Use struct_size() for struct size calculations 2023-11-15 08:52:02 -05:00