All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian King <brking@us.ibm.com>
To: Patrick Mansfield <patmans@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 14:38:27 -0600	[thread overview]
Message-ID: <400D91C3.1000503@us.ibm.com> (raw)
In-Reply-To: 20040120114910.A23223@beaverton.ibm.com

Patrick Mansfield wrote:
> 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)

No, the spinup delay is per bus.

> 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). 

The other values are also for the entire scsi bus, not for individual 
targets.

> 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).

Christoph has suggested I create psuedo devices for them, but not report 
them to the upper layer drivers, similar to how scsi_get_host_dev works. 
  This means they won't show up in sysfs, AFAIK. Which would then pose 
the problem you mention above of the midlayer not seeing the bus if 
there are only RAID disks on the bus. For this reason, it might be nice 
if the devices did get reported in, maybe as sg devices only? There 
should really be no reason to create an sd device, as it would only 
cause problems.

> 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.

Once again, for the adapter, the initiator ID is per bus, rather than 
per adapter. I could force them to be the same for all busses, however.

> 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.

That seems reasonable to me.


-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center


  reply	other threads:[~2004-01-20 20:38 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
2004-01-20 20:38         ` Brian King [this message]
  -- 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=400D91C3.1000503@us.ibm.com \
    --to=brking@us.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mort@wildopensource.com \
    --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.