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