From owner-freebsd-usb@FreeBSD.ORG Sat Jul 9 21:20:58 2011 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E681106564A for ; Sat, 9 Jul 2011 21:20:58 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) Received: from eterpe-smout.broadpark.no (eterpe-smout.broadpark.no [80.202.8.16]) by mx1.freebsd.org (Postfix) with ESMTP id 48B9F8FC0C for ; Sat, 9 Jul 2011 21:20:58 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from ignis-smin.broadpark.no ([80.202.8.11]) by eterpe-smout.broadpark.no (Sun Java(tm) System Messaging Server 7u3-15.01 64bit (built Feb 12 2010)) with ESMTP id <0LO3000W34MX2P70@eterpe-smout.broadpark.no> for freebsd-usb@FreeBSD.org; Sat, 09 Jul 2011 23:20:57 +0200 (CEST) Received: from kg-v2.kg4.no ([80.203.92.230]) by ignis-smin.broadpark.no (Sun Java(tm) System Messaging Server 7u3-15.01 64bit (built Feb 12 2010)) with SMTP id <0LO300I6Z4MWJR50@ignis-smin.broadpark.no> for freebsd-usb@FreeBSD.org; Sat, 09 Jul 2011 23:20:57 +0200 (CEST) Date: Sat, 09 Jul 2011 23:20:56 +0200 From: Torfinn Ingolfsen To: freebsd-usb@FreeBSD.org 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> X-Mailer: Sylpheed 3.1.0 (GTK+ 2.22.1; amd64-portbld-freebsd8.1) X-Face: "t9w2,-X@O^I`jVW\sonI3.,36KBLZE*AL[y9lL[PyFD*r_S:dIL9c[8Y>V42R0"!"yb_zN,f#%.[PYYNq; m"_0v; ~rUM2Yy!zmkh)3&U|u!=T(zyv,MHJv"nDH>OJ`t(@mil461d_B'Uo|'nMwlKe0Mv=kvV?Nh@>Hb<3s_z2jYgZhPb@?Wi^x1a~Hplz1.zH Cc: Subject: Re: How to debug a misbehaving usb device (DYMO LabelManager PC)? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jul 2011 21:20:58 -0000 On Sat, 09 Jul 2011 22:44:44 +0200 Hans Petter Selasky 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: 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: 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 bmAttributes = 0x0002 bMaxPower = 0x0001 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0002 bInterfaceClass = 0x0007 bInterfaceSubClass = 0x0001 bInterfaceProtocol = 0x0002 iInterface = 0x0000 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 bmAttributes = 0x0002 wMaxPacketSize = 0x0008 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0008 bDescriptorType = 0x0005 bEndpointAddress = 0x0002 bmAttributes = 0x0003 wMaxPacketSize = 0x0008 bInterval = 0x0004 bRefresh = 0x00ff bSynchAddress = 0x0000 >From /var/log/messages I get: Jul 9 23:17:27 kg-v7 kernel: ugen0.3: at usbus0 Jul 9 23:17:27 kg-v7 kernel: ulpt0: 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