Date: Sat, 09 Jul 2011 23:20:56 +0200 From: Torfinn Ingolfsen <torfinn.ingolfsen@broadpark.no> To: freebsd-usb@FreeBSD.org Subject: Re: How to debug a misbehaving usb device (DYMO LabelManager PC)? Message-ID: <20110709232056.76907ac0.torfinn.ingolfsen@broadpark.no> In-Reply-To: <201107092244.44896.hselasky@c2i.net> References: <20110703183320.b5b2aecb.torfinn.ingolfsen@broadpark.no> <201107092229.22653.hselasky@c2i.net> <20110709223653.3fda9a73.torfinn.ingolfsen@broadpark.no> <201107092244.44896.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 09 Jul 2011 22:44:44 +0200 Hans Petter Selasky <hselasky@c2i.net> wrote: > You could try to change in /sys/dev/usb/usb_device.c: > > /* Set the actual configuration value. */ > err = usbd_req_set_config(udev, NULL, cdp->bConfigurationValue); > if (err) { > goto done; > } > > Into: > > /* Set the actual configuration value. */ > err = usbd_req_set_config(udev, NULL, cdp->bConfigurationValue); > if (err && 0) { > goto done; > } > err = 0; > > I think the device has received the set config, though there appears to be > something wrong about the STALL part, which I think we can safely ignore. Ok, I did that change and rebuilt the kernel. Like this: root@kg-v7# uname -a FreeBSD kg-v7.kg4.no 8.2-STABLE FreeBSD 8.2-STABLE #7: Sat Jul 9 23:00:31 CEST 2011 root@kg-v7.kg4.no:/usr/obj/usr/src/sys/GENERIC amd64 Attaching the device, and root@kg-v7# usbconfig -d 0.3 ugen0.3: <product 0x0011 vendor 0x0922> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON root@kg-v7# usbconfig -d 0.3 dump_curr_config_desc ugen0.3: <product 0x0011 vendor 0x0922> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0021 bNumInterfaces = 0x0002 bConfigurationValue = 0x0007 iConfiguration = 0x0001 <retrieving string failed> bmAttributes = 0x0002 bMaxPower = 0x0001 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0002 bInterfaceClass = 0x0007 bInterfaceSubClass = 0x0001 bInterfaceProtocol = 0x0002 iInterface = 0x0000 <no string> Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 <IN> bmAttributes = 0x0002 <BULK> wMaxPacketSize = 0x0008 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0008 bDescriptorType = 0x0005 bEndpointAddress = 0x0002 <OUT> bmAttributes = 0x0003 <INTERRUPT> wMaxPacketSize = 0x0008 bInterval = 0x0004 bRefresh = 0x00ff bSynchAddress = 0x0000 >From /var/log/messages I get: Jul 9 23:17:27 kg-v7 kernel: ugen0.3: <vendor 0x0922> at usbus0 Jul 9 23:17:27 kg-v7 kernel: ulpt0: <vendor 0x0922 product 0x0011, class 0/0, rev 1.10/1.00, addr 3> on usbus0 Jul 9 23:17:27 kg-v7 kernel: device_attach: ulpt0 attach returned 12 But as I am not going to use ulpt, I'm not worrieed about that. Now off to try VirtualBox. Thanks for helping! -- Torfinn
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110709232056.76907ac0.torfinn.ingolfsen>