Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Mar 2012 21:06:59 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        gnome <gnome@FreeBSD.org>
Subject:   Re: Fwd: Re: calibre: kindle usb connection problem
Message-ID:  <4F74A4C3.1090000@FreeBSD.org>
In-Reply-To: <4F749FFD.7020707@FreeBSD.org>
References:  <4F749AD1.7020703@FreeBSD.org> <4F749B3B.5080803@FreeBSD.org> <4F749FFD.7020707@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
on 29/03/2012 20:46 Andriy Gapon said the following:
> 
> Not sure if the problem is caused by something in the device or by one of the
> hal's utilities.
> This is what I see in the system log:
> Mar 29 20:37:20 trant kernel: ugen2.2: <Amazon> at usbus2
> Mar 29 20:37:20 trant kernel: umass0: <Mass Storage> on usbus2
> Mar 29 20:37:20 trant kernel: ugen2.2: <Amazon> at usbus2 (disconnected)
> Mar 29 20:37:20 trant kernel: umass0: at uhub2, port 6, addr 2 (disconnected)
> Mar 29 20:37:22 trant kernel: ugen2.2: <Amazon> at usbus2
> Mar 29 20:37:22 trant kernel: umass0: <Mass Storage> on usbus2
> Mar 29 20:37:22 trant kernel: da0 at umass-sim0 bus 0 scbus8 target 0 lun 0
> Mar 29 20:37:22 trant kernel: da0: <Kindle Internal Storage 0100> Removable
> Direct Access SCSI-2 device
> Mar 29 20:37:22 trant kernel: da0: 40.000MB/s transfers
> Mar 29 20:37:22 trant kernel: da0: 3090MB (6328768 512 byte sectors: 255H 63S/T
> 393C)
> 
> Note how the umass driver attaches, then immediately detaches and two seconds
> later attaches again.

I can confirm that without hald running the device attaches in one go.  With
hald it's always attach-detach-reattach.  Maybe something in
hald-probe-usb2-device or libusb confuses the device or USB stack?


> Here's hald output from that period:
> 
> 20:37:17.378 [I] hf-devd.c:316: received devd event: !system=DEVFS
> subsystem=CDEV type=CREATE cdev=usb/2.2.0^M
> 20:37:17.378 [I] hf-devd.c:316: received devd event: !system=DEVFS
> subsystem=CDEV type=CREATE cdev=ugen2.2^M
> 20:37:19.448 [I] hf-devd.c:316: received devd event: !system=DEVFS
> subsystem=CDEV type=CREATE cdev=usb/2.2.1^M
> 20:37:20.576 [I] hf-devd.c:316: received devd event: !system=USB
> subsystem=DEVICE type=ATTACH ugen=ugen2.2 cdev=ugen2.2 vendor=0x1949
> product=0x0004 devclass=0x00 devsubclass=0x00 sernum="B008A0A00527517D"
> release=0x0100 mode=host port=6 parent=ugen2.1^M
> 20:37:20.577 [I] hf-usb2.c:213: received devd attach event, device ugen=ugen2.2^M
> Run started hald-probe-usb2-device (20000) (0) ^M
> !  full path is '/usr/local/libexec/hald-probe-usb2-device', program_dir is
> '/usr/local/libexec'^M
> pid 70609: rc=0 signaled=0: /usr/local/libexec/hald-probe-usb2-device^M
> 20:37:22.640 [I] hald.c:108: Added device to GDL;
> udi=/org/freedesktop/Hal/devices/usb_device_1949_4_B008A0A00527517D^M
> Run started hald-probe-usb2-interface (20000) (0) ^M
> !  full path is '/usr/local/libexec/hald-probe-usb2-interface', program_dir is
> '/usr/local/libexec'^M
> pid 70610: rc=0 signaled=0: /usr/local/libexec/hald-probe-usb2-interface^M
> 20:37:22.665 [I] hald.c:108: Added device to GDL;
> udi=/org/freedesktop/Hal/devices/usb_device_1949_4_B008A0A00527517D_if0^M
> 20:37:22.666 [I] hf-devd.c:316: received devd event: !system=USB
> subsystem=INTERFACE type=ATTACH ugen=ugen2.2 cdev=ugen2.2 vendor=0x1949
> product=0x0004 devclass=0x00 devsubclass=0x00 sernum="B008A0A00527517D"
> release=0x0100 mode=host interface=0 endpoints=2 intclass=0x08 intsubclass=0x06
> intprotocol=0x50^M
> 20:37:22.666 [I] hf-devd.c:316: received devd event: +umass0 at bus=1 hubaddr=6
> port=2 devaddr=2 interface=0 vendor=0x1949 product=0x0004 devclass=0x00
> devsubclass=0x00 sernum="B008A0A00527517D" release=0x0100 mode=host
> intclass=0x08 intsubclass=0x06 intprotocol=0x50  on uhub2^M
> 20:37:22.671 [I] hald.c:108: Added device to GDL;
> udi=/org/freedesktop/Hal/devices/usb_device_1949_4_B008A0A00527517D_if0_scsi_host^M
> 20:37:22.681 [I] hf-devd.c:316: received devd event: !system=USB
> subsystem=DEVICE type=DETACH ugen=ugen2.2 cdev=ugen2.2 vendor=0x1949
> product=0x0004 devclass=0x00 devsubclass=0x00 sernum="B008A0A00527517D"
> release=0x0100 mode=host port=6 parent=ugen2.1^M
> 20:37:22.681 [I] hf-usb2.c:221: received devd detach event, device ugen=ugen2.2^M
> 20:37:22.682 [I] hald.c:143: Removed device from GDL;
> udi=/org/freedesktop/Hal/devices/usb_device_1949_4_B008A0A00527517D_if0_scsi_host^M
> 20:37:22.682 [I] hald.c:143: Removed device from GDL;
> udi=/org/freedesktop/Hal/devices/usb_device_1949_4_B008A0A00527517D_if0^M
> 20:37:22.683 [I] hald.c:143: Removed device from GDL;
> udi=/org/freedesktop/Hal/devices/usb_device_1949_4_B008A0A00527517D^M
> 20:37:22.685 [I] hf-devd.c:316: received devd event: !system=USB
> subsystem=INTERFACE type=DETACH ugen=ugen2.2 cdev=ugen2.2 vendor=0x1949
> product=0x0004 devclass=0x00 devsubclass=0x00 sernum="B008A0A00527517D"
> release=0x0100 mode=host interface=0 endpoints=2 intclass=0x08 intsubclass=0x06
> intprotocol=0x50^M
> 20:37:22.685 [I] hf-devd.c:316: received devd event: !system=DEVFS
> subsystem=CDEV type=DESTROY cdev=ugen2.2^M
> 20:37:23.188 [I] hald.c:108: Added device to GDL;
> udi=/org/freedesktop/Hal/devices/computer_scsi_host_6^M
> 20:37:23.190 [I] hald.c:108: Added device to GDL;
> udi=/org/freedesktop/Hal/devices/computer_scsi_host_6_scsi_device_lun0^M
> Run started hald-probe-scsi (20000) (0) ^M
> 
> 
> Note how computer_scsi_host_6 device is getting inserted when
> usb_device_1949_4_B008A0A00527517D_if0_scsi_host is removed.
> I think that this is where the USB ancestry information is lost.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F74A4C3.1090000>