public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Anderson <andmike@us.ibm.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi sysfs update (upper 2/3)
Date: Thu, 7 Nov 2002 18:21:58 -0800	[thread overview]
Message-ID: <20021108022158.GD1292@beaverton.ibm.com> (raw)
In-Reply-To: <20021108012047.A17391@infradead.org>

Christoph Hellwig [hch@infradead.org] wrote:
> On Thu, Nov 07, 2002 at 08:41:52AM -0800, Mike Anderson wrote:
> > > > -	rc = scsi_register_device(&sd_template);
> > > > +	rc = scsi_bus_driver_register(&sd_template);
> > > 
> > > Umm, no.  We don't register a bus.  Just leave the name unchanged until
> > > we there is some commonly agreed upon upper layer terminology.
> > 
> > Well we are registering a driver with the device model scsi_bus (i.e a
> > driver_register on scsi_bus_type).
> 
> We register a scsi upperlayer driver with the midlayer, we don't care
> about the implementation, and it's certainly not a bus.  I do btw
> disagree strongly with using the device model bus type for upper level
> drivers.  We have a bus in scsi, and that's the connection between the
> HBA and the devices.  To make any sense out of the device model these
> devices must be childs of the HBA.
> 

Is the disagreement the function name, bus name, or the concept of
registering these drivers with sysfs?

I know the model is not an exact fit, but if we want to use the sysfs
infrastructure all drivers must be associated with a bus. HBAs belong to
there parent bus. They can have associations which I added in this patch
to create a scsi-host class. We cannot create a bus under the HBA. All
buses are default set to a parent of bus_subsys.

The /bus/scsi is a logical bus (an aggregation of all scsi buses). The
upperlayer drivers are the only drivers that should show up under
/bus/scsi/drivers and the only drivers that can bind with scsi_devices.  

In this patch I did remove the extra node that the devices where setting
under and now the scsi devices are children of the HBA. The
/bus/scsi/devices are only links to child devices of the HBA.

> > Could we agree on terminology now as I believe scsi_register_device is
> > mis-leading for others reading the scsi code as it is a driver not a
> > device?
> 
> The device terminology in scsi is misleading but it's used at least
> consistantly.  Feel free to submit a patch that changes it to upper
> or something like that once scsi settles down a bit before 2.6.
> 

Well I wanted to name scsi_bus_driver_register something other than
scsi_register_device as I am calling scsi_register_device from this
function so that if we get probe / remove working only the internals of
this function need to change (while that is not exactly true there will
need to be small changes in the upper also). 

Do you see a problem with "scsi_upper_driver_register" being added now?

-andmike
--
Michael Anderson
andmike@us.ibm.com


  reply	other threads:[~2002-11-08  2:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-07  7:36 [PATCH] scsi sysfs update (base 1/3) Mike Anderson
2002-11-07  7:39 ` [PATCH] scsi sysfs update (upper 2/3) Mike Anderson
2002-11-07  7:42   ` [PATCH] scsi sysfs update (scsi_debug 3/3) Mike Anderson
2002-11-07 23:30     ` Christoph Hellwig
2002-11-07 16:33       ` Mike Anderson
2002-11-07 23:35         ` Douglas Gilbert
2002-11-08  2:30           ` Christoph Hellwig
2002-11-07 23:29   ` [PATCH] scsi sysfs update (upper 2/3) Christoph Hellwig
2002-11-07 16:41     ` Mike Anderson
2002-11-08  1:20       ` Christoph Hellwig
2002-11-08  2:21         ` Mike Anderson [this message]
2002-11-08  3:34           ` Douglas Gilbert
2002-11-08  4:13             ` Mike Anderson
2002-11-08  4:53           ` Christoph Hellwig
2002-11-08  5:41             ` Mike Anderson
2002-11-07 23:28 ` [PATCH] scsi sysfs update (base 1/3) Christoph Hellwig
2002-11-07 17:01   ` Mike Anderson
2002-11-07 17:22     ` Patrick Mansfield

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=20021108022158.GD1292@beaverton.ibm.com \
    --to=andmike@us.ibm.com \
    --cc=hch@infradead.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox