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 scsi: libfc: Replace one-element arrays with flexible-array members 2022-02-27 21:17:37 -05:00
fc_frame.h scsi: libfc: Move scsi/fc_encode.h to libfc 2020-10-29 21:49:25 -04:00
fcoe_sysfs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
iscsi_if.h scsi: iscsi: Add support for asynchronous iSCSI session destruction 2020-03-11 23:07:57 -04:00
iscsi_proto.h scsi: Fix spelling mistakes in header files 2021-05-21 17:22:45 -04:00
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_tcp.h SCSI misc on 20190709 2019-07-11 15:14:01 -07:00
libiscsi.h scsi: iscsi: Declare SCSI host template const 2023-03-24 19:19:57 -04:00
libsas.h scsi: libata: Switch to using ->device_configure 2024-04-11 21:37:50 -04:00
sas_ata.h scsi: libsas: Define NCQ Priority sysfs attributes for SATA devices 2024-03-25 16:00:06 -04:00
sas.h scsi: libsas: Introduce struct smp_rps_resp 2022-06-10 13:08:06 -04:00
scsi_bsg_iscsi.h scsi: Fix spelling mistakes in header files 2021-05-21 17:22:45 -04:00
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: core: Reduce memory required for SCSI logging 2019-08-07 21:47:29 -04:00
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: core: Introduce enum scsi_disposition 2021-04-15 22:44:40 -04:00
scsi_driver.h SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
scsi_eh.h scsi: core: Remove the cmd field from struct scsi_request 2022-03-01 22:21:49 -05:00
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: core: Only return started requests from scsi_host_find_tag() 2020-07-24 22:09:56 -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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
scsi_transport_srp.h scsi: scsi_transport_srp: Fix a couple of kernel-doc warnings 2024-04-08 22:10:06 -04:00
scsi_transport.h scsi: core: Initialize scsi midlayer limits before allocating the queue 2024-04-11 21:37:48 -04:00
scsi.h scsi: core: Don't use "proxy" headers 2024-04-24 21:27:15 -04:00
scsicam.h scsi: simplify scsi_partsize 2020-03-24 07:57:07 -06:00
sg.h scsi: core: Rename status_byte to sg_status_byte 2022-12-01 03:22:23 +00:00
srp.h RDMA/srp: Apply the __packed attribute to members instead of structures 2021-05-28 20:21:20 -03:00
viosrp.h scsi: ibmvscsis: Silence -Warray-bounds warning 2022-02-11 16:42:22 -05:00