use scsi_report_bus_reset() in scsi_erroc.c
PATCH 1/1 use scsi_report_bus_reset() in scsi_erroc.c
Currently scsi_error.c has two opencoded copies for scsi_report_bus_reset. Get rid of them.
drivers/scsi/scsi_error.c +4 -20
@@ -916,7 +913,6 @@**/ static int scsi_try_bus_reset (struct scsi_cmnd *scmd) { -struct scsi_device *sdev;unsigned long flags;int rtn;
@@ -934,16 +930,9 @@if (rtn ==SUCCESS ) {scsi_sleep (BUS_RESET_SETTLE_TIME ); -/* -* Mark all affected devices to expect a unit attention. -*/ -list_for_each_entry (sdev, &scmd->device->host->my_devices, - siblings) -if (scmd->device->channel == sdev->channel) { - sdev->was_reset =1 ; - sdev->expecting_cc_ua =1 ; - } +scsi_report_bus_reset (scmd->device->host, scmd->device->channel); } +return rtn; }
@@ -953,7 +942,6 @@**/ static int scsi_try_host_reset (struct scsi_cmnd *scmd) { -struct scsi_device *sdev;unsigned long flags;int rtn;
@@ -971,16 +959,9 @@if (rtn ==SUCCESS ) {scsi_sleep (HOST_RESET_SETTLE_TIME ); -/* -* Mark all affected devices to expect a unit attention. -*/ -list_for_each_entry (sdev, &scmd->device->host->my_devices, - siblings) -if (scmd->device->channel == sdev->channel) { - sdev->was_reset =1 ; - sdev->expecting_cc_ua =1 ; - } +scsi_report_bus_reset (scmd->device->host, scmd->device->channel); } +return rtn; }