Description of problem: When connecting a Apple USB SuperDrive to my MacBook Air is does not accept CD's or sping up when a CD/DVD is already inserted. Version-Release number of selected component (if applicable): kernel-2.6.38.7-30.fc15.x86_64 How reproducible: always Steps to Reproduce: 1. Plug in USB SUperDrive 2. Insert CD or DVD 3. Actual results: SuperDrive does not spin up/CD or DVD is not inserted Expected results: SuperDrive does spin up/CD or DVD is inserted Additional info: Although it seems this is a USB power issue, browsing the web I found some texts suggesting otherwise. It seems the SuperDrive needs a custom SCSI command to wake up. If successfully tried it with sg3_utils. Command used: sg_raw /dev/sr0 ea 00 00 00 00 00 01 After the command is issued the drive wakes up and works happily. Is this something which can be added as a quirk somewhere in de SCSI code? Jun 15 17:36:31 paragon kernel: [ 2957.495209] usbcore: registered new interface driver uas Jun 15 17:36:31 paragon kernel: [ 2957.505836] Initializing USB Mass Storage driver... Jun 15 17:36:31 paragon kernel: [ 2957.506116] scsi8 : usb-storage 1-5.4:1.0 Jun 15 17:36:31 paragon kernel: [ 2957.506374] usbcore: registered new interface driver usb-storage Jun 15 17:36:31 paragon kernel: [ 2957.506378] USB Mass Storage support registered. Jun 15 17:36:32 paragon kernel: [ 2958.515414] scsi 8:0:0:0: CD-ROM Apple SuperDrive 2.00 PQ: 0 ANSI: 0 Jun 15 17:36:32 paragon kernel: [ 2958.549264] sr1: scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray Jun 15 17:36:32 paragon kernel: [ 2958.550590] sr 8:0:0:0: Attached scsi generic sg4 type 5 I've also tried this on my regular PC running F15 and it works just fine while this PC does certainly not have 'high power' USB ports. Could be that writing a CD or DVD does require more amps from the usb port.
(In reply to comment #1) > I've also tried this on my regular PC running F15 and it works just fine while > this PC does certainly not have 'high power' USB ports. Could be that writing a > CD or DVD does require more amps from the usb port. Do you mean it works fine without sending the SCSI command to the drive?
No the SCSI command has to be sent for the drive to spin up. What I meant was that the drive works just fine on a 'regular PC' with non high power USB ports. The SCSI command is needed to spin up the drive. I have not tested writing CDs or DVDs on a PC without high power USB ports.
You should probably ask about this on the linux-usb list.
Does this still happen on a 3.0 or 3.1-rc1/2 kernel?
retested with kernel 3.0.0-1.fc16.x86_64 from F16 Alpha RC5. The device is properly recognized but does not spin up. Issuing the special SCSI command makes the drive spin up.
Another test with update F16 kernel 3.0.1-3.fc16.x86_64. Issue persists.
just checked again with kernel-3.1.0-0.rc3.git0.0. No change (and not expected).
Tested against Fedora 19 (kernel 3.11.4-201.fc19.x86_64) Still no hot-plug support. Works fine when rebooting. To use without rebooting do the following: 1. Plug in USB SuperDrive dmesg output [13613.172494] usb 3-1: new high-speed USB device number 5 using xhci_hcd [13613.272610] usb 3-1: New USB device found, idVendor=05ac, idProduct=1500 [13613.272613] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [13613.272615] usb 3-1: Product: MacBook Air SuperDrive [13613.272617] usb 3-1: Manufacturer: Apple Inc. [13613.272618] usb 3-1: SerialNumber: KTRC5F03824 [13613.275331] usb-storage 3-1:1.0: USB Mass Storage device detected [13613.275564] scsi10 : usb-storage 3-1:1.0 [13614.282929] scsi 10:0:0:0: CD-ROM Apple SuperDrive 2.00 PQ: 0 ANSI: 0 [13614.294363] sr0: scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray [13614.294767] sr 10:0:0:0: Attached scsi CD-ROM sr0 [13614.294982] sr 10:0:0:0: Attached scsi generic sg2 type 5 2. run "sg_raw /dev/sr0 ea 00 00 00 00 00 01" (dependant on sg3_utils). e.g [user@fedora ~]$ sg_raw /dev/sr0 ea 00 00 00 00 00 01 SCSI Status: Good [user@fedora ~]$ You can now insert and eject disks like any normal optical disk drive.
Dale, Jurgen, can you please test the following udev rule (/etc/udev/rules.d/99-applesdrive.rules): # Hack to power up external Apple Superdrive SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1500", KERNEL=="sr*", RUN+="/bin/sg_raw -v /dev/%k ea 00 00 00 00 00 01" Let me know if it works for you. No need to restart anything just place this file in /etc/udev/rules.d. Thanks, Michele
Michele, Confirmed as working.... Personally I have been adding the following to my systems which also works so either udev rule works fine. ACTION=="add", ENV{ID_VENDOR}=="Apple", ENV{ID_MODEL}="SuperDrive", RUN+="/usr/bin/sg_raw /dev/sr0 ea 00 00 00 00 00 01" Dale
Thanks Dale, yours works too as long as the Superdrive is the only cd/dvd drive on the system, yes. I think at this point it makes little sense to pursue some kernel change for this. I quickly looked at it and it likely cannot be done cleanly in drivers/usb/storage/initializers.c and will require an ad hoc ums-apple... driver. Given that we can fix this in userspace with greater flexibility, I think we should ask the udev folks to include this in one form or the other. hth, Michele
I've filed https://bugs.freedesktop.org/show_bug.cgi?id=71972 Let's see if upstream agrees to it or not.
Just to confirm as well. The udev rule works great! Thanks.