android_kernel_xiaomi_sm7250/drivers/scsi/libsas
Damien Le Moal 4af5b63d84 scsi: libsas: Fix sas_ata_qc_issue() handling of NCQ NON DATA commands
commit 8454563e4c2aafbfb81a383ab423ea8b9b430a25 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: 176ddd89171d ("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-15 14:14:40 +02:00
..
Kconfig
Makefile
sas_ata.c scsi: libsas: Fix sas_ata_qc_issue() handling of NCQ NON DATA commands 2022-04-15 14:14:40 +02:00
sas_discover.c
sas_dump.c
sas_dump.h
sas_event.c
sas_expander.c
sas_host_smp.c
sas_init.c
sas_internal.h
sas_phy.c
sas_port.c
sas_scsi_host.c scsi: libsas: Add LUN number check in .slave_alloc callback 2021-07-28 11:13:44 +02:00
sas_task.c