+7
drivers/ata/libata-scsi.c
+7
drivers/ata/libata-scsi.c
···
1100
1100
}
1101
1101
} else {
1102
1102
sdev->sector_size = ata_id_logical_sector_size(dev->id);
1103
+
/*
1104
+
* Stop the drive on suspend but do not issue START STOP UNIT
1105
+
* on resume as this is not necessary and may fail: the device
1106
+
* will be woken up by ata_port_pm_resume() with a port reset
1107
+
* and device revalidation.
1108
+
*/
1103
1109
sdev->manage_start_stop = 1;
1110
+
sdev->no_start_on_resume = 1;
1104
1111
}
1105
1112
1106
1113
/*
+6
-3
drivers/scsi/sd.c
+6
-3
drivers/scsi/sd.c
···
3876
3876
static int sd_resume(struct device *dev)
3877
3877
{
3878
3878
struct scsi_disk *sdkp = dev_get_drvdata(dev);
3879
-
int ret;
3879
+
int ret = 0;
3880
3880
3881
3881
if (!sdkp) /* E.g.: runtime resume at the start of sd_probe() */
3882
3882
return 0;
···
3884
3884
if (!sdkp->device->manage_start_stop)
3885
3885
return 0;
3886
3886
3887
-
sd_printk(KERN_NOTICE, sdkp, "Starting disk\n");
3888
-
ret = sd_start_stop_device(sdkp, 1);
3887
+
if (!sdkp->device->no_start_on_resume) {
3888
+
sd_printk(KERN_NOTICE, sdkp, "Starting disk\n");
3889
+
ret = sd_start_stop_device(sdkp, 1);
3890
+
}
3891
+
3889
3892
if (!ret)
3890
3893
opal_unlock_from_suspend(sdkp->opal_dev);
3891
3894
return ret;
+1
include/scsi/scsi_device.h
+1
include/scsi/scsi_device.h
···
194
194
unsigned no_start_on_add:1; /* do not issue start on add */
195
195
unsigned allow_restart:1; /* issue START_UNIT in error handler */
196
196
unsigned manage_start_stop:1; /* Let HLD (sd) manage start/stop */
197
+
unsigned no_start_on_resume:1; /* Do not issue START_STOP_UNIT on resume */
197
198
unsigned start_stop_pwr_cond:1; /* Set power cond. in START_STOP_UNIT */
198
199
unsigned no_uld_attach:1; /* disable connecting to upper level drivers */
199
200
unsigned select_no_atn:1;