All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Greg KH <greg@kroah.com>
Cc: Patrick Mansfield <patmans@us.ibm.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: dev_printk output
Date: Fri, 19 May 2006 22:55:44 -0600	[thread overview]
Message-ID: <20060520045544.GD2826@parisc-linux.org> (raw)
In-Reply-To: <20060519202847.GB8865@kroah.com>

On Fri, May 19, 2006 at 01:28:47PM -0700, Greg KH wrote:
> On Fri, May 19, 2006 at 02:11:42PM -0600, Matthew Wilcox wrote:
> > On Thu, May 18, 2006 at 01:09:57PM -0700, Patrick Mansfield wrote:
> > > Funky how loading sd after sg changes the output ... and using the driver
> > > name as a prefix sometimes messes this up for scsi.
> > > 
> > >  0:0:0:0: Attached scsi generic sg0 type 0
> > > sd 1:0:0:0: Attached scsi generic sg0 type 0
> > 
> > I find that a bit confusing too.  Obviously, we should distinguish
> > different kinds of bus_id from each other somehow -- but isn't the
> > obvious thing to use the bus name?  That must already be unique as sysfs
> > relies on it.  ie this patch:
> 
> Yes, not all devices are on a bus, so this will not work.  And we want
> to know the driver that controls the device too.  So how about adding
> the bus if it's not null?
> 
> Something like (untested):
> 	printk(level "%s %s %s: " format , (dev)->bus ? (dev)->bus->name : "", (dev)->driver ? (dev)->driver->name : "", (dev)->bus_id , ## arg)

Then we still get the inconsistency of device names changing as drivers
are loaded.  I think we should declare it a bug for devices to not be
on a bus.  The only example I have of devices not-on-a-bus are scsi
targets.  I would propose introducing a new scsi_target bus for them,
then removing the 'target' from the start of the bus_id.  Adding them to
the scsi bus looks like it'd be a lot of work.

  reply	other threads:[~2006-05-20  4:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-11 15:00 [RFC] printks in print_inquiry Matthew Wilcox
2006-05-12 17:08 ` Patrick Mansfield
2006-05-13  5:00   ` Matthew Wilcox
2006-05-18 18:36     ` Matthew Wilcox
2006-05-18 20:09       ` Patrick Mansfield
2006-05-19 19:08         ` Matthew Wilcox
2006-05-19 19:43           ` James Smart
2006-05-20 14:19             ` Matthew Wilcox
2006-05-20 14:33               ` James Bottomley
2006-05-19 20:11         ` dev_printk output Matthew Wilcox
2006-05-19 20:28           ` Greg KH
2006-05-20  4:55             ` Matthew Wilcox [this message]
2006-05-20 13:46               ` James Bottomley
2006-05-20 21:21               ` Greg KH
2006-05-29  3:57                 ` Matthew Wilcox
2006-05-29 16:30                   ` 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=20060520045544.GD2826@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=patmans@us.ibm.com \
    /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.