Revert "scsi: core: sd: Add silence_suspend flag to suppress some PM messages"

This reverts commit 6ade94e6af.

It breaks the kernel abi so revert it for now.  We will add it back
later at the next kabi update.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9e57e6afc592d6a275585e6d0503a2e3ca5ec0c2
This commit is contained in:
Greg Kroah-Hartman 2022-04-12 16:28:03 +02:00
parent ab02bc73ec
commit 240526f655
3 changed files with 4 additions and 12 deletions

View File

@ -485,13 +485,8 @@ static void scsi_report_sense(struct scsi_device *sdev,
if (sshdr->asc == 0x29) {
evt_type = SDEV_EVT_POWER_ON_RESET_OCCURRED;
/*
* Do not print message if it is an expected side-effect
* of runtime PM.
*/
if (!sdev->silence_suspend)
sdev_printk(KERN_WARNING, sdev,
"Power-on or device reset occurred\n");
sdev_printk(KERN_WARNING, sdev,
"Power-on or device reset occurred\n");
}
if (sshdr->asc == 0x2a && sshdr->ascq == 0x01) {

View File

@ -3628,8 +3628,7 @@ static int sd_suspend_common(struct device *dev, bool ignore_stop_errors)
return 0;
if (sdkp->WCE && sdkp->media_present) {
if (!sdkp->device->silence_suspend)
sd_printk(KERN_NOTICE, sdkp, "Synchronizing SCSI cache\n");
sd_printk(KERN_NOTICE, sdkp, "Synchronizing SCSI cache\n");
ret = sd_sync_cache(sdkp, &sshdr);
if (ret) {
@ -3651,8 +3650,7 @@ static int sd_suspend_common(struct device *dev, bool ignore_stop_errors)
}
if (sdkp->device->manage_start_stop) {
if (!sdkp->device->silence_suspend)
sd_printk(KERN_NOTICE, sdkp, "Stopping disk\n");
sd_printk(KERN_NOTICE, sdkp, "Stopping disk\n");
/* an error is not worth aborting a system sleep */
ret = sd_start_stop_device(sdkp, 0);
if (ignore_stop_errors)

View File

@ -206,7 +206,6 @@ struct scsi_device {
unsigned rpm_autosuspend:1; /* Enable runtime autosuspend at device
* creation time */
unsigned ignore_media_change:1; /* Ignore MEDIA CHANGE on resume */
unsigned silence_suspend:1; /* Do not print runtime PM related messages */
bool offline_already; /* Device offline message logged */