linux/drivers/scsi/libsas
Damien Le Moal aa28075f06 scsi: libsas: Fix sas_ata_qc_issue() handling of NCQ NON DATA commands
commit 8454563e4c upstream.

To detect for the DMA_NONE (no data transfer) DMA direction,
sas_ata_qc_issue() tests if the command protocol is ATA_PROT_NODATA.  This
test does not include the ATA_CMD_NCQ_NON_DATA command as this command
protocol is defined as ATA_PROT_NCQ_NODATA (equal to ATA_PROT_FLAG_NCQ) and
not as ATA_PROT_NODATA.

To include both NCQ and non-NCQ commands when testing for the DMA_NONE DMA
direction, use "!ata_is_data()".

Link: https://lore.kernel.org/r/20220220031810.738362-2-damien.lemoal@opensource.wdc.com
Fixes: 176ddd8917 ("scsi: libsas: Reset num_scatter if libata marks qc as NODATA")
Cc: stable@vger.kernel.org
Reviewed-by: John Garry <john.garry@huawei.com>
Reviewed-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08 14:39:52 +02:00
..
Kconfig ata: make SATA_PMP option selectable only if any SATA host driver is enabled 2020-03-26 10:28:17 -06:00
Makefile
sas_ata.c scsi: libsas: Fix sas_ata_qc_issue() handling of NCQ NON DATA commands 2022-04-08 14:39:52 +02:00
sas_discover.c SCSI misc on 20201013 2020-10-14 15:15:35 -07:00
sas_event.c scsi: libsas: Introduce a _gfp() variant of event notifiers 2021-03-25 09:04:11 +01:00
sas_expander.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
sas_host_smp.c
sas_init.c scsi: libsas: Introduce a _gfp() variant of event notifiers 2021-03-25 09:04:11 +01:00
sas_internal.h scsi: libsas: Introduce a _gfp() variant of event notifiers 2021-03-25 09:04:11 +01:00
sas_phy.c SCSI misc on 20190709 2019-07-11 15:14:01 -07:00
sas_port.c scsi: libsas: Use _safe() loop in sas_resume_port() 2021-06-03 09:00:50 +02:00
sas_scsi_host.c scsi: libsas: Add LUN number check in .slave_alloc callback 2021-07-25 14:36:16 +02:00
sas_task.c scsi: libsas: Tidy SAS address print format 2019-12-21 13:42:42 -05:00