From: Matthew Wilcox <matthew-Ztpu424NOJ8@public.gmane.org>
To: linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 1/3] Allow SCSI hosts to be less verbose
Date: Sun, 20 Sep 2009 16:56:39 -0600 [thread overview]
Message-ID: <20090920225639.GD3690@parisc-linux.org> (raw)
In-Reply-To: <20090920225348.GB3690-6jwH94ZQLHl74goWV3ctuw@public.gmane.org>
From: Matthew Wilcox <willy-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Introduce a 'quiet' flag in the scsi_host_template which drivers can
set to prevent (in the first instance) printing their name when they
register with the SCSI core. Set the quiet flag in the USB Storage
driver.
Signed-off-by: Matthew Wilcox <willy-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
drivers/scsi/hosts.c | 3 ++-
drivers/usb/storage/scsiglue.c | 3 +++
include/scsi/scsi_host.h | 3 +++
3 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index 5fd2da4..7741f1d 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -192,7 +192,8 @@ int scsi_add_host(struct Scsi_Host *shost, struct device *dev)
struct scsi_host_template *sht = shost->hostt;
int error = -EINVAL;
- printk(KERN_INFO "scsi%d : %s\n", shost->host_no,
+ if (!sht->quiet)
+ printk(KERN_INFO "scsi%d : %s\n", shost->host_no,
sht->info ? sht->info(shost) : sht->name);
if (!shost->can_queue) {
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index cfa26d5..781fb6d 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -555,6 +555,9 @@ struct scsi_host_template usb_stor_host_template = {
/* we do our own delay after a device or bus reset */
.skip_settle_delay = 1,
+ /* We don't need the scsi midlayer to print our name */
+ .quiet = 1,
+
/* sysfs device attributes */
.sdev_attrs = sysfs_device_attr_list,
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index b62a097..baa527c 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -446,6 +446,9 @@ struct scsi_host_template {
*/
unsigned ordered_tag:1;
+ /* Be less verbose */
+ unsigned quiet:1;
+
/*
* Countdown for host blocking with no commands outstanding.
*/
--
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-09-20 22:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-20 22:53 Reducing the verbosity of inserting a USB storage device Matthew Wilcox
[not found] ` <20090920225348.GB3690-6jwH94ZQLHl74goWV3ctuw@public.gmane.org>
2009-09-20 22:56 ` Matthew Wilcox [this message]
2009-09-22 13:09 ` [PATCH 1/3] Allow SCSI hosts to be less verbose Christoph Hellwig
2009-09-21 1:09 ` Reducing the verbosity of inserting a USB storage device Alan Stern
[not found] ` <Pine.LNX.4.44L0.0909202104300.14465-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2009-09-24 22:17 ` Matthew Wilcox
2009-09-24 22:18 ` [PATCH 1/4] Convert a dev_info to a dev_dbg Matthew Wilcox
[not found] ` <20090924221702.GA7943-6jwH94ZQLHl74goWV3ctuw@public.gmane.org>
2009-09-24 22:19 ` [PATCH 2/4] usb-storage: Associate the name of the interface with the scsi host Matthew Wilcox
2009-09-25 14:29 ` Alan Stern
2009-09-24 22:19 ` [PATCH 3/4] USB Storage: Make driver less chatty when it finds a new device Matthew Wilcox
2009-09-24 22:20 ` [PATCH 4/4] sd.c: Make initialisation less verbose Matthew Wilcox
[not found] ` <20090924222056.GE7943-6jwH94ZQLHl74goWV3ctuw@public.gmane.org>
2009-10-09 17:54 ` Greg KH
2009-09-21 2:07 ` Reducing the verbosity of inserting a USB storage device Matthew Dharm
2009-09-20 22:57 ` [PATCH 2/3] USB Storage: Make driver less chatty when it finds a new device Matthew Wilcox
2009-09-21 2:09 ` Alan Stern
2009-09-20 22:58 ` [PATCH 3/3] sd.c: Make initialisation less verbose Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090920225639.GD3690@parisc-linux.org \
--to=matthew-ztpu424noj8@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).