From owner-freebsd-usb@FreeBSD.ORG Sun Aug 29 11:45:12 2010 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 24E2B10656A9 for ; Sun, 29 Aug 2010 11:45:12 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.swip.net [212.247.154.33]) by mx1.freebsd.org (Postfix) with ESMTP id 96EF28FC18 for ; Sun, 29 Aug 2010 11:45:11 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=lVe/gw8n+Sg6VfbntC6ksM24ozRLXC8p6LIuM5gXbf8= c=1 sm=1 a=8nJEP1OIZ-IA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=BW_2DX0wYV1gsNYgw5cA:9 a=T-_-523De2l72ptrHQAA:7 a=dHwqL7ECCRxi9gGEw1WRNht_Vg4A:4 a=wPNLvfGTeEIA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:117 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 13521118; Sun, 29 Aug 2010 13:45:00 +0200 From: Hans Petter Selasky To: Matthew Luckie Date: Sun, 29 Aug 2010 13:41:11 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <4C789A4E.9030409@luckie.org.nz> <201008280950.35903.hselasky@c2i.net> <4C78F7D7.7010507@luckie.org.nz> In-Reply-To: <4C78F7D7.7010507@luckie.org.nz> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201008291341.11379.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: ZTE USB 3g stick 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: Sun, 29 Aug 2010 11:45:12 -0000 On Saturday 28 August 2010 13:49:43 Matthew Luckie wrote: > On 08/28/10 19:50, Hans Petter Selasky wrote: > > On Saturday 28 August 2010 07:10:38 Matthew Luckie wrote: > >> Hi > >> > >> I've got a 3g usb stick that works fine with 8.0-STABLE from Jan 3rd > >> 2010, but does not with 8.1-RELEASE. Its a Vodafone branded stick > >> bought in New Zealand. > >> > >> With FreeBSD 8.0 it prints this when I insert the stick: > >> > >> usb_test_autoinstall: Eject CD command status: USB_ERR_PENDING_REQUESTS > >> ugen6.2: at usbus6 > >> ugen6.2: at usbus6 (disconnected) > >> ugen6.2: at usbus6 > >> u3g0: >> 2.00/0.00, addr 2> on usbus6 > >> u3g0: Found 5 ports. > >> umass0: >> 2.00/0.00, addr 2> on usbus6 > >> umass0: SCSI over Bulk-Only; quirks = 0x0000 > >> umass0:2:0:-1: Attached to scbus2 > >> (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 > >> (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error > >> (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition > >> (probe0:umass-sim0:0:0:0): NOT READY asc:3a,0 > >> (probe0:umass-sim0:0:0:0): Medium not present > >> (probe0:umass-sim0:0:0:0): Unretryable error > >> da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 > >> da0: Removable Direct Access SCSI-2 device > >> da0: 40.000MB/s transfers > >> da0: Attempt to query device size failed: NOT READY, Medium not present > >> > >> [mjl@mylar mjl]$ sudo usbconfig -u 6 dump_info > >> ugen6.1: at usbus6, cfg=0 md=HOST spd=HIGH > >> (480Mbps) pwr=ON > >> > >> ugen6.2: at usbus6, cfg=0 > >> md=HOST spd=HIGH (480Mbps) pwr=ON > >> > >> On FreeBSD 8.1 it prints this: > >> > >> ugen6.2: at usbus6 > >> > >> (and nothing else) > >> > >> [mjl@mylar mjl]$ sudo usbconfig -d 6.2 dump_device_desc > >> ugen6.2: at usbus6, cfg=255 > >> md=HOST spd=HIGH (480Mbps) pwr=ON > >> > >> bLength = 0x0012 > >> bDescriptorType = 0x0001 > >> bcdUSB = 0x0200 > >> bDeviceClass = 0x0000 > >> bDeviceSubClass = 0x0000 > >> bDeviceProtocol = 0x0000 > >> bMaxPacketSize0 = 0x0040 > >> idVendor = 0x19d2 > >> idProduct = 0x2000 > >> bcdDevice = 0x0000 > >> iManufacturer = 0x0002 > >> iProduct = 0x0001 > >> iSerialNumber = 0x0003 > >> bNumConfigurations = 0x0001 > > > > Have you loaded the u3g driver before plugging the device. Also try: > Yes, I have. > > [mjl@mylar mjl]$ sudo kldload /boot/kernel/u3g.ko > kldload: can't load /boot/kernel/u3g.ko: File exists > > module_register: module uhub/u3g already exists! > Module uhub/u3g failed to register: 17 > > > usbconfig -d 6.2 set_config 0 > > ugen6.2: at usbus6 > umass0: 2.00/0.00, addr 2> on usbus6 > cd1 at umass-sim0 bus 0 scbus2 target 0 lun 0 > cd1: Removable CD-ROM SCSI-2 device > cd1: 40.000MB/s transfers > cd1: cd present [31484 x 2048 byte records] > > Sadly no /dev/cuaU* entries. After the set_config, I have new /dev > entries for cd1, iso9660, pass1, and of course ugen6.2. > > [mjl@mylar ~]$ sudo usbconfig -d 6.2 dump_device_desc > ugen6.2: at usbus6, cfg=0 > md=HOST spd=HIGH (480Mbps) pwr=ON > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0200 > bDeviceClass = 0x0000 > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0040 > idVendor = 0x19d2 > idProduct = 0x2000 > bcdDevice = 0x0000 > iManufacturer = 0x0002 > iProduct = 0x0001 > iSerialNumber = 0x0003 > bNumConfigurations = 0x0001 Hi, Possibly we need to add some code to check when the autoinstall system is ready for receiving the command. What happens if you try to add a delay before executing the eject command: --- src/sys/dev/usb/usb_msctest.c 2010-03-08 16:57:53.000000000 0000 +++ src/sys/dev/usb/usb_msctest.c 2010-03-08 16:57:53.000000000 0000 @@ -588,6 +588,8 @@ if (sc == NULL) return (USB_ERR_INVAL); + pause("WAIT", hz); + err = 0; switch (method) { case MSC_EJECT_STOPUNIT: --HPS