public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* sysfs support for sg
@ 2004-01-07 22:33 Olaf Hering
  2004-01-07 22:40 ` Olaf Hering
  0 siblings, 1 reply; 5+ messages in thread
From: Olaf Hering @ 2004-01-07 22:33 UTC (permalink / raw)
  To: linux-scsi; +Cc: Olaf Hering

Hello,

are there any plans to add sysfs support to the sg driver?
I see no 'dev' nodes for it.
Can stuff like 'sg_start /dev/sg2 0' be done in another way?

-- 
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sysfs support for sg
  2004-01-07 22:33 sysfs support for sg Olaf Hering
@ 2004-01-07 22:40 ` Olaf Hering
  2004-01-08  1:50   ` Douglas Gilbert
  0 siblings, 1 reply; 5+ messages in thread
From: Olaf Hering @ 2004-01-07 22:40 UTC (permalink / raw)
  To: linux-scsi

 On Wed, Jan 07, Olaf Hering wrote:

> Hello,
> 
> are there any plans to add sysfs support to the sg driver?
> I see no 'dev' nodes for it.
> Can stuff like 'sg_start /dev/sg2 0' be done in another way?

I missed the /sys/block/sda/device/generic symlink. But still, no dev
node. Is that supposed to work that way?

-- 
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sysfs support for sg
  2004-01-07 22:40 ` Olaf Hering
@ 2004-01-08  1:50   ` Douglas Gilbert
  2004-01-08  2:11     ` Douglas Gilbert
  2004-01-08  5:41     ` Daniel Stekloff
  0 siblings, 2 replies; 5+ messages in thread
From: Douglas Gilbert @ 2004-01-08  1:50 UTC (permalink / raw)
  To: Olaf Hering; +Cc: linux-scsi, patmans

[-- Attachment #1: Type: text/plain, Size: 1856 bytes --]

Olaf Hering wrote:
>  On Wed, Jan 07, Olaf Hering wrote:
> 
> 
>>Hello,
>>
>>are there any plans to add sysfs support to the sg driver?
>>I see no 'dev' nodes for it.
>>Can stuff like 'sg_start /dev/sg2 0' be done in another way?
> 
> 
> I missed the /sys/block/sda/device/generic symlink. But still, no dev
> node. Is that supposed to work that way?

Olaf,
lk 2.6.0-rc1 has added sysfs support for sg with
/sys/cdev/major/sg<n> . In that directory
is a symlink to the corresponding SCSI device. When that symlink
is followed the target directory has a symlink called 'generic'
back to /sys/cdev/major/sg<n>. The st driver has similar cdev
bidirectional mapping (and hopefully osst will soon follow).

An example is attached. [BTW 'getcwd' returns the "true" path
as described in "man 3 getcwd".]

The "cdev" changes in the sg and st drivers allow more than
256 devices to be handled. The sg driver limits the number
of devices to 8192. I believe sd is still limited to
128 devices and I not sure about the device limits of sr.

Currently the sg driver lacks driver parameter support within sysfs
(e.g. 'allow_dio' as found in the /proc/scsi/sg directory).
Interestingly the st and osst drivers have /sys/bus/scsi/drivers/st
and osst directories (sd and st drivers also get directories if
their drivers are loaded). It is useful to be able to access
ULDs _prior_ to any (scsi) devices being attached which is not
possible under lk 2.4 .

I have been looking at the lsscsi program again which has been
dormant for 6 months. A symlink that I miss is from a scsi host
(enumerated in the /sys/class/scsi_host directory) to the
driver (and its name) that controls it.


BTW Is there a definitive libsysfs site anywhere? I noticed that
scsi_id provided in the "extras" directory of udev-009 doesn't
build with the libsysfs provided by udev-009.

Doug Gilbert




[-- Attachment #2: sg_sysfs.txt --]
[-- Type: text/plain, Size: 342 bytes --]

# cd /sys/cdev/major/sg0
# ls
device
# tree
.
`-- device -> ../../../devices/pci0000:00/0000:00:0e.0/host0/0:0:1:0

1 directory, 0 files
# cd device/
# ls
block   detach_state    generic  online  queue_depth  rev         type
delete  device_blocked  model    power   rescan       scsi_level  vendor
# cd generic/
# getcwd
/sys/cdev/major/sg0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sysfs support for sg
  2004-01-08  1:50   ` Douglas Gilbert
@ 2004-01-08  2:11     ` Douglas Gilbert
  2004-01-08  5:41     ` Daniel Stekloff
  1 sibling, 0 replies; 5+ messages in thread
From: Douglas Gilbert @ 2004-01-08  2:11 UTC (permalink / raw)
  To: linux-scsi

Douglas Gilbert wrote:

> Currently the sg driver lacks driver parameter support within sysfs
> (e.g. 'allow_dio' as found in the /proc/scsi/sg directory).
> Interestingly the st and osst drivers have /sys/bus/scsi/drivers/st
> and osst directories (sd and st drivers also get directories if
> their drivers are loaded). It is useful to be able to access
> ULDs _prior_ to any (scsi) devices being attached which is not
> possible under lk 2.4 .

... and I missed the most glaring omission from /sys/bus/scsi/drivers
which is the scsi mid level driver itself. Many interesting potential
parameters come to mind, 'no_scan' for example.

Doug Gilbert


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sysfs support for sg
  2004-01-08  1:50   ` Douglas Gilbert
  2004-01-08  2:11     ` Douglas Gilbert
@ 2004-01-08  5:41     ` Daniel Stekloff
  1 sibling, 0 replies; 5+ messages in thread
From: Daniel Stekloff @ 2004-01-08  5:41 UTC (permalink / raw)
  To: dougg, Olaf Hering; +Cc: linux-scsi, patmans, ananth

On Wednesday 07 January 2004 05:50 pm, Douglas Gilbert wrote:
[snip]
> BTW Is there a definitive libsysfs site anywhere? I noticed that
> scsi_id provided in the "extras" directory of udev-009 doesn't
> build with the libsysfs provided by udev-009.
>
> Doug Gilbert


The official site for libsysfs, which is part of the sysfsutils package, is 
here:

http://linux-diag.sourceforge.net/Sysfsutils.html

Thanks,

Dan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-01-08  5:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-07 22:33 sysfs support for sg Olaf Hering
2004-01-07 22:40 ` Olaf Hering
2004-01-08  1:50   ` Douglas Gilbert
2004-01-08  2:11     ` Douglas Gilbert
2004-01-08  5:41     ` Daniel Stekloff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox