Bug 141228 - scsi generic devices needed in hal
Summary: scsi generic devices needed in hal
Status: VERIFIED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Alpha 4
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Danny Kukawka
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-03 13:31 UTC by Ludwig Nussel
Modified: 2007-06-05 11:04 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
export scsi_generic devices (2.87 KB, patch)
2006-01-05 04:20 UTC, Kay Sievers
Details | Diff
add scsi.type, scsi.vendor, scsi.model (2.80 KB, patch)
2006-01-20 14:16 UTC, Kay Sievers
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ludwig Nussel 2006-01-03 13:31:03 UTC
To be able to get rid of resmgr's special scsi handling we need scsi generic devices listed in hal. sysfs looks like this:

> l -R /sys/class/scsi_generic
/sys/class/scsi_generic:
insgesamt 0
drwxr-xr-x  3 root root 0 2006-01-03 14:04 ./
drwxr-xr-x 26 root root 0 2006-01-03 14:04 ../
drwxr-xr-x  2 root root 0 2006-01-03 14:30 sg0/

/sys/class/scsi_generic/sg0:
insgesamt 0
drwxr-xr-x 2 root root    0 2006-01-03 14:30 ./
drwxr-xr-x 3 root root    0 2006-01-03 14:04 ../
-r--r--r-- 1 root root 4096 2006-01-03 14:30 dev
lrwxrwxrwx 1 root root    0 2006-01-03 14:30 device -> ../../../devices/pci0000:00/0000:00:1d.7/usb4/4-1/4-1:1.0/host0/target0:0:0/0:0:0:0/
--w------- 1 root root 4096 2006-01-03 14:30 uevent
Comment 1 Danny Al-Gaaf 2006-01-03 13:47:02 UTC
@Kay: what do you think?
Comment 2 Kay Sievers 2006-01-05 03:07:46 UTC
Yes, would be nice to have it.
Comment 3 Kay Sievers 2006-01-05 04:20:46 UTC
Created attachment 62018 [details]
export scsi_generic devices

Patch to create device object for scsi_generic devices.
Comment 4 Danny Al-Gaaf 2006-01-10 09:38:34 UTC
updated to new HAL version, fixed now.
Comment 5 Ludwig Nussel 2006-01-10 16:59:05 UTC
Ok, the device is there but I don't know how to match it. It's a sibling of the cdrom device and lacks any property that suggests that it's a scsi generic device for a cdrom. Would it be possible to somehow create a connection between srX and sgX so I can match them via fdi file?
Comment 6 Kay Sievers 2006-01-10 17:06:13 UTC
Hmm, both have the same "info.parent", can't you use this?
Comment 7 Danny Al-Gaaf 2006-01-10 17:27:18 UTC
We maybe could add a property with the udi of the related block device, but are this devices alway blockdevices? 

@Kay: any ideas?
Comment 8 Kay Sievers 2006-01-10 17:39:51 UTC
Generic devices are independend, they are a charcter device and can exist even without any block device, like old scsi scanners. There is no event order we can depend on, so connecting childs to each other is not easy.
Comment 9 Danny Al-Gaaf 2006-01-11 12:54:56 UTC
If you can match them over the sam info.parent I close the bug
Comment 10 Ludwig Nussel 2006-01-11 13:04:42 UTC
I don't see how that's possible in an fdi file.
Comment 11 Ludwig Nussel 2006-01-20 09:37:02 UTC
If I could use something like @info.parent:@block:vendor_id for matching I might be able to change the fdi files to install ACLs on scsi generic devices. As it is atm I don't see a way to avoid libresmgr and the scsi flag.
Comment 12 Kay Sievers 2006-01-20 14:16:57 UTC
Created attachment 64267 [details]
add scsi.type, scsi.vendor, scsi.model

This adds: scsi.type, scsi.vendor, scsi.model to the scsi parent, which should work around the currently impossible "cross match" to a "sister device".

linux.subsystem = 'scsi'  (string)
scsi.type = 'cdrom'  (string)
scsi.vendor = 'MATSHITA'  (string)
scsi.model = 'DVD-RAM UJ-822S'  (string)
info.product = 'SCSI Device'  (string)
info.linux.driver = 'sr'  (string)
Comment 13 Kay Sievers 2006-01-20 15:56:43 UTC
Comitted to HAL CVS.
Comment 14 Ludwig Nussel 2006-01-20 16:01:00 UTC
works. Breaks cdrecord though as resmgr patch causes cdrecord to not evaluate sg devices by traditioinal means when running as non-root. I can fix that but I fear other packages could have similar "features".
Comment 15 Ludwig Nussel 2006-01-20 16:21:21 UTC
hal-resmgr and fixed cdrecord submitted, please submit hal package with that patch.
Comment 16 Danny Al-Gaaf 2006-01-23 20:04:19 UTC
Added patch for Beta2