Commit b8f1d1e0 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Martin K. Petersen

scsi: Wire up ata_scsi_dma_need_drain for SAS HBA drivers

We need ata_scsi_dma_need_drain for all drivers wired up to drive ATAPI
devices through libata.  That also includes the SAS HBA drivers in addition
to native libata HBA drivers.

Link: https://lore.kernel.org/r/20200615064624.37317-3-hch@lst.de
Fixes: cc97923a ("block: move dma drain handling to scsi")
Reported-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Tested-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Acked-by: default avatarJack Wang <jinpu.wang@cloud.ionos.com>
Acked-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 7bb7ee87
...@@ -40,6 +40,7 @@ static struct scsi_host_template aic94xx_sht = { ...@@ -40,6 +40,7 @@ static struct scsi_host_template aic94xx_sht = {
/* .name is initialized */ /* .name is initialized */
.name = "aic94xx", .name = "aic94xx",
.queuecommand = sas_queuecommand, .queuecommand = sas_queuecommand,
.dma_need_drain = ata_scsi_dma_need_drain,
.target_alloc = sas_target_alloc, .target_alloc = sas_target_alloc,
.slave_configure = sas_slave_configure, .slave_configure = sas_slave_configure,
.scan_finished = asd_scan_finished, .scan_finished = asd_scan_finished,
......
...@@ -1756,6 +1756,7 @@ static struct scsi_host_template sht_v1_hw = { ...@@ -1756,6 +1756,7 @@ static struct scsi_host_template sht_v1_hw = {
.proc_name = DRV_NAME, .proc_name = DRV_NAME,
.module = THIS_MODULE, .module = THIS_MODULE,
.queuecommand = sas_queuecommand, .queuecommand = sas_queuecommand,
.dma_need_drain = ata_scsi_dma_need_drain,
.target_alloc = sas_target_alloc, .target_alloc = sas_target_alloc,
.slave_configure = hisi_sas_slave_configure, .slave_configure = hisi_sas_slave_configure,
.scan_finished = hisi_sas_scan_finished, .scan_finished = hisi_sas_scan_finished,
......
...@@ -3532,6 +3532,7 @@ static struct scsi_host_template sht_v2_hw = { ...@@ -3532,6 +3532,7 @@ static struct scsi_host_template sht_v2_hw = {
.proc_name = DRV_NAME, .proc_name = DRV_NAME,
.module = THIS_MODULE, .module = THIS_MODULE,
.queuecommand = sas_queuecommand, .queuecommand = sas_queuecommand,
.dma_need_drain = ata_scsi_dma_need_drain,
.target_alloc = sas_target_alloc, .target_alloc = sas_target_alloc,
.slave_configure = hisi_sas_slave_configure, .slave_configure = hisi_sas_slave_configure,
.scan_finished = hisi_sas_scan_finished, .scan_finished = hisi_sas_scan_finished,
......
...@@ -3075,6 +3075,7 @@ static struct scsi_host_template sht_v3_hw = { ...@@ -3075,6 +3075,7 @@ static struct scsi_host_template sht_v3_hw = {
.proc_name = DRV_NAME, .proc_name = DRV_NAME,
.module = THIS_MODULE, .module = THIS_MODULE,
.queuecommand = sas_queuecommand, .queuecommand = sas_queuecommand,
.dma_need_drain = ata_scsi_dma_need_drain,
.target_alloc = sas_target_alloc, .target_alloc = sas_target_alloc,
.slave_configure = hisi_sas_slave_configure, .slave_configure = hisi_sas_slave_configure,
.scan_finished = hisi_sas_scan_finished, .scan_finished = hisi_sas_scan_finished,
......
...@@ -6731,6 +6731,7 @@ static struct scsi_host_template driver_template = { ...@@ -6731,6 +6731,7 @@ static struct scsi_host_template driver_template = {
.compat_ioctl = ipr_ioctl, .compat_ioctl = ipr_ioctl,
#endif #endif
.queuecommand = ipr_queuecommand, .queuecommand = ipr_queuecommand,
.dma_need_drain = ata_scsi_dma_need_drain,
.eh_abort_handler = ipr_eh_abort, .eh_abort_handler = ipr_eh_abort,
.eh_device_reset_handler = ipr_eh_dev_reset, .eh_device_reset_handler = ipr_eh_dev_reset,
.eh_host_reset_handler = ipr_eh_host_reset, .eh_host_reset_handler = ipr_eh_host_reset,
......
...@@ -153,6 +153,7 @@ static struct scsi_host_template isci_sht = { ...@@ -153,6 +153,7 @@ static struct scsi_host_template isci_sht = {
.name = DRV_NAME, .name = DRV_NAME,
.proc_name = DRV_NAME, .proc_name = DRV_NAME,
.queuecommand = sas_queuecommand, .queuecommand = sas_queuecommand,
.dma_need_drain = ata_scsi_dma_need_drain,
.target_alloc = sas_target_alloc, .target_alloc = sas_target_alloc,
.slave_configure = sas_slave_configure, .slave_configure = sas_slave_configure,
.scan_finished = isci_host_scan_finished, .scan_finished = isci_host_scan_finished,
......
...@@ -33,6 +33,7 @@ static struct scsi_host_template mvs_sht = { ...@@ -33,6 +33,7 @@ static struct scsi_host_template mvs_sht = {
.module = THIS_MODULE, .module = THIS_MODULE,
.name = DRV_NAME, .name = DRV_NAME,
.queuecommand = sas_queuecommand, .queuecommand = sas_queuecommand,
.dma_need_drain = ata_scsi_dma_need_drain,
.target_alloc = sas_target_alloc, .target_alloc = sas_target_alloc,
.slave_configure = sas_slave_configure, .slave_configure = sas_slave_configure,
.scan_finished = mvs_scan_finished, .scan_finished = mvs_scan_finished,
......
...@@ -87,6 +87,7 @@ static struct scsi_host_template pm8001_sht = { ...@@ -87,6 +87,7 @@ static struct scsi_host_template pm8001_sht = {
.module = THIS_MODULE, .module = THIS_MODULE,
.name = DRV_NAME, .name = DRV_NAME,
.queuecommand = sas_queuecommand, .queuecommand = sas_queuecommand,
.dma_need_drain = ata_scsi_dma_need_drain,
.target_alloc = sas_target_alloc, .target_alloc = sas_target_alloc,
.slave_configure = sas_slave_configure, .slave_configure = sas_slave_configure,
.scan_finished = pm8001_scan_finished, .scan_finished = pm8001_scan_finished,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment