A recent commit to the NetBSD USB code allows my iPod, which has never worked over USB in FreeBSD or NetBSD, to attach and function normally. Here is the text of the commit message, rev 1.30 of sys/dev/usb/usb_subr.c: Module Name: src Committed By: nathanw Date: Wed Sep 21 20:17:22 UTC 2005 Modified Files: src/sys/dev/usb: usb_subr.c Log Message: usbd_setup_pipe(): Don't call usbd_clear_endpoint_stall(). It's not necessary for normal devices, and it prevents some common (but apparantly buggy) devices from working, including the Apple iPod (mini and photo) and certain M-Systems DiskOnKey flash devices. If (also buggy) devices resurface that need this when they are attached, they can be addressed, ideally in each device's driver. Fix: $ cvs -d :pserver:anoncvs@anoncvs.netbsd.org:/cvsroot rdiff -u -r1.129 -r1.130 src/sys/dev/usb/usb_subr.c
Just want to point out that this patch makes the new iPod nano work in FreeBSD also. Before, FreeBSD would not see the partitions when the nano was plugged in. With this patch, the nano works perfectly. (Tested on: RELENG_5, cvsupped on Sep 20).
Hi kind usb gurus For your information, I have a Casio Exilim s-100 camera which would not work (same symptoms as for the iPod nano : umass detected but no /dev/daX) With the patch provided, both (iPod nano and Casio exilim s-100) work find. (a `camcontrol eject da0` on the camera entry result in an error however.) -- Germain
I tried the patch under FreeBSD 6.0 to get my iPod nano 4GB working: umass0: Apple iPod, rev 2.00/0.01, addr 2 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 3906MB (7999488 512 byte sectors: 255H 63S/T 497C) $ camcontrol devlist camcontrol devlist <Apple iPod 1.62> at scbus0 target 0 lun 0 (da0,pass0) I got trouble mounting the iPod. There are no /dev/da0s* entries, is the partition table broken? # fdisk /dev/da0 ******* Working on device /dev/da0 ******* parameters extracted from in-core disklabel are: cylinders=497 heads=255 sectors/track=63 (16065 blks/cyl) parameters to be used for BIOS calculations are: cylinders=497 heads=255 sectors/track=63 (16065 blks/cyl) fdisk: invalid fdisk partition table found Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 7984242 (3898 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 496/ head 254/ sector 63 The data for partition 2 is: <UNUSED> The data for partition 3 is: <UNUSED> The data for partition 4 is: <UNUSED>
Can you give the output of usbdevs -v for your Casio Exilim and describe the message you got after using camcontrol eject ? -- Florent Thoumie flz@FreeBSD.org FreeBSD Committer
Sure florent Here is the result of `usbd -dv' (all works fine til camcomtrol eject, that I don't care that much. Read below.) =====================8<=====================8<===================== root@germ# usbd -vd usbd: opened /dev/usb0 usbd: opened /dev/usb1 usbd: opened /dev/usb2 usbd: opened /dev/usb3 usbd: reading configuration file /etc/usbd.conf usbd: opened /dev/usb usbd: device-attach event at 1138869328.544468000, CASIO QV DIGITAL, CASIO COMPUTER: vndr=0x07cf prdct=0x1001 rlse=0x1000 clss=0x0000 subclss=0x0000 prtcl=0x0000 device names: umass0 usbd: Found action 'CASIO exilim' for CASIO QV DIGITAL, CASIO COMPUTER at umass0 usbd: Executing '( export DISPLAY=:0.0 && export i=`echo ${DEVNAME} | /usr/bin/sed 's,umass\\([0-9]*\\),\\1,'` && sleep 2 && /bin/chmod 666 /dev/da${i}s1 && /sbin/mount -t msdos /dev/da${i}s1 /mnt/cam && /usr/bin/su german -c '/usr/X11R6/bin/gthumb /mnt/cam/dcim/100casio' ; /sbin/umount /mnt/cam ; /sbin/camcontrol eject da${i} ) &' Error received from stop unit command usbd: device-detach event at 1138869385.636518000, product 0x1001, vendor 0x07cf: vndr=0x07cf prdct=0x1001 rlse=0x1000 clss=0x0000 subclss=0x0000 prtcl=0x0000 =====================>8=====================>8===================== The device connect to the pc throught a cradle with an usb button. You push the button and a light saying `usb' light. If I camcontrol-eject it it says that error and da0 and da0s1 remain in /dev. When I push the button again then it detaches and the devices desapear. I gaved it a shot under windows and the little icon `safely remove' doesn't has easy effect on the state of the usb led on my device. TBH, my guess is there is a problem in the device itself. But as long as the device is properly unmounted I don't care that much. Would I disconnect the device without having unmounted it (i.e., without having closed gthumb.) then when I try umount -f my system crashes. I have freebsd 6.0 stable with the latest usb support. -- Germain http://german.free.fr ___________________________________________________________________________ Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international. Téléchargez sur http://fr.messenger.yahoo.com
State Changed From-To: open->patched This is patched in -current.
Responsible Changed From-To: freebsd-usb->imp imp committed the patch.
State Changed From-To: patched->closed This is fixed in HEAD (usb_subr.c 1.79) and RELENG_6 (1.76.2.2) so was fixed before 6.1 was released. Thank you for your submission!
Responsible Changed From-To: imp->gavin