linux/include/scsi
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
..
fc
fc_frame.h
fcoe_sysfs.h
iscsi_if.h
iscsi_proto.h
iser.h scsi: iser: Fix @read_stag kernel-doc warning 2024-04-08 22:10:06 -04:00
libfc.h scsi: libfc: Add some kernel-doc comments 2024-04-24 21:29:27 -04:00
libfcoe.h scsi: libfcoe: Fix a slew of kernel-doc warnings 2024-04-08 22:10:06 -04:00
libiscsi.h scsi: iscsi: Declare SCSI host template const 2023-03-24 19:19:57 -04:00
libiscsi_tcp.h
libsas.h scsi: libata: Switch to using ->device_configure 2024-04-11 21:37:50 -04:00
sas.h
sas_ata.h scsi: libsas: Define NCQ Priority sysfs attributes for SATA devices 2024-03-25 16:00:06 -04:00
scsi.h scsi: core: Don't use "proxy" headers 2024-04-24 21:27:15 -04:00
scsi_bsg_iscsi.h
scsi_cmnd.h scsi: core: Add kernel-doc for scsi_msg_to_host_byte() 2024-04-08 22:10:06 -04:00
scsi_common.h scsi: Add support for block PR read keys/reservation 2023-04-11 21:55:35 -04:00
scsi_dbg.h
scsi_device.h SCSI misc on 20240322 2024-03-22 13:31:07 -07:00
scsi_devinfo.h scsi: core: Add BLIST_NO_VPD_SIZE for some VDASD 2023-03-09 20:57:58 -05:00
scsi_dh.h
scsi_driver.h SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
scsi_eh.h
scsi_host.h SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
scsi_ioctl.h scsi: replace the fmode_t argument to scsi_ioctl with a simple bool 2023-06-12 08:04:04 -06:00
scsi_proto.h scsi: scsi_proto: Add structures and constants related to I/O groups and streams 2024-02-26 21:37:26 -05:00
scsi_status.h scsi: core: Remove useless host error codes 2022-09-06 22:05:59 -04:00
scsi_tcq.h
scsi_transport.h scsi: core: Initialize scsi midlayer limits before allocating the queue 2024-04-11 21:37:48 -04:00
scsi_transport_fc.h Merge patch series "convert SCSI to atomic queue limits, part 1 (v3)" 2024-04-12 06:35:55 -04:00
scsi_transport_iscsi.h scsi: iscsi: Remove unused extern declaration iscsi_lookup_iface() 2023-07-25 21:55:11 -04:00
scsi_transport_sas.h scsi: mpi3mr: Fix ATA NCQ priority support 2024-06-11 21:40:23 -04:00
scsi_transport_spi.h
scsi_transport_srp.h scsi: scsi_transport_srp: Fix a couple of kernel-doc warnings 2024-04-08 22:10:06 -04:00
scsicam.h
sg.h scsi: core: Rename status_byte to sg_status_byte 2022-12-01 03:22:23 +00:00
srp.h
viosrp.h