Skip to content

Commit da3e19e

Browse files
jhovoldmartinkpetersen
authored andcommitted
scsi: Revert "scsi: sd: Do not repeat the starting disk message"
This reverts commit 7a6bbc2. The offending commit tried to suppress a double "Starting disk" message for some drivers, but instead started spamming the log with bogus messages every five seconds: [ 311.798956] sd 0:0:0:0: [sda] Starting disk [ 316.919103] sd 0:0:0:0: [sda] Starting disk [ 322.040775] sd 0:0:0:0: [sda] Starting disk [ 327.161140] sd 0:0:0:0: [sda] Starting disk [ 332.281352] sd 0:0:0:0: [sda] Starting disk [ 337.401878] sd 0:0:0:0: [sda] Starting disk [ 342.521527] sd 0:0:0:0: [sda] Starting disk [ 345.850401] sd 0:0:0:0: [sda] Starting disk [ 350.967132] sd 0:0:0:0: [sda] Starting disk [ 356.090454] sd 0:0:0:0: [sda] Starting disk ... on machines that do not actually stop the disk on runtime suspend (e.g. the Qualcomm sc8280xp CRD with UFS). Let's just revert for now to address the regression. Fixes: 7a6bbc2 ("scsi: sd: Do not repeat the starting disk message") Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20240716161101.30692-1-johan+linaro@kernel.org Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 3911af7 commit da3e19e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/scsi/sd.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4117,6 +4117,8 @@ static int sd_resume(struct device *dev)
41174117
{
41184118
struct scsi_disk *sdkp = dev_get_drvdata(dev);
41194119

4120+
sd_printk(KERN_NOTICE, sdkp, "Starting disk\n");
4121+
41204122
if (opal_unlock_from_suspend(sdkp->opal_dev)) {
41214123
sd_printk(KERN_NOTICE, sdkp, "OPAL unlock failed\n");
41224124
return -EIO;
@@ -4133,13 +4135,12 @@ static int sd_resume_common(struct device *dev, bool runtime)
41334135
if (!sdkp) /* E.g.: runtime resume at the start of sd_probe() */
41344136
return 0;
41354137

4136-
sd_printk(KERN_NOTICE, sdkp, "Starting disk\n");
4137-
41384138
if (!sd_do_start_stop(sdkp->device, runtime)) {
41394139
sdkp->suspended = false;
41404140
return 0;
41414141
}
41424142

4143+
sd_printk(KERN_NOTICE, sdkp, "Starting disk\n");
41434144
ret = sd_start_stop_device(sdkp, 1);
41444145
if (!ret) {
41454146
sd_resume(dev);

0 commit comments

Comments
 (0)