Bug 71972

Summary: Add udev rule to power up external Apple Superdrive
Product: systemd Reporter: Michele Baldessari <michele>
Component: generalAssignee: systemd-bugs
Status: RESOLVED NOTOURBUG QA Contact: systemd-bugs
Severity: minor    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Michele Baldessari 2013-11-24 23:22:36 UTC
The external USB Superdrive from Apple requires a custom scsi command to be powered on.

Can we add the following rule somewhere in the rulesets?
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1500", KERNEL=="sr*", RUN+="/bin/sg_raw /dev/%k ea 00 00 00 00 00 01"

As it cannot be solved with a simple usb storage quirk but would require a 
small driver, I think it makes sense to have this one liner in udev.
Comment 1 Kay Sievers 2013-11-25 00:09:45 UTC
I'm really not sure that we should start shipping rules to enable specific
storage devices, to initialize them, bring them up; it's usually the kernel's
job to make sure that happens.

I rather see essential things that are needed to make a device operational,
or ensure proper operation during runtime, to happen inside the kernel and
not in userspace.

And things like resume from RAM needs to be handled too, how does the device
behave there?
Comment 2 Michele Baldessari 2013-11-25 10:59:57 UTC
Hi Kay,

resume works as the device only needs the SCSI command once when added.
I understand your POV, so feel free to close this one out. I opened it
here as a oneliner in userspace seems simpler and more managable than
an in-kernel change/ums driver, but I tend to agree it's the job for the kernel.

regards,
Michele
Comment 3 Lennart Poettering 2013-11-25 20:56:09 UTC
I think it would be best to open a bug in the kernel bugzilla and heave it dealt with there. systemd is definitely not the place for device driver-like quirks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.