linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Mansfield <patmans@us.ibm.com>
To: Brian King <brking@us.ibm.com>
Cc: Martin Hicks <mort@wildopensource.com>, linux-scsi@vger.kernel.org
Subject: Re: Transport Attributes -- attempt#3
Date: Tue, 20 Jan 2004 11:49:11 -0800	[thread overview]
Message-ID: <20040120114910.A23223@beaverton.ibm.com> (raw)
In-Reply-To: <400C7143.8010500@us.ibm.com>; from brking@us.ibm.com on Mon, Jan 19, 2004 at 06:07:31PM -0600

On Mon, Jan 19, 2004 at 06:07:31PM -0600, Brian King wrote:
> I just submitted a new LLD to linux-scsi and Christoph suggested I use 
> this patch for setting SCSI bus attributes. I looked through the patches 
> and noticed that these are per device attributes. I need to be able to 
> set per SCSI bus attributes. The attributes I would like to be able to 
> set include: initiator ID, maximum bus speed, wide enabled/disabled, and 
> device spinup delay. Would it make sense to create a scsi_bus class or 
> something similar for these types of attributes?

For the IPR driver -

Is the spinup delay for the entire card, not per bus? If so it should be
a scsi_host attribute set via shost_attrs. (No one uses shost_attrs, but
its use is the same as sdev_attrs usage in 53c700.c)

And are the other values for the actual physical disks? If they are not
visible to the host, then there is no bus visible to the host (i.e. scsi
core can't see them). 

Having the physical disk show up in scsi core as drives is nice for
managing them, but if they are ready for writing it could be confusing,
and potentially disasterous. We could do hacks to get different behaviour
for the disks (so only sg shows up, or so sd shows up read only), like: add
a flag in scsi_host; modify the INQUIRY type in the ipr driver; or modify
the MODE SENSE page 0x3f (and/or page 0) result in the ipr driver so they
show up read only (though on failure of a MODE SENSE they would become
writable).

If they were visible to scsi core, the intiator ID (this_id) would be
found in the scsi_host, but would need to be added as a sysfs attribute.

We could add a scsi_bus class, but we first need a bus/fabric struct that
can include the class, and that in turn requires quite a bit more work
to get it in the right place in the driver model tree (we would want a
bus/fabric per host:channel pair).

As noted before, we also don't have a target, and the transport attributes
(per the patch) show up as per LUN, even though they might be per target,
or even per bus/fabric. IMO that is fine for now.

i.e. we have a sysfs tree like this:

`-- pcifoo
    `-- host14
        |-- host_attrs
        |-- 14:0:0:0
        |   `-- sdev_attrs
        `-- 14:0:0:1
            `-- sdev_attrs

But we need something like this:

`-- pcifoo
    `-- host14
        |-- host_attrs
        `-- 14:0
            |-- bus_fabric_attrs
            `-- 14:0:0
                |-- target_attrs
                |-- 14:0:0:0
                |   `-- sdev_attrs
                `-- 14:0:0:1
                    `-- sdev_attrs

And then driver model class or bus code can be used with the above as
needed.

-- Patrick Mansfield

  reply	other threads:[~2004-01-20 19:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-07 18:54 Transport Attributes -- attempt#2 Martin Hicks
2004-01-08 13:17 ` Christoph Hellwig
2004-01-08 14:01   ` Martin Hicks
2004-01-08 14:11     ` James Bottomley
2004-01-14 18:12   ` Transport Attributes -- attempt#3 Martin Hicks
2004-01-14 23:34     ` Andrew Vasquez
2004-01-16 16:40       ` Martin Hicks
2004-01-17  0:23       ` Lincoln Dale
2004-01-14 23:58     ` Patrick Mansfield
2004-01-16 14:54     ` Christoph Hellwig
2004-01-16 16:54       ` Martin Hicks
2004-01-20  0:07     ` Brian King
2004-01-20 19:49       ` Patrick Mansfield [this message]
2004-01-20 20:38         ` Brian King
  -- strict thread matches above, loose matches on Subject: below --
2004-01-15 12:52 Martin Peschke3
2004-01-16 16:47 ` Martin Hicks
2004-01-20 12:29 Martin Peschke3
2004-01-20 23:20 Martin Peschke3
2004-01-20 23:45 ` Mike Anderson

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=20040120114910.A23223@beaverton.ibm.com \
    --to=patmans@us.ibm.com \
    --cc=brking@us.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mort@wildopensource.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 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).