scsi: Wire up ata_scsi_dma_need_drain for SAS HBA drivers
authorChristoph Hellwig <hch@lst.de>
Mon, 15 Jun 2020 06:46:24 +0000 (08:46 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 16 Jun 2020 03:40:43 +0000 (23:40 -0400)
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: cc97923a5bcc ("block: move dma drain handling to scsi")
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Tested-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Acked-by: John Garry <john.garry@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aic94xx/aic94xx_init.c
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
drivers/scsi/ipr.c
drivers/scsi/isci/init.c
drivers/scsi/mvsas/mv_init.c
drivers/scsi/pm8001/pm8001_init.c

index d022407e5645c7166eb9f6a684bfd466f0c69b10..bef47f38dd0dbc3bc0a1a7faac414cb24e331a8a 100644 (file)
@@ -40,6 +40,7 @@ static struct scsi_host_template aic94xx_sht = {
        /* .name is initialized */
        .name                   = "aic94xx",
        .queuecommand           = sas_queuecommand,
+       .dma_need_drain         = ata_scsi_dma_need_drain,
        .target_alloc           = sas_target_alloc,
        .slave_configure        = sas_slave_configure,
        .scan_finished          = asd_scan_finished,
index 2e1718f9ade218527ef4e1b15142a658143a68e8..09a7669dad4c67ba671ed768e39e5c18f661d50a 100644 (file)
@@ -1756,6 +1756,7 @@ static struct scsi_host_template sht_v1_hw = {
        .proc_name              = DRV_NAME,
        .module                 = THIS_MODULE,
        .queuecommand           = sas_queuecommand,
+       .dma_need_drain         = ata_scsi_dma_need_drain,
        .target_alloc           = sas_target_alloc,
        .slave_configure        = hisi_sas_slave_configure,
        .scan_finished          = hisi_sas_scan_finished,
index e7e7849a4c14e21a1a5bdd18b8dd98525ace7ec8..968d3870235359a74ed9e67c3605fb8ce52d7b94 100644 (file)
@@ -3532,6 +3532,7 @@ static struct scsi_host_template sht_v2_hw = {
        .proc_name              = DRV_NAME,
        .module                 = THIS_MODULE,
        .queuecommand           = sas_queuecommand,
+       .dma_need_drain         = ata_scsi_dma_need_drain,
        .target_alloc           = sas_target_alloc,
        .slave_configure        = hisi_sas_slave_configure,
        .scan_finished          = hisi_sas_scan_finished,
index 3e6b78a1f993b9ae373c685c85897a813fa3357c..55e2321a65bc5ff628e0c93b1dc986ca16358164 100644 (file)
@@ -3075,6 +3075,7 @@ static struct scsi_host_template sht_v3_hw = {
        .proc_name              = DRV_NAME,
        .module                 = THIS_MODULE,
        .queuecommand           = sas_queuecommand,
+       .dma_need_drain         = ata_scsi_dma_need_drain,
        .target_alloc           = sas_target_alloc,
        .slave_configure        = hisi_sas_slave_configure,
        .scan_finished          = hisi_sas_scan_finished,
index 7d77997d26d457b28d130ff9f885b4967edb1da1..7d86f4ca266c86bd419c0118537fad551e8a6374 100644 (file)
@@ -6731,6 +6731,7 @@ static struct scsi_host_template driver_template = {
        .compat_ioctl = ipr_ioctl,
 #endif
        .queuecommand = ipr_queuecommand,
+       .dma_need_drain = ata_scsi_dma_need_drain,
        .eh_abort_handler = ipr_eh_abort,
        .eh_device_reset_handler = ipr_eh_dev_reset,
        .eh_host_reset_handler = ipr_eh_host_reset,
index 974c3b9116d5ba2b2c5169df00ca300e6dadcde3..085e285f427d936770affdd34de6d59d7e7558ea 100644 (file)
@@ -153,6 +153,7 @@ static struct scsi_host_template isci_sht = {
        .name                           = DRV_NAME,
        .proc_name                      = DRV_NAME,
        .queuecommand                   = sas_queuecommand,
+       .dma_need_drain                 = ata_scsi_dma_need_drain,
        .target_alloc                   = sas_target_alloc,
        .slave_configure                = sas_slave_configure,
        .scan_finished                  = isci_host_scan_finished,
index 5973eed949382092f76908d3f25870ee86473e93..b0de3bdb01db06329a4195f25db3cf9fbc9b2a56 100644 (file)
@@ -33,6 +33,7 @@ static struct scsi_host_template mvs_sht = {
        .module                 = THIS_MODULE,
        .name                   = DRV_NAME,
        .queuecommand           = sas_queuecommand,
+       .dma_need_drain         = ata_scsi_dma_need_drain,
        .target_alloc           = sas_target_alloc,
        .slave_configure        = sas_slave_configure,
        .scan_finished          = mvs_scan_finished,
index a8f5344fdfda2ad0826a3dd5d7772286f2eff864..9e99262a2b9dd362a01b74bb7c5c0c978659dc48 100644 (file)
@@ -87,6 +87,7 @@ static struct scsi_host_template pm8001_sht = {
        .module                 = THIS_MODULE,
        .name                   = DRV_NAME,
        .queuecommand           = sas_queuecommand,
+       .dma_need_drain         = ata_scsi_dma_need_drain,
        .target_alloc           = sas_target_alloc,
        .slave_configure        = sas_slave_configure,
        .scan_finished          = pm8001_scan_finished,