Home Home > GIT Browse > vanilla
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Brugger <mbrugger@suse.com>2017-11-24 13:51:29 +0100
committerMatthias Brugger <mbrugger@suse.com>2017-11-30 18:27:28 +0100
commit7a4ba5e077420bec44ae45422c8b88ff8858a03d (patch)
treeb1b6ea9c9b5de169b89b946f96218a92b12e6c79
parent30177f56557e7c520cf60f97b49025f65eef752b (diff)
scsi: libsas: move bus_reset_handler() to target_reset_handler()
(bsc#1068693).
-rw-r--r--patches.drivers/scsi-libsas-move-bus_reset_handler-to-target_reset_h.patch148
-rw-r--r--series.conf1
2 files changed, 149 insertions, 0 deletions
diff --git a/patches.drivers/scsi-libsas-move-bus_reset_handler-to-target_reset_h.patch b/patches.drivers/scsi-libsas-move-bus_reset_handler-to-target_reset_h.patch
new file mode 100644
index 0000000000..834cea8e6d
--- /dev/null
+++ b/patches.drivers/scsi-libsas-move-bus_reset_handler-to-target_reset_h.patch
@@ -0,0 +1,148 @@
+From: Hannes Reinecke <hare@suse.de>
+Date: Fri, 25 Aug 2017 13:57:02 +0200
+Subject: scsi: libsas: move bus_reset_handler() to target_reset_handler()
+Git-commit: cc199e78460565eeab0399875dbf9da8e2901c42
+Patch-mainline: v4.14-rc1
+References: bsc#1068693
+
+The bus reset handler is calling I_T Nexus reset, which logically is a
+target reset as it need to specify both the initiator and the target.
+So move it to target reset.
+
+Signed-off-by: Hannes Reinecke <hare@suse.com>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Matthias Brugger <mbrugger@suse.com>
+---
+ drivers/scsi/aic94xx/aic94xx_init.c | 2 +-
+ drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +-
+ drivers/scsi/isci/init.c | 2 +-
+ drivers/scsi/libsas/sas_scsi_host.c | 12 ++++++------
+ drivers/scsi/mvsas/mv_init.c | 2 +-
+ drivers/scsi/pm8001/pm8001_init.c | 2 +-
+ include/scsi/libsas.h | 2 +-
+ 7 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
+index a240feee16e5..6c838865ac5a 100644
+--- a/drivers/scsi/aic94xx/aic94xx_init.c
++++ b/drivers/scsi/aic94xx/aic94xx_init.c
+@@ -70,7 +70,7 @@ static struct scsi_host_template aic94xx_sht = {
+ .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
+ .use_clustering = ENABLE_CLUSTERING,
+ .eh_device_reset_handler = sas_eh_device_reset_handler,
+- .eh_bus_reset_handler = sas_eh_bus_reset_handler,
++ .eh_target_reset_handler = sas_eh_target_reset_handler,
+ .target_destroy = sas_target_destroy,
+ .ioctl = sas_ioctl,
+ .track_queue_depth = 1,
+diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
+index bdef111434b8..16664f2e15fb 100644
+--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
++++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
+@@ -1562,7 +1562,7 @@ static struct scsi_host_template _hisi_sas_sht = {
+ .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
+ .use_clustering = ENABLE_CLUSTERING,
+ .eh_device_reset_handler = sas_eh_device_reset_handler,
+- .eh_bus_reset_handler = sas_eh_bus_reset_handler,
++ .eh_target_reset_handler = sas_eh_target_reset_handler,
+ .target_destroy = sas_target_destroy,
+ .ioctl = sas_ioctl,
+ };
+diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
+index 45371179ab87..922e3e56c90d 100644
+--- a/drivers/scsi/isci/init.c
++++ b/drivers/scsi/isci/init.c
+@@ -166,7 +166,7 @@ static struct scsi_host_template isci_sht = {
+ .use_clustering = ENABLE_CLUSTERING,
+ .eh_abort_handler = sas_eh_abort_handler,
+ .eh_device_reset_handler = sas_eh_device_reset_handler,
+- .eh_bus_reset_handler = sas_eh_bus_reset_handler,
++ .eh_target_reset_handler = sas_eh_target_reset_handler,
+ .target_destroy = sas_target_destroy,
+ .ioctl = sas_ioctl,
+ .shost_attrs = isci_host_attrs,
+diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
+index fc90b8c65860..ea8ad06ff582 100644
+--- a/drivers/scsi/libsas/sas_scsi_host.c
++++ b/drivers/scsi/libsas/sas_scsi_host.c
+@@ -526,7 +526,7 @@ int sas_eh_device_reset_handler(struct scsi_cmnd *cmd)
+ return FAILED;
+ }
+
+-int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd)
++int sas_eh_target_reset_handler(struct scsi_cmnd *cmd)
+ {
+ int res;
+ struct Scsi_Host *host = cmd->device->host;
+@@ -554,15 +554,15 @@ static int try_to_reset_cmd_device(struct scsi_cmnd *cmd)
+ struct Scsi_Host *shost = cmd->device->host;
+
+ if (!shost->hostt->eh_device_reset_handler)
+- goto try_bus_reset;
++ goto try_target_reset;
+
+ res = shost->hostt->eh_device_reset_handler(cmd);
+ if (res == SUCCESS)
+ return res;
+
+-try_bus_reset:
+- if (shost->hostt->eh_bus_reset_handler)
+- return shost->hostt->eh_bus_reset_handler(cmd);
++try_target_reset:
++ if (shost->hostt->eh_target_reset_handler)
++ return shost->hostt->eh_target_reset_handler(cmd);
+
+ return FAILED;
+ }
+@@ -993,6 +993,6 @@ EXPORT_SYMBOL_GPL(sas_bios_param);
+ EXPORT_SYMBOL_GPL(sas_task_abort);
+ EXPORT_SYMBOL_GPL(sas_phy_reset);
+ EXPORT_SYMBOL_GPL(sas_eh_device_reset_handler);
+-EXPORT_SYMBOL_GPL(sas_eh_bus_reset_handler);
++EXPORT_SYMBOL_GPL(sas_eh_target_reset_handler);
+ EXPORT_SYMBOL_GPL(sas_target_destroy);
+ EXPORT_SYMBOL_GPL(sas_ioctl);
+diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
+index f0a096a1e276..718c88de328b 100644
+--- a/drivers/scsi/mvsas/mv_init.c
++++ b/drivers/scsi/mvsas/mv_init.c
+@@ -61,7 +61,7 @@ static struct scsi_host_template mvs_sht = {
+ .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
+ .use_clustering = ENABLE_CLUSTERING,
+ .eh_device_reset_handler = sas_eh_device_reset_handler,
+- .eh_bus_reset_handler = sas_eh_bus_reset_handler,
++ .eh_target_reset_handler = sas_eh_target_reset_handler,
+ .target_destroy = sas_target_destroy,
+ .ioctl = sas_ioctl,
+ .shost_attrs = mvst_host_attrs,
+diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
+index 2908881bad51..0e013f76b582 100644
+--- a/drivers/scsi/pm8001/pm8001_init.c
++++ b/drivers/scsi/pm8001/pm8001_init.c
+@@ -86,7 +86,7 @@ static struct scsi_host_template pm8001_sht = {
+ .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
+ .use_clustering = ENABLE_CLUSTERING,
+ .eh_device_reset_handler = sas_eh_device_reset_handler,
+- .eh_bus_reset_handler = sas_eh_bus_reset_handler,
++ .eh_target_reset_handler = sas_eh_target_reset_handler,
+ .target_destroy = sas_target_destroy,
+ .ioctl = sas_ioctl,
+ .shost_attrs = pm8001_host_attrs,
+diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
+index cfaeed256ab2..e7c012ce5ecd 100644
+--- a/include/scsi/libsas.h
++++ b/include/scsi/libsas.h
+@@ -714,7 +714,7 @@ void sas_init_dev(struct domain_device *);
+ void sas_task_abort(struct sas_task *);
+ int sas_eh_abort_handler(struct scsi_cmnd *cmd);
+ int sas_eh_device_reset_handler(struct scsi_cmnd *cmd);
+-int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd);
++int sas_eh_target_reset_handler(struct scsi_cmnd *cmd);
+
+ extern void sas_target_destroy(struct scsi_target *);
+ extern int sas_slave_alloc(struct scsi_device *);
+--
+2.14.2
+
diff --git a/series.conf b/series.conf
index fa9bc958cf..43ff76c7f9 100644
--- a/series.conf
+++ b/series.conf
@@ -4964,6 +4964,7 @@
patches.drivers/scsi-lpfc-Add-Buffer-to-Buffer-credit-recovery-suppo.patch
patches.drivers/scsi-lpfc-fix-integer-constant-too-large-error-on-32.patch
patches.drivers/scsi-lpfc-lpfc-version-bump-11.4.0.3.patch
+ patches.drivers/scsi-libsas-move-bus_reset_handler-to-target_reset_h.patch
patches.drivers/scsi-qedf-drop-bus-reset-handler.patch
patches.drivers/scsi-megaraid_mbox-drop-duplicate-bus-reset-and-devi.patch
patches.fixes/scsi-ses-Fix-racy-cleanup-of-sys-in-remove_dev.patch