Bug 71972 - Add udev rule to power up external Apple Superdrive
Summary: Add udev rule to power up external Apple Superdrive
Status: RESOLVED NOTOURBUG
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium minor
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-24 23:22 UTC by Michele Baldessari
Modified: 2013-11-25 20:56 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.