From: Matthew Wilcox <matthew@wil.cx>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] fix up short inquiry printing
Date: Sun, 6 Aug 2006 20:46:12 -0600 [thread overview]
Message-ID: <20060807024612.GJ4379@parisc-linux.org> (raw)
In-Reply-To: <1154906122.3683.244.camel@mulgrave.il.steeleye.com>
On Sun, Aug 06, 2006 at 06:15:22PM -0500, James Bottomley wrote:
> Caused the bus to be added to dev_printk, so now our SCSI inquiry short
> messages print like this:
>
> scsiscsi 2:0:0:0: Direct access IBM-ESXS ST973401SS B519 PQ: 0 ANSI: 5
>
> Just remove the "scsi" from the sdev_printk to compensate.
Yes, that's clearly the right thing to do, thanks for fixing that up.
I think we should probably switch sdev_printk() to its own custom
implementation rather than just calling dev_printk(). Greg didn't seem
to be interested in fixing the problem that we have with dev_printk();
presumably he has some other users in mind for which the current
dev_printk behaviour is useful.
How does something like the following look (compile tested):
Index: include/scsi/scsi_device.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/scsi/scsi_device.h,v
retrieving revision 1.28
diff -u -p -r1.28 scsi_device.h
--- include/scsi/scsi_device.h 19 May 2006 02:43:19 -0000 1.28
+++ include/scsi/scsi_device.h 7 Aug 2006 02:45:24 -0000
@@ -151,10 +151,10 @@ struct scsi_device {
to_scsi_device(class_dev->dev)
#define sdev_printk(prefix, sdev, fmt, a...) \
- dev_printk(prefix, &(sdev)->sdev_gendev, fmt, ##a)
+ printk(prefix "scsi %s: " fmt, (sdev)->sdev_gendev.bus_id , ## a)
#define scmd_printk(prefix, scmd, fmt, a...) \
- dev_printk(prefix, &(scmd)->device->sdev_gendev, fmt, ##a)
+ sdev_printk(prefix, (scmd)->device, fmt, ##a)
enum scsi_target_state {
STARGET_RUNNING = 1,
next prev parent reply other threads:[~2006-08-07 2:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-06 23:15 [PATCH] fix up short inquiry printing James Bottomley
2006-08-07 2:46 ` Matthew Wilcox [this message]
2006-08-07 17:03 ` James Bottomley
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=20060807024612.GJ4379@parisc-linux.org \
--to=matthew@wil.cx \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-scsi@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.