* [PATCH] scsi: wire up ata_scsi_dma_need_drain for SAS HBA drivers
@ 2020-06-10 6:45 Christoph Hellwig
2020-06-10 7:36 ` Jinpu Wang
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Christoph Hellwig @ 2020-06-10 6:45 UTC (permalink / raw)
To: martin.petersen
Cc: john.garry, brking, jinpu.wang, linux-scsi, Michael Ellerman
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.
Fixes: cc97923a5bcc ("block: move dma drain handling to scsi")
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Michael Ellerman <mpe@ellerman.id.au>
---
drivers/scsi/aic94xx/aic94xx_init.c | 1 +
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 1 +
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 1 +
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 1 +
drivers/scsi/ipr.c | 1 +
drivers/scsi/isci/init.c | 1 +
drivers/scsi/mvsas/mv_init.c | 1 +
drivers/scsi/pm8001/pm8001_init.c | 1 +
8 files changed, 8 insertions(+)
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
index d022407e5645c7..bef47f38dd0dbc 100644
--- a/drivers/scsi/aic94xx/aic94xx_init.c
+++ b/drivers/scsi/aic94xx/aic94xx_init.c
@@ -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,
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
index 2e1718f9ade218..09a7669dad4c67 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
@@ -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,
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
index e7e7849a4c14e2..968d3870235359 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
@@ -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,
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
index 3e6b78a1f993b9..55e2321a65bc5f 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -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,
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 7d77997d26d457..7d86f4ca266c86 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -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,
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
index 974c3b9116d5ba..085e285f427d93 100644
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -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,
diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index 5973eed9493820..b0de3bdb01db06 100644
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -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,
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index a8f5344fdfda2a..9e99262a2b9dd3 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -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,
--
2.26.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: wire up ata_scsi_dma_need_drain for SAS HBA drivers
2020-06-10 6:45 [PATCH] scsi: wire up ata_scsi_dma_need_drain for SAS HBA drivers Christoph Hellwig
@ 2020-06-10 7:36 ` Jinpu Wang
2020-06-10 8:03 ` John Garry
2020-06-11 5:43 ` Christoph Hellwig
2 siblings, 0 replies; 4+ messages in thread
From: Jinpu Wang @ 2020-06-10 7:36 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Martin K. Petersen, John Garry, brking, Linux SCSI Mailinglist,
Michael Ellerman
On Wed, Jun 10, 2020 at 8:45 AM Christoph Hellwig <hch@lst.de> wrote:
>
> 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.
>
> Fixes: cc97923a5bcc ("block: move dma drain handling to scsi")
> Reported-by: Michael Ellerman <mpe@ellerman.id.au>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Tested-by: Michael Ellerman <mpe@ellerman.id.au>
For pm8001, looks good to me!
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: wire up ata_scsi_dma_need_drain for SAS HBA drivers
2020-06-10 6:45 [PATCH] scsi: wire up ata_scsi_dma_need_drain for SAS HBA drivers Christoph Hellwig
2020-06-10 7:36 ` Jinpu Wang
@ 2020-06-10 8:03 ` John Garry
2020-06-11 5:43 ` Christoph Hellwig
2 siblings, 0 replies; 4+ messages in thread
From: John Garry @ 2020-06-10 8:03 UTC (permalink / raw)
To: Christoph Hellwig, martin.petersen
Cc: brking, jinpu.wang, linux-scsi, Michael Ellerman
On 10/06/2020 07:45, Christoph Hellwig wrote:
> 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.
>
> Fixes: cc97923a5bcc ("block: move dma drain handling to scsi")
> Reported-by: Michael Ellerman <mpe@ellerman.id.au>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Tested-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: John Garry <john.garry@huawei.com> #hisi_sas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: wire up ata_scsi_dma_need_drain for SAS HBA drivers
2020-06-10 6:45 [PATCH] scsi: wire up ata_scsi_dma_need_drain for SAS HBA drivers Christoph Hellwig
2020-06-10 7:36 ` Jinpu Wang
2020-06-10 8:03 ` John Garry
@ 2020-06-11 5:43 ` Christoph Hellwig
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2020-06-11 5:43 UTC (permalink / raw)
To: martin.petersen
Cc: john.garry, brking, jinpu.wang, linux-scsi, Michael Ellerman
I'll need to do a v2 as this causes undefined references when libata
isn't enabled.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-11 5:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-10 6:45 [PATCH] scsi: wire up ata_scsi_dma_need_drain for SAS HBA drivers Christoph Hellwig
2020-06-10 7:36 ` Jinpu Wang
2020-06-10 8:03 ` John Garry
2020-06-11 5:43 ` Christoph Hellwig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.