summaryrefslogtreecommitdiffstats
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 08:26:33 -0700
commitb2bff6ceb61a9a21294f04057d30c9bb4910a88f (patch)
treeae92ba064ed276ef34d560aad344b64044590159 /drivers/scsi/sd.h
parent89d9a567952baec13e26ada3e438f1b642d66b6e (diff)
downloadop-kernel-dev-b2bff6ceb61a9a21294f04057d30c9bb4910a88f.zip
op-kernel-dev-b2bff6ceb61a9a21294f04057d30c9bb4910a88f.tar.gz
[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 26895ff..620871ef 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]) {
OpenPOWER on IntegriCloud