Commit cc199e78 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen

scsi: libsas: move bus_reset_handler() to target_reset_handler()

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: default avatarHannes Reinecke <hare@suse.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent e13849b7
...@@ -70,7 +70,7 @@ static struct scsi_host_template aic94xx_sht = { ...@@ -70,7 +70,7 @@ static struct scsi_host_template aic94xx_sht = {
.max_sectors = SCSI_DEFAULT_MAX_SECTORS, .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
.use_clustering = ENABLE_CLUSTERING, .use_clustering = ENABLE_CLUSTERING,
.eh_device_reset_handler = sas_eh_device_reset_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, .target_destroy = sas_target_destroy,
.ioctl = sas_ioctl, .ioctl = sas_ioctl,
.track_queue_depth = 1, .track_queue_depth = 1,
......
...@@ -1562,7 +1562,7 @@ static struct scsi_host_template _hisi_sas_sht = { ...@@ -1562,7 +1562,7 @@ static struct scsi_host_template _hisi_sas_sht = {
.max_sectors = SCSI_DEFAULT_MAX_SECTORS, .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
.use_clustering = ENABLE_CLUSTERING, .use_clustering = ENABLE_CLUSTERING,
.eh_device_reset_handler = sas_eh_device_reset_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, .target_destroy = sas_target_destroy,
.ioctl = sas_ioctl, .ioctl = sas_ioctl,
}; };
......
...@@ -166,7 +166,7 @@ static struct scsi_host_template isci_sht = { ...@@ -166,7 +166,7 @@ static struct scsi_host_template isci_sht = {
.use_clustering = ENABLE_CLUSTERING, .use_clustering = ENABLE_CLUSTERING,
.eh_abort_handler = sas_eh_abort_handler, .eh_abort_handler = sas_eh_abort_handler,
.eh_device_reset_handler = sas_eh_device_reset_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, .target_destroy = sas_target_destroy,
.ioctl = sas_ioctl, .ioctl = sas_ioctl,
.shost_attrs = isci_host_attrs, .shost_attrs = isci_host_attrs,
......
...@@ -526,7 +526,7 @@ int sas_eh_device_reset_handler(struct scsi_cmnd *cmd) ...@@ -526,7 +526,7 @@ int sas_eh_device_reset_handler(struct scsi_cmnd *cmd)
return FAILED; return FAILED;
} }
int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd) int sas_eh_target_reset_handler(struct scsi_cmnd *cmd)
{ {
int res; int res;
struct Scsi_Host *host = cmd->device->host; struct Scsi_Host *host = cmd->device->host;
...@@ -554,15 +554,15 @@ static int try_to_reset_cmd_device(struct scsi_cmnd *cmd) ...@@ -554,15 +554,15 @@ static int try_to_reset_cmd_device(struct scsi_cmnd *cmd)
struct Scsi_Host *shost = cmd->device->host; struct Scsi_Host *shost = cmd->device->host;
if (!shost->hostt->eh_device_reset_handler) if (!shost->hostt->eh_device_reset_handler)
goto try_bus_reset; goto try_target_reset;
res = shost->hostt->eh_device_reset_handler(cmd); res = shost->hostt->eh_device_reset_handler(cmd);
if (res == SUCCESS) if (res == SUCCESS)
return res; return res;
try_bus_reset: try_target_reset:
if (shost->hostt->eh_bus_reset_handler) if (shost->hostt->eh_target_reset_handler)
return shost->hostt->eh_bus_reset_handler(cmd); return shost->hostt->eh_target_reset_handler(cmd);
return FAILED; return FAILED;
} }
...@@ -993,6 +993,6 @@ EXPORT_SYMBOL_GPL(sas_bios_param); ...@@ -993,6 +993,6 @@ EXPORT_SYMBOL_GPL(sas_bios_param);
EXPORT_SYMBOL_GPL(sas_task_abort); EXPORT_SYMBOL_GPL(sas_task_abort);
EXPORT_SYMBOL_GPL(sas_phy_reset); EXPORT_SYMBOL_GPL(sas_phy_reset);
EXPORT_SYMBOL_GPL(sas_eh_device_reset_handler); 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_target_destroy);
EXPORT_SYMBOL_GPL(sas_ioctl); EXPORT_SYMBOL_GPL(sas_ioctl);
...@@ -61,7 +61,7 @@ static struct scsi_host_template mvs_sht = { ...@@ -61,7 +61,7 @@ static struct scsi_host_template mvs_sht = {
.max_sectors = SCSI_DEFAULT_MAX_SECTORS, .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
.use_clustering = ENABLE_CLUSTERING, .use_clustering = ENABLE_CLUSTERING,
.eh_device_reset_handler = sas_eh_device_reset_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, .target_destroy = sas_target_destroy,
.ioctl = sas_ioctl, .ioctl = sas_ioctl,
.shost_attrs = mvst_host_attrs, .shost_attrs = mvst_host_attrs,
......
...@@ -86,7 +86,7 @@ static struct scsi_host_template pm8001_sht = { ...@@ -86,7 +86,7 @@ static struct scsi_host_template pm8001_sht = {
.max_sectors = SCSI_DEFAULT_MAX_SECTORS, .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
.use_clustering = ENABLE_CLUSTERING, .use_clustering = ENABLE_CLUSTERING,
.eh_device_reset_handler = sas_eh_device_reset_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, .target_destroy = sas_target_destroy,
.ioctl = sas_ioctl, .ioctl = sas_ioctl,
.shost_attrs = pm8001_host_attrs, .shost_attrs = pm8001_host_attrs,
......
...@@ -714,7 +714,7 @@ void sas_init_dev(struct domain_device *); ...@@ -714,7 +714,7 @@ void sas_init_dev(struct domain_device *);
void sas_task_abort(struct sas_task *); void sas_task_abort(struct sas_task *);
int sas_eh_abort_handler(struct scsi_cmnd *cmd); int sas_eh_abort_handler(struct scsi_cmnd *cmd);
int sas_eh_device_reset_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 void sas_target_destroy(struct scsi_target *);
extern int sas_slave_alloc(struct scsi_device *); extern int sas_slave_alloc(struct scsi_device *);
......
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