From: Douglas Gilbert <dougg@torque.net>
To: Mike Anderson <andmike@us.ibm.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [RFC] scsi host sysfs support again [0/4]
Date: Mon, 05 May 2003 21:46:25 +1000 [thread overview]
Message-ID: <3EB64F11.2030806@torque.net> (raw)
In-Reply-To: <20030505083315.GB8416@beaverton.ibm.com>
Mike Anderson wrote:
> Here is update to the scsi host sysfs support. This patch uses the
> reworked class and class_device support.
>
> This patch set is against scsi-misc-2.5.
Mike,
The set of 4 patches will apply against lk 2.5.69
with lots of offsets and at least one "fuzz 1".
It build for me and I'm running it now. A cleaner
version (against lk 2.5.69) would be good.
> This patch set changes the sysfs support for scsi hosts.
> - Removes the previous support of shost_devclass device class.
>
> - Added support for sysfs class and class_device.
>
> - scsi host now contains a struct device and will have its parent pointer
> set to the device passed in to scsi_add_host, the device passed in to
> scsi_set_device, or set to the legacy_bus.
>
> - scsi_host class children list is now equal to scsi_host_list. scsi host
> host_gendev children list is not equal to my_devices.
>
> - Modifies scsi_debug to support the new order of object cleanup and also
> changes the structure of sdebug_host_info to help in object cleanup.
>
> This change allows for host cleanup when sysfs references drop to zero
> (there still is more work to be done).
>
> I have tested the insmod / rmmod cycle with scsi_debug and booted with the
> ips and aic drivers.
>
> Current Known Issues:
> - Current users of scsi_remove_host will need to have there
> cleanup reordered to support the restoration of the call to the
> Scsi_Host_Template release.
> - Callers of scsi_set_device should be migrated off this interface
> if possible.
>
> Example tree:
>
> # tree /sys/class/scsi_host
> /sys/class/scsi_host
> |-- host0
> | |-- cmd_per_lun
> | |-- device -> ../../../devices/pci0/00:09.0/host0
> | |-- host_busy
> | |-- sg_tablesize
> | |-- unchecked_isa_dma
> | `-- unique_id
> |-- host1
> | |-- cmd_per_lun
> | |-- device -> ../../../devices/pci1/01:03.0/host1
> | |-- host_busy
> | |-- sg_tablesize
> | |-- unchecked_isa_dma
> | `-- unique_id
> `-- host3
> |-- cmd_per_lun
> |-- device -> ../../../devices/pci1/01:03.1/host3
> |-- host_busy
> |-- sg_tablesize
> |-- unchecked_isa_dma
> `-- unique_id
What seems to be missing, at least in what I am
running here is a useful 'name'. There is no 'name'
file in the listing above (under each 'host<n>'
directory). There is a 'name' file in that 'device' (symlink)
directory but it is an empty file here.
> # tree /sys/bus/scsi/devices
> /sys/bus/scsi/devices
> |-- 0:0:0:0 -> ../../../devices/pci0/00:09.0/host0/0:0:0:0
So finally I can get some output from my
version of lsscsi (unreleased version 10):
$ lsscsi -Hl
[0] ??
cmd_per_lun=64 host_busy=0 sg_tablesize=96 unchecked_isa_dma=0
[1] ??
cmd_per_lun=64 host_busy=0 sg_tablesize=96 unchecked_isa_dma=0
[2] ??
cmd_per_lun=3 host_busy=0 sg_tablesize=64 unchecked_isa_dma=0
[3] ??
cmd_per_lun=5 host_busy=0 sg_tablesize=255 unchecked_isa_dma=0
Hosts 0 and 1 are the 2 HBAs on a Tekram 390u3w while
host 2 is a scsi_debug pseudo host and host3 is
ide-scsi. A name would be instructive.
$ lsscsi
[0:0:1:0] disk FUJITSU MAM3184MP 0106 /dev/sda
[2:0:0:0] disk Linux scsi_debug 0004 /dev/sdb
[3:0:0:0] cd CREATIVE CD5233E 1.00 /dev/sr0
Doug Gilbert
next prev parent reply other threads:[~2003-05-05 11:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-05 8:33 [RFC] scsi host sysfs support again [0/4] Mike Anderson
2003-05-05 8:34 ` [RFC] scsi host sysfs support again [1/4] Mike Anderson
2003-05-05 8:35 ` [RFC] scsi host sysfs support again [2/4] Mike Anderson
2003-05-05 8:37 ` [RFC] scsi host sysfs support again [3/4] Mike Anderson
2003-05-05 8:38 ` [RFC] scsi host sysfs support again [4/4] Mike Anderson
2003-05-05 8:38 ` [RFC] scsi host sysfs support again [0/4] Christoph Hellwig
2003-05-05 9:40 ` Douglas Gilbert
2003-05-05 10:00 ` Mike Anderson
2003-05-05 9:48 ` Mike Anderson
2003-05-05 10:17 ` Christoph Hellwig
2003-05-06 1:05 ` Mike Anderson
2003-05-07 15:44 ` Christoph Hellwig
2003-05-07 16:15 ` Mike Anderson
2003-05-07 16:41 ` Christoph Hellwig
2003-05-05 11:46 ` Douglas Gilbert [this message]
2003-05-05 21:45 ` Mike Anderson
2003-05-06 1:12 ` Douglas Gilbert
2003-05-06 16:28 ` James Bottomley
2003-05-06 17:23 ` Mike Anderson
2003-05-07 23:19 ` Willem Riede
2003-05-08 0:09 ` Douglas Gilbert
2003-05-08 1:44 ` 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=3EB64F11.2030806@torque.net \
--to=dougg@torque.net \
--cc=andmike@us.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox