linux/drivers/scsi/mpi3mr
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: mpi3mr: Update MPI Headers to revision 31 2024-03-25 18:14:33 -04:00
Kconfig scsi: mpi3mr: Select CONFIG_SCSI_SAS_ATTRS 2022-10-22 03:14:51 +00:00
Makefile scsi: mpi3mr: Refer CONFIG_SCSI_MPI3MR in Makefile 2022-12-14 03:01:38 +00:00
mpi3mr_app.c scsi: mpi3mr: Fix ATA NCQ priority support 2024-06-11 21:40:23 -04:00
mpi3mr_debug.h scsi: mpi3mr: Update copyright year 2023-03-16 23:54:29 -04:00
mpi3mr_fw.c Merge patch series "mpi3mr: Few Enhancements and minor fixes" 2024-03-25 18:15:27 -04:00
mpi3mr_os.c scsi: mpi3mr: Switch to using ->device_configure 2024-04-11 21:43:53 -04:00
mpi3mr_transport.c Merge branch '6.10/scsi-queue' into 6.10/scsi-fixes 2024-05-28 21:29:03 -04:00
mpi3mr.h scsi: mpi3mr: Switch to using ->device_configure 2024-04-11 21:43:53 -04:00