Skip to content

Commit 6467777

Browse files
committed
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "One minor fix and two patches reworking the ata dma drain for the !CONFIG_LIBATA case. The latter is a 5.7 regression fix" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: Wire up ata_scsi_dma_need_drain for SAS HBA drivers scsi: libata: Provide an ata_scsi_dma_need_drain stub for !CONFIG_ATA scsi: ufs-bsg: Fix runtime PM imbalance on error
2 parents a5c6a1f + b8f1d1e commit 6467777

File tree

10 files changed

+15
-1
lines changed

10 files changed

+15
-1
lines changed

drivers/scsi/aic94xx/aic94xx_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ static struct scsi_host_template aic94xx_sht = {
4040
/* .name is initialized */
4141
.name = "aic94xx",
4242
.queuecommand = sas_queuecommand,
43+
.dma_need_drain = ata_scsi_dma_need_drain,
4344
.target_alloc = sas_target_alloc,
4445
.slave_configure = sas_slave_configure,
4546
.scan_finished = asd_scan_finished,

drivers/scsi/hisi_sas/hisi_sas_v1_hw.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,6 +1756,7 @@ static struct scsi_host_template sht_v1_hw = {
17561756
.proc_name = DRV_NAME,
17571757
.module = THIS_MODULE,
17581758
.queuecommand = sas_queuecommand,
1759+
.dma_need_drain = ata_scsi_dma_need_drain,
17591760
.target_alloc = sas_target_alloc,
17601761
.slave_configure = hisi_sas_slave_configure,
17611762
.scan_finished = hisi_sas_scan_finished,

drivers/scsi/hisi_sas/hisi_sas_v2_hw.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3532,6 +3532,7 @@ static struct scsi_host_template sht_v2_hw = {
35323532
.proc_name = DRV_NAME,
35333533
.module = THIS_MODULE,
35343534
.queuecommand = sas_queuecommand,
3535+
.dma_need_drain = ata_scsi_dma_need_drain,
35353536
.target_alloc = sas_target_alloc,
35363537
.slave_configure = hisi_sas_slave_configure,
35373538
.scan_finished = hisi_sas_scan_finished,

drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3075,6 +3075,7 @@ static struct scsi_host_template sht_v3_hw = {
30753075
.proc_name = DRV_NAME,
30763076
.module = THIS_MODULE,
30773077
.queuecommand = sas_queuecommand,
3078+
.dma_need_drain = ata_scsi_dma_need_drain,
30783079
.target_alloc = sas_target_alloc,
30793080
.slave_configure = hisi_sas_slave_configure,
30803081
.scan_finished = hisi_sas_scan_finished,

drivers/scsi/ipr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6731,6 +6731,7 @@ static struct scsi_host_template driver_template = {
67316731
.compat_ioctl = ipr_ioctl,
67326732
#endif
67336733
.queuecommand = ipr_queuecommand,
6734+
.dma_need_drain = ata_scsi_dma_need_drain,
67346735
.eh_abort_handler = ipr_eh_abort,
67356736
.eh_device_reset_handler = ipr_eh_dev_reset,
67366737
.eh_host_reset_handler = ipr_eh_host_reset,

drivers/scsi/isci/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ static struct scsi_host_template isci_sht = {
153153
.name = DRV_NAME,
154154
.proc_name = DRV_NAME,
155155
.queuecommand = sas_queuecommand,
156+
.dma_need_drain = ata_scsi_dma_need_drain,
156157
.target_alloc = sas_target_alloc,
157158
.slave_configure = sas_slave_configure,
158159
.scan_finished = isci_host_scan_finished,

drivers/scsi/mvsas/mv_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ static struct scsi_host_template mvs_sht = {
3333
.module = THIS_MODULE,
3434
.name = DRV_NAME,
3535
.queuecommand = sas_queuecommand,
36+
.dma_need_drain = ata_scsi_dma_need_drain,
3637
.target_alloc = sas_target_alloc,
3738
.slave_configure = sas_slave_configure,
3839
.scan_finished = mvs_scan_finished,

drivers/scsi/pm8001/pm8001_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ static struct scsi_host_template pm8001_sht = {
8787
.module = THIS_MODULE,
8888
.name = DRV_NAME,
8989
.queuecommand = sas_queuecommand,
90+
.dma_need_drain = ata_scsi_dma_need_drain,
9091
.target_alloc = sas_target_alloc,
9192
.slave_configure = sas_slave_configure,
9293
.scan_finished = pm8001_scan_finished,

drivers/scsi/ufs/ufs_bsg.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ static int ufs_bsg_request(struct bsg_job *job)
106106
desc_op = bsg_request->upiu_req.qr.opcode;
107107
ret = ufs_bsg_alloc_desc_buffer(hba, job, &desc_buff,
108108
&desc_len, desc_op);
109-
if (ret)
109+
if (ret) {
110+
pm_runtime_put_sync(hba->dev);
110111
goto out;
112+
}
111113

112114
/* fall through */
113115
case UPIU_TRANSACTION_NOP_OUT:

include/linux/libata.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,11 @@ extern int ata_scsi_ioctl(struct scsi_device *dev, unsigned int cmd,
10951095
#define ATA_SCSI_COMPAT_IOCTL /* empty */
10961096
#endif
10971097
extern int ata_scsi_queuecmd(struct Scsi_Host *h, struct scsi_cmnd *cmd);
1098+
#if IS_ENABLED(CONFIG_ATA)
10981099
bool ata_scsi_dma_need_drain(struct request *rq);
1100+
#else
1101+
#define ata_scsi_dma_need_drain NULL
1102+
#endif
10991103
extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev,
11001104
unsigned int cmd, void __user *arg);
11011105
extern bool ata_link_online(struct ata_link *link);

0 commit comments

Comments
 (0)