Re: USB detach crashes possibly fixed
Bruce Evans wrote: On Sat, 16 Feb 2002, Terry Lambert wrote: PHK was threatening to murder /dev/speaker to work around some clock issues that would be hard to nail down the right way. I think you mean /dev/pcaudio. Yes; I confused the two, since I rarely do audio stuff at all (I think implementing the ALSA kernel and lib stuff for FreeBSD would not be a bad project for a junior person). So the problem can't be related to the timer changes that Poul was contemplating; therefore it *must* be related to the USB stuff. Maybe it's stomping on an interrupt or I/O address or something. 8-(. I use /dev/pcaudio to expose the brokenness of clock code that is not nailed down in the right way. Humor. Ar ar ar. To the original poster: So to fix the original problem, you should disable everything you can (and still boot) except the audio stuff, and then add things back in until it fails; this will identify the problem area, and we can go from there. Uh, it occurs to me that you might be loading your driver as a kernel module; if so, you remembered to recompile it when you recompiled your kernel, right? -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: USB detach crashes possibly fixed
Fcc: outbox Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii and I got a small tune on attach but nothing on detach. Now I am unable to play notes on /dev/speaker. Any hint? As Terry notes, shouldn't possibly be related. I have no crashes but the detach action is never executed when I switch off my Sony camera ( it has never worked as far as I know) Attach actions are executed fine.. Have you tried compiling in all available USB debugging support or seeing if anyone else is using one like yours? No, but if I run usbd in the foreground and with some -v flags it never reports seeing a detach event even though the device driver reports it. It looks like usbd just doesn't get it... This is what the kernel logs when switching the camera on and off. Feb 17 11:57:44 kern.crit trantor kernel: umass0: Sony Sony DSC, rev 1.00/2.10, addr 2 Feb 17 11:57:44 kern.crit trantor kernel: da0 at umass-sim0 bus 0 target 0 lun 0 Feb 17 11:57:44 kern.crit trantor kernel: da0: Sony Sony DSC 2.10 Removable Direct Access SCSI-0 device Feb 17 11:57:44 kern.crit trantor kernel: da0: 150KB/s transfers Feb 17 11:57:44 kern.crit trantor kernel: da0: 61MB (126848 512 byte sectors: 0H 0S/T 0C) Feb 17 11:58:04 kern.crit trantor kernel: umass0: at uhub0 port 1 (addr 2) disconnected Feb 17 11:58:04 kern.crit trantor kernel: (da0:umass-sim0:0:0:0): lost device Feb 17 11:58:04 kern.crit trantor kernel: umass0: detached Looks OK to me. And this is what usbd prints $ sudo usbd -d -v -v -v -v usbd: opened /dev/usb0 usbd: opened /dev/usb1 usbd: opened /dev/usb2 usbd: reading configuration file /etc/usbd.conf usbd: action 1: Sony DSC S70 Camera vndr=0x054c prdct=0x0010 attach='sleep 5 ;mount /sony' detach='umount -f /sony' usbd: action 2: USB device usbd: 2 actions usbd: opened /dev/usb usbd: device-attach event at 1013898654.50584, Sony DSC, Sony: vndr=0x054c prdct=0x0010 rlse=0x0210 clss=0x subclss=0x prtcl=0x device names: umass0 usbd: Found action 'Sony DSC S70 Camera' for Sony DSC, Sony at umass0 usbd: action 0: Sony DSC S70 Camera vndr=0x054c prdct=0x0010 attach='sleep 5 ;mount /sony' detach='umount -f /sony' usbd: Setting DEVNAME='umass0' usbd: Executing 'sleep 5 ;mount /sony' msdosfs: /dev/da0s1: No such file or directory usbd: 'sleep 5 ;mount /sony' returned 71 usbd: doing timeout discovery on /dev/usb0 usbd: doing timeout discovery on /dev/usb1 usbd: doing timeout discovery on /dev/usb2 usbd: processing event queue due to timeout on /dev/usb usbd: doing timeout discovery on /dev/usb0 usbd: doing timeout discovery on /dev/usb1 usbd: doing timeout discovery on /dev/usb2 usbd: processing event queue due to timeout on /dev/usb usbd: processing event queue on /dev/usb usbd: device-attach event at 1013943463.949946000, Sony DSC, Sony: vndr=0x054c prdct=0x0010 rlse=0x0210 clss=0x subclss=0x prtcl=0x device names: umass0 usbd: Found action 'Sony DSC S70 Camera' for Sony DSC, Sony at umass0 usbd: action 0: Sony DSC S70 Camera vndr=0x054c prdct=0x0010 attach='sleep 5 ;mount /sony' detach='umount -f /sony' usbd: Setting DEVNAME='umass0' usbd: Executing 'sleep 5 ;mount /sony' usbd: 'sleep 5 ;mount /sony' is ok usbd: doing timeout discovery on /dev/usb0 usbd: doing timeout discovery on /dev/usb1 usbd: doing timeout discovery on /dev/usb2 usbd: processing event queue due to timeout on /dev/usb usbd: doing timeout discovery on /dev/usb0 usbd: doing timeout discovery on /dev/usb1 usbd: doing timeout discovery on /dev/usb2 usbd: processing event queue due to timeout on /dev/usb usbd: doing timeout discovery on /dev/usb0 usbd: doing timeout discovery on /dev/usb1 usbd: doing timeout discovery on /dev/usb2 usbd: processing event queue due to timeout on /dev/usb ^C It looks like the driver works fine as far as I can tell, but usbd just doesn't see the detach event. -- Paul van der Zwan paulz @ trantor.xs4all.nl I think I'll move to theory, everything works in theory... To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: USB detach crashes possibly fixed
On Sun, 2002-02-17 at 00:49, Paul van der Zwan wrote: I have no crashes but the detach action is never executed when I switch off my Sony camera ( it has never worked as far as I know) Attach actions are executed fine.. I have not see crashas any more too, BUT now I can't see my usb keyboard and mice at all: On today's current: uhub1: Texas Instruments UT-USB41 hub, class 9/0, rev 1.10/1.10, addr 2 uhub1: 4 ports with 4 removable, bus powered uhub1: device problem, disabling port 2 uhub1: device problem, disabling port 4 Same kernel with usb modules build on Feb 13 sources (previous): uhub1: Texas Instruments UT-USB41 hub, class 9/0, rev 1.10/1.10, addr 2 uhub1: 4 ports with 4 removable, bus powered ukbd0: Behavior Tech. Computer Keyboard with mouse port, rev 1.00/1.00, addr 3, iclass 3/1 kbd1 at ukbd0 ums0: Behavior Tech. Computer Keyboard with mouse port, rev 1.00/1.00, addr 3, iclass 3/1 ums0: 3 buttons ums1: Microsoft Microsoft IntelliMouse® Explorer, rev 1.10/1.14, addr 4, iclass 3/1 ums1: 5 buttons and Z dir. Output of usbdevs -v: Controller /dev/usb0: addr 1: self powered, config 1, UHCI root hub(0x), Intel(0x), rev 1.00 port 1 addr 2: power 100 mA, config 1, UT-USB41 hub(0x1446), Texas Instruments(0x0451), rev 1.10 port 1 powered port 2 addr 3: low speed, power 100 mA, config 1, Keyboard with mouse port(0x6782), Behavior Tech. Computer(0x046e), rev 1.00 port 3 powered port 4 addr 4: low speed, power 100 mA, config 1, Microsoft IntelliMouse® Explorer(0x001e), Microsoft(0x045e), rev 1.14 port 2 powered And usbd still not detect detaches (not execute detach scripts) People what is going on with USB code ??? Paul -- TSB Russian Express, Moscow Vladimir B. Grebenschikov, [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: USB detach crashes possibly fixed
Paul van der Zwan wrote: No, but if I run usbd in the foreground and with some -v flags it never reports seeing a detach event even though the device driver reports it. It looks like usbd just doesn't get it... [ ... ] It looks like the driver works fine as far as I can tell, but usbd just doesn't see the detach event. Does the daemon use kqueue? It looks like there's a bug in kqueue for FIN processing, and another bug in another area. It appears to all be FreeBSD 4.5/current specific (4.4 doesn't have the lost event problem). -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: USB detach crashes possibly fixed
On 14-Feb-2002 (08:29:50/GMT) Brian Fundakowski Feldman wrote: Please try this change (already committed to -CURRENT) and let me know if crashes due to detaching USB devices specifically have been eliminated. I cvsupped on Feb 14, 20:21 CET (GMT+1, Italian time), recompiled both world kernel (yes, runned mergemaster also :-) and messages show that device attach and detach (before I got only attach) ...kernel: uscanner0: EPSON Perfection1240, rev 1.00/1.14, addr 2 ...kernel: uscanner0: at uhub0 port 1 (addr 2) disconnected ...kernel: uscanner0: detached _BUT_ I lost /dev/speaker. I don't know if this is related to patch but with my previous installed build (a bit old, of December 11, 2001) I have those lines on /etc/usbd.conf: attach /bin/chmod 666 /dev/${DEVNAME} echo L16cce /dev/speaker detach echo L16eec /dev/speaker and I got a small tune on attach but nothing on detach. Now I am unable to play notes on /dev/speaker. Any hint? I have no crashes but the detach action is never executed when I switch off my Sony camera ( it has never worked as far as I know) Attach actions are executed fine.. Paul -- Paul van der Zwan paulz @ trantor.xs4all.nl I think I'll move to theory, everything works in theory... To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: USB detach crashes possibly fixed
Paul van der Zwan wrote: I lost /dev/speaker. I don't know if this is related to patch but with my previous installed build (a bit old, of December 11, 2001) I have those lines on /etc/usbd.conf: attach /bin/chmod 666 /dev/${DEVNAME} echo L16cce /dev/speaker detach echo L16eec /dev/speaker and I got a small tune on attach but nothing on detach. Now I am unable to play notes on /dev/speaker. Any hint? I have no crashes but the detach action is never executed when I switch off my Sony camera ( it has never worked as far as I know) Attach actions are executed fine.. PHK was threatening to murder /dev/speaker to work around some clock issues that would be hard to nail down the right way. It may be that the clock code was changed recently, and your CVSup got the (putatively) new clock code at the same time as the USB fixes. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: USB detach crashes possibly fixed
Paul van der Zwan [EMAIL PROTECTED] wrote: On 14-Feb-2002 (08:29:50/GMT) Brian Fundakowski Feldman wrote: Please try this change (already committed to -CURRENT) and let me know if crashes due to detaching USB devices specifically have been eliminated. I cvsupped on Feb 14, 20:21 CET (GMT+1, Italian time), recompiled both world kernel (yes, runned mergemaster also :-) and messages show that device attach and detach (before I got only attach) ...kernel: uscanner0: EPSON Perfection1240, rev 1.00/1.14, addr 2 ...kernel: uscanner0: at uhub0 port 1 (addr 2) disconnected ...kernel: uscanner0: detached _BUT_ I lost /dev/speaker. I don't know if this is related to patch but with my previous installed build (a bit old, of December 11, 2001) I have those lines on /etc/usbd.conf: attach /bin/chmod 666 /dev/${DEVNAME} echo L16cce /dev/speaker detach echo L16eec /dev/speaker and I got a small tune on attach but nothing on detach. Now I am unable to play notes on /dev/speaker. Any hint? As Terry notes, shouldn't possibly be related. I have no crashes but the detach action is never executed when I switch off my Sony camera ( it has never worked as far as I know) Attach actions are executed fine.. Have you tried compiling in all available USB debugging support or seeing if anyone else is using one like yours? -- Brian Fundakowski Feldman \'[ FreeBSD ]''\ [EMAIL PROTECTED] [EMAIL PROTECTED] \ The Power to Serve! \ Opinions expressed are my own. \,,\ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: USB detach crashes possibly fixed
On Sat, 16 Feb 2002, Terry Lambert wrote: PHK was threatening to murder /dev/speaker to work around some clock issues that would be hard to nail down the right way. I think you mean /dev/pcaudio. I use /dev/pcaudio to expose the brokenness of clock code that is not nailed down in the right way. Bruce To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
RE: USB detach crashes possibly fixed
On 14-Feb-2002 (08:29:50/GMT) Brian Fundakowski Feldman wrote: Please try this change (already committed to -CURRENT) and let me know if crashes due to detaching USB devices specifically have been eliminated. I cvsupped on Feb 14, 20:21 CET (GMT+1, Italian time), recompiled both world kernel (yes, runned mergemaster also :-) and messages show that device attach and detach (before I got only attach) ...kernel: uscanner0: EPSON Perfection1240, rev 1.00/1.14, addr 2 ...kernel: uscanner0: at uhub0 port 1 (addr 2) disconnected ...kernel: uscanner0: detached _BUT_ I lost /dev/speaker. I don't know if this is related to patch but with my previous installed build (a bit old, of December 11, 2001) I have those lines on /etc/usbd.conf: attach /bin/chmod 666 /dev/${DEVNAME} echo L16cce /dev/speaker detach echo L16eec /dev/speaker and I got a small tune on attach but nothing on detach. Now I am unable to play notes on /dev/speaker. Any hint? TIA, Riccardo. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
USB detach crashes possibly fixed
Please try this change (already committed to -CURRENT) and let me know if crashes due to detaching USB devices specifically have been eliminated. http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/usb/usb.c.diff?r1=1.54r2=1.55f=h -- Brian Fundakowski Feldman \'[ FreeBSD ]''\ [EMAIL PROTECTED] [EMAIL PROTECTED] \ The Power to Serve! \ Opinions expressed are my own. \,,\ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: USB detach crashes possibly fixed
I CVSuped kernel src tree to recompile, and uhub detach problem I've reported seems to be solved. With new kernel, I confirmed I could safely attach/detach all USB devices I have. Brian Fundakowski Feldman wrote: Please try this change (already committed to -CURRENT) and let me know if crashes due to detaching USB devices specifically have been eliminated. http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/usb/usb.c.diff?r1=1.54r2=1.55f=h -- FUJIMOTO Kou, Dept. of Information Sciences, Tokyo Denki Univ. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message