aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.h
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2014-01-03 18:19:26 -0500
committerJames Bottomley <JBottomley@Parallels.com>2014-03-27 11:26:33 -0400
commitb2bff6ceb61a9a21294f04057d30c9bb4910a88f (patch)
treeae92ba064ed276ef34d560aad344b64044590159 /drivers/scsi/sd.h
parent89d9a567952baec13e26ada3e438f1b642d66b6e (diff)
[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 <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/sd.h')
-rw-r--r--drivers/scsi/sd.h6
1 files changed, 6 insertions, 0 deletions
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)
104 (sdsk)->disk->disk_name, ##a) : \ 104 (sdsk)->disk->disk_name, ##a) : \
105 sdev_printk(prefix, (sdsk)->device, fmt, ##a) 105 sdev_printk(prefix, (sdsk)->device, fmt, ##a)
106 106
107#define sd_first_printk(prefix, sdsk, fmt, a...) \
108 do { \
109 if ((sdkp)->first_scan) \
110 sd_printk(prefix, sdsk, fmt, ##a); \
111 } while (0)
112
107static inline int scsi_medium_access_command(struct scsi_cmnd *scmd) 113static inline int scsi_medium_access_command(struct scsi_cmnd *scmd)
108{ 114{
109 switch (scmd->cmnd[0]) { 115 switch (scmd->cmnd[0]) {