From b2bff6ceb61a9a21294f04057d30c9bb4910a88f Mon Sep 17 00:00:00 2001 From: "Martin K. Petersen" Date: Fri, 3 Jan 2014 18:19:26 -0500 Subject: [SCSI] sd: Quiesce mode sense error messages Messages about discovered disk properties are only printed once unless they are found to have changed. Errors encountered during mode sense, however, are printed every time we revalidate. Quiesce mode sense errors so they are only printed during the first scan. [jejb: checkpatch fixes] Bugzilla: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733565 Signed-off-by: Martin K. Petersen Signed-off-by: James Bottomley --- drivers/scsi/sd.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/scsi/sd.h') diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h index 26895ff247c5..620871efbf0a 100644 --- a/drivers/scsi/sd.h +++ b/drivers/scsi/sd.h @@ -104,6 +104,12 @@ static inline struct scsi_disk *scsi_disk(struct gendisk *disk) (sdsk)->disk->disk_name, ##a) : \ sdev_printk(prefix, (sdsk)->device, fmt, ##a) +#define sd_first_printk(prefix, sdsk, fmt, a...) \ + do { \ + if ((sdkp)->first_scan) \ + sd_printk(prefix, sdsk, fmt, ##a); \ + } while (0) + static inline int scsi_medium_access_command(struct scsi_cmnd *scmd) { switch (scmd->cmnd[0]) { -- cgit v1.2.3-58-ga151