From owner-freebsd-current Sun Feb 17 3: 3: 6 2002 Delivered-To: freebsd-current@freebsd.org Received: from smtpzilla2.xs4all.nl (smtpzilla2.xs4all.nl [194.109.127.138]) by hub.freebsd.org (Postfix) with ESMTP id BB26037B404; Sun, 17 Feb 2002 03:02:56 -0800 (PST) Received: from trantor.xs4all.nl (trantor.xs4all.nl [194.109.61.248]) by smtpzilla2.xs4all.nl (8.12.0/8.12.0) with ESMTP id g1HB2mUH026936; Sun, 17 Feb 2002 12:02:49 +0100 (CET) Received: from trantor.xs4all.nl (localhost [127.0.0.1]) by trantor.xs4all.nl (8.11.6/8.11.6) with ESMTP id g1HB2m146727; Sun, 17 Feb 2002 12:02:48 +0100 (MET) (envelope-from paulz@trantor.xs4all.nl) Message-Id: <200202171102.g1HB2m146727@trantor.xs4all.nl> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: "Brian F. Feldman" Subject: Re: USB detach crashes possibly fixed In-reply-to: Your message of "Sat, 16 Feb 2002 20:28:13 EST." <200202170128.g1H1SDY03195@green.bikeshed.org> Cc: Riccardo Torrini , current@FreeBSD.ORG Date: Sun, 17 Feb 2002 12:02:48 +0100 From: Paul van der Zwan Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 trantor kernel: umass0: Sony Sony DSC, rev 1.00/2.10, addr 2 Feb 17 11:57:44 trantor kernel: da0 at umass-sim0 bus 0 target 0 lun 0 Feb 17 11:57:44 trantor kernel: da0: Removable Direct Access SCSI-0 device Feb 17 11:57:44 trantor kernel: da0: 150KB/s transfers Feb 17 11:57:44 trantor kernel: da0: 61MB (126848 512 byte sectors: 0H 0S/T 0C) Feb 17 11:58:04 trantor kernel: umass0: at uhub0 port 1 (addr 2) disconnected Feb 17 11:58:04 trantor kernel: (da0:umass-sim0:0:0:0): lost device Feb 17 11:58:04 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.505840000, Sony DSC, Sony: vndr=0x054c prdct=0x0010 rlse=0x0210 clss=0x0000 subclss=0x0000 prtcl=0x0000 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=0x0000 subclss=0x0000 prtcl=0x0000 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 majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message