From owner-freebsd-usb@FreeBSD.ORG Sun Aug 15 14:40:01 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 955D6106566B for ; Sun, 15 Aug 2010 14:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 55BF18FC16 for ; Sun, 15 Aug 2010 14:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7FEe1iJ022475 for ; Sun, 15 Aug 2010 14:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7FEe1Xu022474; Sun, 15 Aug 2010 14:40:01 GMT (envelope-from gnats) Resent-Date: Sun, 15 Aug 2010 14:40:01 GMT Resent-Message-Id: <201008151440.o7FEe1Xu022474@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Paul Thornton Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 513E51065673 for ; Sun, 15 Aug 2010 14:31:21 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 409418FC12 for ; Sun, 15 Aug 2010 14:31:21 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o7FEVKxG026530 for ; Sun, 15 Aug 2010 14:31:20 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o7FEVKS0026529; Sun, 15 Aug 2010 14:31:20 GMT (envelope-from nobody) Message-Id: <201008151431.o7FEVKS0026529@www.freebsd.org> Date: Sun, 15 Aug 2010 14:31:20 GMT From: Paul Thornton To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/149675: uftdi doesn't react to break properly 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, 15 Aug 2010 14:40:01 -0000 >Number: 149675 >Category: usb >Synopsis: uftdi doesn't react to break properly >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Aug 15 14:40:00 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Paul Thornton >Release: 8.1-RELEASE >Organization: >Environment: FreeBSD base01.local 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Sun Aug 15 09:38:55 UTC 2010 root@base01.local:/usr/src/sys/i386/compile/TEST2 i386 The same issue is seen with GENERIC kernel >Description: When setting the BRKINT and ~IGNBRK options on a handle where the underlying hardware has an FTDI chipset driven by uftdi and ucom, the break condition is not correctly acted upon. The underlying hardware is an FTDI FT232BL chip. The expected behaviour is that the buffer be flushed on reception of a break when BRKINT is used, however the driver appears to behave as if BRKINT is clear, as an additional 0x00 byte is seen and the buffer isn't flushed. FreeBSD 7.2 and 8.0 also exhibit the same behaviour. Using the same test program, and same USB hardware, Linux behaves as per documentation and flushes the buffer on reception of the break when BRKINT is set. >How-To-Repeat: Connect two machines using ftdi-driven hardware. Send a break followed by some data A. Send another break, followed by some data B. The correct response should be that on the receiver the buffer is flushed by both breaks, and a read will only return the data B. What is likely to be read, however, is: 0x00 [A A A A A] 0x00 [B B B B B] The code I was using which brought this issue to light can be downloaded from: http://www.prt.org/dmxrx2.c >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Sun Aug 15 15:15:34 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 8037A10656A7 for ; Sun, 15 Aug 2010 15:15:34 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe10.swipnet.se [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id A8B678FC08 for ; Sun, 15 Aug 2010 15:15:33 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Rn8JuselT4EA:10 a=Q9fys5e9bTEA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=tmWW_1DqAAAA:8 a=nHhWsbXdNbJA-kvMEs0A:9 a=Bk9AbdsfqKfwgHWwfg8A:7 a=OvY7mHAooVaNE8wjdArDauSJ-pMA:4 a=PUjeQqilurYA:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe10.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 1217474498; Sun, 15 Aug 2010 17:15:31 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sun, 15 Aug 2010 17:11:56 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <201008151431.o7FEVKS0026529@www.freebsd.org> In-Reply-To: <201008151431.o7FEVKS0026529@www.freebsd.org> 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-15" Content-Transfer-Encoding: 7bit Message-Id: <201008151711.56278.hselasky@c2i.net> Cc: freebsd-gnats-submit@freebsd.org, Paul Thornton Subject: Re: usb/149675: uftdi doesn't react to break properly 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, 15 Aug 2010 15:15:34 -0000 On Sunday 15 August 2010 16:31:20 Paul Thornton wrote: > >Number: 149675 > >Category: usb > >Synopsis: uftdi doesn't react to break properly > >Confidential: no > >Severity: non-critical > >Priority: medium > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Sun Aug 15 14:40:00 UTC 2010 > >Closed-Date: > >Last-Modified: > >Originator: Paul Thornton > >Release: 8.1-RELEASE > >Organization: > > >Environment: > FreeBSD base01.local 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Sun Aug 15 > 09:38:55 UTC 2010 root@base01.local:/usr/src/sys/i386/compile/TEST2 > i386 > > The same issue is seen with GENERIC kernel > > >Description: > When setting the BRKINT and ~IGNBRK options on a handle where the > underlying hardware has an FTDI chipset driven by uftdi and ucom, the > break condition is not correctly acted upon. The underlying hardware is > an FTDI FT232BL chip. > > The expected behaviour is that the buffer be flushed on reception of a > break when BRKINT is used, however the driver appears to behave as if > BRKINT is clear, as an additional 0x00 byte is seen and the buffer isn't > flushed. > > FreeBSD 7.2 and 8.0 also exhibit the same behaviour. > > Using the same test program, and same USB hardware, Linux behaves as per > documentation and flushes the buffer on reception of the break when BRKINT > is set. > > >How-To-Repeat: > Connect two machines using ftdi-driven hardware. > > Send a break followed by some data A. Send another break, followed by some > data B. > > The correct response should be that on the receiver the buffer is flushed > by both breaks, and a read will only return the data B. > > What is likely to be read, however, is: 0x00 [A A A A A] 0x00 [B B B B B] > > The code I was using which brought this issue to light can be downloaded > from: http://www.prt.org/dmxrx2.c > Hi, Compile a kernel with "options USB_DEBUG". Enable FTDI debugging: sysctl hw.usb.uftdi.debug=15 Do you seen any debug prints when sending BREAK? --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Aug 15 15:30:04 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F04861065694 for ; Sun, 15 Aug 2010 15:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C1C9D8FC18 for ; Sun, 15 Aug 2010 15:30:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7FFU4jl070176 for ; Sun, 15 Aug 2010 15:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7FFU4RR070173; Sun, 15 Aug 2010 15:30:04 GMT (envelope-from gnats) Date: Sun, 15 Aug 2010 15:30:04 GMT Message-Id: <201008151530.o7FFU4RR070173@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/149675: uftdi doesn't react to break properly X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Aug 2010 15:30:05 -0000 The following reply was made to PR usb/149675; it has been noted by GNATS. From: Hans Petter Selasky To: freebsd-usb@freebsd.org Cc: Paul Thornton , freebsd-gnats-submit@freebsd.org Subject: Re: usb/149675: uftdi doesn't react to break properly Date: Sun, 15 Aug 2010 17:11:56 +0200 On Sunday 15 August 2010 16:31:20 Paul Thornton wrote: > >Number: 149675 > >Category: usb > >Synopsis: uftdi doesn't react to break properly > >Confidential: no > >Severity: non-critical > >Priority: medium > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Sun Aug 15 14:40:00 UTC 2010 > >Closed-Date: > >Last-Modified: > >Originator: Paul Thornton > >Release: 8.1-RELEASE > >Organization: > > >Environment: > FreeBSD base01.local 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Sun Aug 15 > 09:38:55 UTC 2010 root@base01.local:/usr/src/sys/i386/compile/TEST2 > i386 > > The same issue is seen with GENERIC kernel > > >Description: > When setting the BRKINT and ~IGNBRK options on a handle where the > underlying hardware has an FTDI chipset driven by uftdi and ucom, the > break condition is not correctly acted upon. The underlying hardware is > an FTDI FT232BL chip. > > The expected behaviour is that the buffer be flushed on reception of a > break when BRKINT is used, however the driver appears to behave as if > BRKINT is clear, as an additional 0x00 byte is seen and the buffer isn't > flushed. > > FreeBSD 7.2 and 8.0 also exhibit the same behaviour. > > Using the same test program, and same USB hardware, Linux behaves as per > documentation and flushes the buffer on reception of the break when BRKINT > is set. > > >How-To-Repeat: > Connect two machines using ftdi-driven hardware. > > Send a break followed by some data A. Send another break, followed by some > data B. > > The correct response should be that on the receiver the buffer is flushed > by both breaks, and a read will only return the data B. > > What is likely to be read, however, is: 0x00 [A A A A A] 0x00 [B B B B B] > > The code I was using which brought this issue to light can be downloaded > from: http://www.prt.org/dmxrx2.c > Hi, Compile a kernel with "options USB_DEBUG". Enable FTDI debugging: sysctl hw.usb.uftdi.debug=15 Do you seen any debug prints when sending BREAK? --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Aug 15 16:10:05 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7643E1065672 for ; Sun, 15 Aug 2010 16:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6619C8FC0A for ; Sun, 15 Aug 2010 16:10:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7FGA5a6008534 for ; Sun, 15 Aug 2010 16:10:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7FGA5rE008529; Sun, 15 Aug 2010 16:10:05 GMT (envelope-from gnats) Date: Sun, 15 Aug 2010 16:10:05 GMT Message-Id: <201008151610.o7FGA5rE008529@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Ed Schouten Cc: Subject: Re: usb/149675: uftdi doesn't react to break properly X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ed Schouten List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Aug 2010 16:10:05 -0000 The following reply was made to PR usb/149675; it has been noted by GNATS. From: Ed Schouten To: bug-followup@FreeBSD.org, prt@prt.org, hselasky@c2i.net Cc: Subject: Re: usb/149675: uftdi doesn't react to break properly Date: Sun, 15 Aug 2010 18:02:40 +0200 --wr1Q/2bz0MCWWNYv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hans, Paul, I just looked at the usb_serial.c source code and it seems break/parity conditions are never propagated to the TTY layer: if (ttydisc_rint(tp, buf[cnt], 0) =3D=3D -1) { The third argument is supposed to be a bitmask of TRE_FRAMING, TRE_PARITY, TRE_OVERRUN and TRE_BREAK, to indicate the type of transmission error/condition. This is why breaks are probably just received as zero-bytes. --=20 Ed Schouten WWW: http://80386.nl/ --wr1Q/2bz0MCWWNYv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkxoD6AACgkQ52SDGA2eCwWfegCeLUhVFlBv4Khtv99m2XHXsqqI GpwAn2wJturYMHd40W+kVGafw8Pkv2iu =Rmbv -----END PGP SIGNATURE----- --wr1Q/2bz0MCWWNYv-- From owner-freebsd-usb@FreeBSD.ORG Sun Aug 15 17:50:43 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 D680B106566B; Sun, 15 Aug 2010 17:50:43 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id CD9168FC12; Sun, 15 Aug 2010 17:50:42 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=+aufMl16ZjoZikD717oZHt/II3iOLg17uabV0d0CmU0= c=1 sm=1 a=Rn8JuselT4EA:10 a=Q9fys5e9bTEA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=tmWW_1DqAAAA:8 a=6I5d2MoRAAAA:8 a=TC43dgyeolcY-Rfx3icA:9 a=lLg7f31DhGg7tsa0RKwA:7 a=KFkOl1lQFXAtUTX3-Fv-f6g8lH4A:4 a=PUjeQqilurYA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:117 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 8434766; Sun, 15 Aug 2010 19:50:04 +0200 To: freebsd-usb@freebsd.org From: Hans Petter Selasky X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'( =?iso-8859-15?q?=3B=5FIjlA=3A=0A=09hGE=2E=2EEw?=, =?iso-8859-15?q?XAQ*o=23=5C/M=7ESC=3DS1-f9=7BEzRfT=27=7CHhll5Q=5Dha5Bt-s=7Co?= =?iso-8859-15?q?TlKMusi=3A1e=5BwJl=7Dkd=7DGR=0A=09Z0adGx-x=5F0zGbZj=27e?=(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' Date: Sun, 15 Aug 2010 19:47:04 +0200 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201008151947.04963.hselasky@c2i.net> Cc: freebsd-gnats-submit@freebsd.org, Paul Thornton , ed@freebsd.org Subject: Re: usb/149675: uftdi doesn't react to break properly 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, 15 Aug 2010 17:50:44 -0000 On Sunday 15 August 2010 16:31:20 Paul Thornton wrote: > >Number: 149675 > >Category: usb > >Synopsis: uftdi doesn't react to break properly > >Confidential: no > >Severity: non-critical > >Priority: medium > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Sun Aug 15 14:40:00 UTC 2010 > >Closed-Date: > >Last-Modified: > >Originator: Paul Thornton > >Release: 8.1-RELEASE > >Organization: > > >Environment: > FreeBSD base01.local 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Sun Aug 15 > 09:38:55 UTC 2010 root@base01.local:/usr/src/sys/i386/compile/TEST2 > i386 > > The same issue is seen with GENERIC kernel > > >Description: > When setting the BRKINT and ~IGNBRK options on a handle where the > underlying hardware has an FTDI chipset driven by uftdi and ucom, the > break condition is not correctly acted upon. The underlying hardware is > an FTDI FT232BL chip. > > The expected behaviour is that the buffer be flushed on reception of a > break when BRKINT is used, however the driver appears to behave as if > BRKINT is clear, as an additional 0x00 byte is seen and the buffer isn't > flushed. > > FreeBSD 7.2 and 8.0 also exhibit the same behaviour. > > Using the same test program, and same USB hardware, Linux behaves as per > documentation and flushes the buffer on reception of the break when BRKINT > is set. > > >How-To-Repeat: > Connect two machines using ftdi-driven hardware. > > Send a break followed by some data A. Send another break, followed by some > data B. > > The correct response should be that on the receiver the buffer is flushed > by both breaks, and a read will only return the data B. > > What is likely to be read, however, is: 0x00 [A A A A A] 0x00 [B B B B B] > > The code I was using which brought this issue to light can be downloaded > from: http://www.prt.org/dmxrx2.c > Hi, I believe the following patch will fix your problem. Please apply and rebuild kernel / ucom module. --HPS --- sys/dev/usb/serial/usb_serial.c +++ sys/dev/usb/serial/usb_serial.c @@ -942,6 +942,7 @@ uint8_t new_msr; uint8_t new_lsr; uint8_t onoff; + uint8_t lsr_delta; tp = sc->sc_tty; @@ -965,6 +966,7 @@ return; } onoff = ((sc->sc_msr ^ new_msr) & SER_DCD); + lsr_delta = (sc->sc_lsr ^ new_lsr); sc->sc_msr = new_msr; sc->sc_lsr = new_lsr; @@ -977,6 +979,27 @@ ttydisc_modem(tp, onoff); } + + if ((lsr_delta & ULSR_BI) && (sc->sc_lsr & ULSR_BI)) { + + DPRINTF("BREAK detected\n"); + + ttydisc_rint(tp, 0, TRE_BREAK); + } + + if ((lsr_delta & ULSR_FE) && (sc->sc_lsr & ULSR_FE)) { + + DPRINTF("Frame error detected\n"); + + ttydisc_rint(tp, 0, TRE_FRAMING); + } + + if ((lsr_delta & ULSR_PE) && (sc->sc_lsr & ULSR_PE)) { + + DPRINTF("Parity error detected\n"); + + ttydisc_rint(tp, 0, TRE_PARITY); + } } void See USB P4 change ID 182430 for more details. http://p4web.freebsd.org/@@182430?ac=10 From owner-freebsd-usb@FreeBSD.ORG Sun Aug 15 17:57:56 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 75F4A1065696; Sun, 15 Aug 2010 17:57:56 +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 9CAFE8FC1B; Sun, 15 Aug 2010 17:57:55 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=uQlts9P3TFIiE3mXDKsOajf6rXzGvPXEyWzE93HpGms= c=1 sm=1 a=Rn8JuselT4EA:10 a=Q9fys5e9bTEA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=tmWW_1DqAAAA:8 a=6I5d2MoRAAAA:8 a=nHhWsbXdNbJA-kvMEs0A:9 a=yLOutfNCv6uX1wFAo88A:7 a=OvY7mHAooVaNE8wjdArDauSJ-pMA:4 a=PUjeQqilurYA: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 7897810; Sun, 15 Aug 2010 19:57:04 +0200 To: freebsd-usb@freebsd.org From: Hans Petter Selasky X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'( =?iso-8859-15?q?=3B=5FIjlA=3A=0A=09hGE=2E=2EEw?=, =?iso-8859-15?q?XAQ*o=23=5C/M=7ESC=3DS1-f9=7BEzRfT=27=7CHhll5Q=5Dha5Bt-s=7Co?= =?iso-8859-15?q?TlKMusi=3A1e=5BwJl=7Dkd=7DGR=0A=09Z0adGx-x=5F0zGbZj=27e?=(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' Date: Sun, 15 Aug 2010 19:54:17 +0200 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201008151954.17522.hselasky@c2i.net> Cc: freebsd-gnats-submit@freebsd.org, Paul Thornton , ed@freebsd.org Subject: Re: usb/149675: uftdi doesn't react to break properly 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, 15 Aug 2010 17:57:56 -0000 On Sunday 15 August 2010 16:31:20 Paul Thornton wrote: > >Number: 149675 > >Category: usb > >Synopsis: uftdi doesn't react to break properly > >Confidential: no > >Severity: non-critical > >Priority: medium > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Sun Aug 15 14:40:00 UTC 2010 > >Closed-Date: > >Last-Modified: > >Originator: Paul Thornton > >Release: 8.1-RELEASE > >Organization: > > >Environment: > FreeBSD base01.local 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Sun Aug 15 > 09:38:55 UTC 2010 root@base01.local:/usr/src/sys/i386/compile/TEST2 > i386 > > The same issue is seen with GENERIC kernel > > >Description: > When setting the BRKINT and ~IGNBRK options on a handle where the > underlying hardware has an FTDI chipset driven by uftdi and ucom, the > break condition is not correctly acted upon. The underlying hardware is > an FTDI FT232BL chip. > > The expected behaviour is that the buffer be flushed on reception of a > break when BRKINT is used, however the driver appears to behave as if > BRKINT is clear, as an additional 0x00 byte is seen and the buffer isn't > flushed. > > FreeBSD 7.2 and 8.0 also exhibit the same behaviour. > > Using the same test program, and same USB hardware, Linux behaves as per > documentation and flushes the buffer on reception of the break when BRKINT > is set. > > >How-To-Repeat: > Connect two machines using ftdi-driven hardware. > > Send a break followed by some data A. Send another break, followed by some > data B. > > The correct response should be that on the receiver the buffer is flushed > by both breaks, and a read will only return the data B. > > What is likely to be read, however, is: 0x00 [A A A A A] 0x00 [B B B B B] > > The code I was using which brought this issue to light can be downloaded > from: http://www.prt.org/dmxrx2.c > And this patch, which I'm not sure is needed. See USB P4 change ID 182431 for more details. http://p4web.freebsd.org/@@182431?ac=10 Ed, can you comment? --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Aug 15 18:00:13 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 746F21065693 for ; Sun, 15 Aug 2010 18:00:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4898E8FC0C for ; Sun, 15 Aug 2010 18:00:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7FI0Cn3016682 for ; Sun, 15 Aug 2010 18:00:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7FI0C5G016681; Sun, 15 Aug 2010 18:00:12 GMT (envelope-from gnats) Date: Sun, 15 Aug 2010 18:00:12 GMT Message-Id: <201008151800.o7FI0C5G016681@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/149675: uftdi doesn't react to break properly X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Aug 2010 18:00:13 -0000 The following reply was made to PR usb/149675; it has been noted by GNATS. From: Hans Petter Selasky To: freebsd-usb@freebsd.org Cc: Paul Thornton , freebsd-gnats-submit@freebsd.org, ed@freebsd.org Subject: Re: usb/149675: uftdi doesn't react to break properly Date: Sun, 15 Aug 2010 19:47:04 +0200 On Sunday 15 August 2010 16:31:20 Paul Thornton wrote: > >Number: 149675 > >Category: usb > >Synopsis: uftdi doesn't react to break properly > >Confidential: no > >Severity: non-critical > >Priority: medium > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Sun Aug 15 14:40:00 UTC 2010 > >Closed-Date: > >Last-Modified: > >Originator: Paul Thornton > >Release: 8.1-RELEASE > >Organization: > > >Environment: > FreeBSD base01.local 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Sun Aug 15 > 09:38:55 UTC 2010 root@base01.local:/usr/src/sys/i386/compile/TEST2 > i386 > > The same issue is seen with GENERIC kernel > > >Description: > When setting the BRKINT and ~IGNBRK options on a handle where the > underlying hardware has an FTDI chipset driven by uftdi and ucom, the > break condition is not correctly acted upon. The underlying hardware is > an FTDI FT232BL chip. > > The expected behaviour is that the buffer be flushed on reception of a > break when BRKINT is used, however the driver appears to behave as if > BRKINT is clear, as an additional 0x00 byte is seen and the buffer isn't > flushed. > > FreeBSD 7.2 and 8.0 also exhibit the same behaviour. > > Using the same test program, and same USB hardware, Linux behaves as per > documentation and flushes the buffer on reception of the break when BRKINT > is set. > > >How-To-Repeat: > Connect two machines using ftdi-driven hardware. > > Send a break followed by some data A. Send another break, followed by some > data B. > > The correct response should be that on the receiver the buffer is flushed > by both breaks, and a read will only return the data B. > > What is likely to be read, however, is: 0x00 [A A A A A] 0x00 [B B B B B] > > The code I was using which brought this issue to light can be downloaded > from: http://www.prt.org/dmxrx2.c > Hi, I believe the following patch will fix your problem. Please apply and rebuild kernel / ucom module. --HPS --- sys/dev/usb/serial/usb_serial.c +++ sys/dev/usb/serial/usb_serial.c @@ -942,6 +942,7 @@ uint8_t new_msr; uint8_t new_lsr; uint8_t onoff; + uint8_t lsr_delta; tp = sc->sc_tty; @@ -965,6 +966,7 @@ return; } onoff = ((sc->sc_msr ^ new_msr) & SER_DCD); + lsr_delta = (sc->sc_lsr ^ new_lsr); sc->sc_msr = new_msr; sc->sc_lsr = new_lsr; @@ -977,6 +979,27 @@ ttydisc_modem(tp, onoff); } + + if ((lsr_delta & ULSR_BI) && (sc->sc_lsr & ULSR_BI)) { + + DPRINTF("BREAK detected\n"); + + ttydisc_rint(tp, 0, TRE_BREAK); + } + + if ((lsr_delta & ULSR_FE) && (sc->sc_lsr & ULSR_FE)) { + + DPRINTF("Frame error detected\n"); + + ttydisc_rint(tp, 0, TRE_FRAMING); + } + + if ((lsr_delta & ULSR_PE) && (sc->sc_lsr & ULSR_PE)) { + + DPRINTF("Parity error detected\n"); + + ttydisc_rint(tp, 0, TRE_PARITY); + } } void See USB P4 change ID 182430 for more details. http://p4web.freebsd.org/@@182430?ac=10 From owner-freebsd-usb@FreeBSD.ORG Sun Aug 15 18:00:15 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C748D1065694 for ; Sun, 15 Aug 2010 18:00:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B61ED8FC08 for ; Sun, 15 Aug 2010 18:00:15 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7FI0F47016977 for ; Sun, 15 Aug 2010 18:00:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7FI0FBL016976; Sun, 15 Aug 2010 18:00:15 GMT (envelope-from gnats) Date: Sun, 15 Aug 2010 18:00:15 GMT Message-Id: <201008151800.o7FI0FBL016976@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/149675: uftdi doesn't react to break properly X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Aug 2010 18:00:15 -0000 The following reply was made to PR usb/149675; it has been noted by GNATS. From: Hans Petter Selasky To: freebsd-usb@freebsd.org Cc: Paul Thornton , freebsd-gnats-submit@freebsd.org, ed@freebsd.org Subject: Re: usb/149675: uftdi doesn't react to break properly Date: Sun, 15 Aug 2010 19:54:17 +0200 On Sunday 15 August 2010 16:31:20 Paul Thornton wrote: > >Number: 149675 > >Category: usb > >Synopsis: uftdi doesn't react to break properly > >Confidential: no > >Severity: non-critical > >Priority: medium > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Sun Aug 15 14:40:00 UTC 2010 > >Closed-Date: > >Last-Modified: > >Originator: Paul Thornton > >Release: 8.1-RELEASE > >Organization: > > >Environment: > FreeBSD base01.local 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Sun Aug 15 > 09:38:55 UTC 2010 root@base01.local:/usr/src/sys/i386/compile/TEST2 > i386 > > The same issue is seen with GENERIC kernel > > >Description: > When setting the BRKINT and ~IGNBRK options on a handle where the > underlying hardware has an FTDI chipset driven by uftdi and ucom, the > break condition is not correctly acted upon. The underlying hardware is > an FTDI FT232BL chip. > > The expected behaviour is that the buffer be flushed on reception of a > break when BRKINT is used, however the driver appears to behave as if > BRKINT is clear, as an additional 0x00 byte is seen and the buffer isn't > flushed. > > FreeBSD 7.2 and 8.0 also exhibit the same behaviour. > > Using the same test program, and same USB hardware, Linux behaves as per > documentation and flushes the buffer on reception of the break when BRKINT > is set. > > >How-To-Repeat: > Connect two machines using ftdi-driven hardware. > > Send a break followed by some data A. Send another break, followed by some > data B. > > The correct response should be that on the receiver the buffer is flushed > by both breaks, and a read will only return the data B. > > What is likely to be read, however, is: 0x00 [A A A A A] 0x00 [B B B B B] > > The code I was using which brought this issue to light can be downloaded > from: http://www.prt.org/dmxrx2.c > And this patch, which I'm not sure is needed. See USB P4 change ID 182431 for more details. http://p4web.freebsd.org/@@182431?ac=10 Ed, can you comment? --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Aug 15 19:15:38 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 26EA61065679; Sun, 15 Aug 2010 19:15:38 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id 4768F8FC16; Sun, 15 Aug 2010 19:15:36 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=p0DJaE8zavVXm5tqcSh7H4n2mR2d5Wi7j6pzZ51DRjI= c=1 sm=1 a=Rn8JuselT4EA:10 a=Q9fys5e9bTEA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=0QFnHyNPTXTjMwmHCNMA:9 a=t39PNl2PBzP8FLLodtMA:7 a=u6dOHVXBfkWEXian8rJrNZw4Ci0A:4 a=PUjeQqilurYA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:117 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 7013817; Sun, 15 Aug 2010 21:14:51 +0200 From: Hans Petter Selasky To: Paul Thornton Date: Sun, 15 Aug 2010 21:11:59 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <201008151947.04963.hselasky@c2i.net> <4C6838A8.6040907@prt.org> In-Reply-To: <4C6838A8.6040907@prt.org> 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-15" Content-Transfer-Encoding: 7bit Message-Id: <201008152111.59671.hselasky@c2i.net> Cc: freebsd-gnats-submit@freebsd.org, ed@freebsd.org, freebsd-usb@freebsd.org Subject: Re: usb/149675: uftdi doesn't react to break properly 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, 15 Aug 2010 19:15:38 -0000 On Sunday 15 August 2010 20:57:44 Paul Thornton wrote: > Hi, > > Hans Petter Selasky wrote: > > I believe the following patch will fix your problem. Please apply and > > rebuild kernel / ucom module. > > That has made a dramatic difference - things now look much better. > Thank you very much for that. > > I'm still seeing a slight problem though. In my test setup, I have a PC > (Windows but that shouldn't matter!) running an appplication which > transmits a break followed by the 513 data bytes - and this repeats > continually at near line-rate at 250kbaud. > > Pre-patching, FreeBSD was unable to keep data byte 1 in location 1 at > all - it appeared randomly wherever it happened to be due to the lack of > break clearing the input buffer, and as the data dump of the buffer > refreshed, the values moved around as the breaks were turning up as datab. > > After I've applied the patch, it starts off well - data byte 1 is in > location 1, but every 5-10 seconds there is a shift by a byte suggesting > that an extra byte has been received. Is there any way that a break > could still be creeping in to the data stream periodically? > > Under Linux, the code runs properly and there is no movement of the data > bytes, so I'm reasonably confident that it isn't a bug of mine. > > Paul. I guess you will have to turn on ucom and uftdi debugging knobs under hw.usb.xxx to figure that out. USB is just forwarding what it gets from the hardware. --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Aug 15 19:20:02 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E173610656A6 for ; Sun, 15 Aug 2010 19:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D0BB58FC15 for ; Sun, 15 Aug 2010 19:20:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7FJK29v094174 for ; Sun, 15 Aug 2010 19:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7FJK2qA094173; Sun, 15 Aug 2010 19:20:02 GMT (envelope-from gnats) Date: Sun, 15 Aug 2010 19:20:02 GMT Message-Id: <201008151920.o7FJK2qA094173@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/149675: uftdi doesn't react to break properly X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Aug 2010 19:20:03 -0000 The following reply was made to PR usb/149675; it has been noted by GNATS. From: Hans Petter Selasky To: Paul Thornton Cc: freebsd-usb@freebsd.org, freebsd-gnats-submit@freebsd.org, ed@freebsd.org Subject: Re: usb/149675: uftdi doesn't react to break properly Date: Sun, 15 Aug 2010 21:11:59 +0200 On Sunday 15 August 2010 20:57:44 Paul Thornton wrote: > Hi, > > Hans Petter Selasky wrote: > > I believe the following patch will fix your problem. Please apply and > > rebuild kernel / ucom module. > > That has made a dramatic difference - things now look much better. > Thank you very much for that. > > I'm still seeing a slight problem though. In my test setup, I have a PC > (Windows but that shouldn't matter!) running an appplication which > transmits a break followed by the 513 data bytes - and this repeats > continually at near line-rate at 250kbaud. > > Pre-patching, FreeBSD was unable to keep data byte 1 in location 1 at > all - it appeared randomly wherever it happened to be due to the lack of > break clearing the input buffer, and as the data dump of the buffer > refreshed, the values moved around as the breaks were turning up as datab. > > After I've applied the patch, it starts off well - data byte 1 is in > location 1, but every 5-10 seconds there is a shift by a byte suggesting > that an extra byte has been received. Is there any way that a break > could still be creeping in to the data stream periodically? > > Under Linux, the code runs properly and there is no movement of the data > bytes, so I'm reasonably confident that it isn't a bug of mine. > > Paul. I guess you will have to turn on ucom and uftdi debugging knobs under hw.usb.xxx to figure that out. USB is just forwarding what it gets from the hardware. --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Aug 15 19:31:48 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 BF5761065674; Sun, 15 Aug 2010 19:31:48 +0000 (UTC) (envelope-from prt@prt.org) Received: from smtp5.uk.umis.net (smtp5.uk.umis.net [217.65.166.40]) by mx1.freebsd.org (Postfix) with ESMTP id 86C7C8FC13; Sun, 15 Aug 2010 19:31:48 +0000 (UTC) Received: from kate.prtsystems.ltd.uk ([217.65.165.35]) by smtp5.uk.umis.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1OkiOu-000F3v-Tt; Sun, 15 Aug 2010 18:57:44 +0000 Message-ID: <4C6838A8.6040907@prt.org> Date: Sun, 15 Aug 2010 19:57:44 +0100 From: Paul Thornton User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Hans Petter Selasky References: <201008151947.04963.hselasky@c2i.net> In-Reply-To: <201008151947.04963.hselasky@c2i.net> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: freebsd-gnats-submit@freebsd.org, ed@freebsd.org, freebsd-usb@freebsd.org Subject: Re: usb/149675: uftdi doesn't react to break properly 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, 15 Aug 2010 19:31:48 -0000 Hi, Hans Petter Selasky wrote: > I believe the following patch will fix your problem. Please apply and rebuild > kernel / ucom module. That has made a dramatic difference - things now look much better. Thank you very much for that. I'm still seeing a slight problem though. In my test setup, I have a PC (Windows but that shouldn't matter!) running an appplication which transmits a break followed by the 513 data bytes - and this repeats continually at near line-rate at 250kbaud. Pre-patching, FreeBSD was unable to keep data byte 1 in location 1 at all - it appeared randomly wherever it happened to be due to the lack of break clearing the input buffer, and as the data dump of the buffer refreshed, the values moved around as the breaks were turning up as datab. After I've applied the patch, it starts off well - data byte 1 is in location 1, but every 5-10 seconds there is a shift by a byte suggesting that an extra byte has been received. Is there any way that a break could still be creeping in to the data stream periodically? Under Linux, the code runs properly and there is no movement of the data bytes, so I'm reasonably confident that it isn't a bug of mine. Paul. From owner-freebsd-usb@FreeBSD.ORG Sun Aug 15 19:40:03 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 396C310656BC for ; Sun, 15 Aug 2010 19:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 083E78FC0A for ; Sun, 15 Aug 2010 19:40:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7FJe2BD014229 for ; Sun, 15 Aug 2010 19:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7FJe2X4014228; Sun, 15 Aug 2010 19:40:02 GMT (envelope-from gnats) Date: Sun, 15 Aug 2010 19:40:02 GMT Message-Id: <201008151940.o7FJe2X4014228@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Paul Thornton Cc: Subject: Re: usb/149675: uftdi doesn't react to break properly X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Thornton List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Aug 2010 19:40:03 -0000 The following reply was made to PR usb/149675; it has been noted by GNATS. From: Paul Thornton To: Hans Petter Selasky Cc: freebsd-usb@freebsd.org, freebsd-gnats-submit@freebsd.org, ed@freebsd.org Subject: Re: usb/149675: uftdi doesn't react to break properly Date: Sun, 15 Aug 2010 19:57:44 +0100 Hi, Hans Petter Selasky wrote: > I believe the following patch will fix your problem. Please apply and rebuild > kernel / ucom module. That has made a dramatic difference - things now look much better. Thank you very much for that. I'm still seeing a slight problem though. In my test setup, I have a PC (Windows but that shouldn't matter!) running an appplication which transmits a break followed by the 513 data bytes - and this repeats continually at near line-rate at 250kbaud. Pre-patching, FreeBSD was unable to keep data byte 1 in location 1 at all - it appeared randomly wherever it happened to be due to the lack of break clearing the input buffer, and as the data dump of the buffer refreshed, the values moved around as the breaks were turning up as datab. After I've applied the patch, it starts off well - data byte 1 is in location 1, but every 5-10 seconds there is a shift by a byte suggesting that an extra byte has been received. Is there any way that a break could still be creeping in to the data stream periodically? Under Linux, the code runs properly and there is no movement of the data bytes, so I'm reasonably confident that it isn't a bug of mine. Paul. From owner-freebsd-usb@FreeBSD.ORG Mon Aug 16 00:09:25 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 845381065674; Mon, 16 Aug 2010 00:09:25 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (unknown [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 0B5868FC19; Mon, 16 Aug 2010 00:09:25 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 723BE2A28D3B; Mon, 16 Aug 2010 02:09:24 +0200 (CEST) Date: Mon, 16 Aug 2010 02:09:24 +0200 From: Ed Schouten To: Hans Petter Selasky Message-ID: <20100816000924.GS2978@hoeg.nl> References: <20100815160240.GR2978@hoeg.nl> <201008151954.17522.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PY8tzLeNxmyMVNR3" Content-Disposition: inline In-Reply-To: <201008151954.17522.hselasky@c2i.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-gnats-submit@freebsd.org, Paul Thornton , freebsd-usb@freebsd.org Subject: Re: usb/149675: uftdi doesn't react to break properly 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: Mon, 16 Aug 2010 00:09:25 -0000 --PY8tzLeNxmyMVNR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Hans Petter Selasky wrote: > And this patch, which I'm not sure is needed. >=20 > See USB P4 change ID 182431 for more details. >=20 > http://p4web.freebsd.org/@@182431?ac=3D10 >=20 > Ed, can you comment? Both patches look good! --=20 Ed Schouten WWW: http://80386.nl/ --PY8tzLeNxmyMVNR3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkxogbQACgkQ52SDGA2eCwVsQACfUXGH8krzk6oBZIJw+kcoUXXE iEEAni8hMmlWZ7eOGwVN0G+yGqzqfx+o =WpY0 -----END PGP SIGNATURE----- --PY8tzLeNxmyMVNR3-- From owner-freebsd-usb@FreeBSD.ORG Mon Aug 16 00:10:05 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 490E010656C7 for ; Mon, 16 Aug 2010 00:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 328768FC1A for ; Mon, 16 Aug 2010 00:10:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7G0A5kW077282 for ; Mon, 16 Aug 2010 00:10:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7G0A5A7077281; Mon, 16 Aug 2010 00:10:05 GMT (envelope-from gnats) Date: Mon, 16 Aug 2010 00:10:05 GMT Message-Id: <201008160010.o7G0A5A7077281@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Ed Schouten Cc: Subject: Re: usb/149675: uftdi doesn't react to break properly X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ed Schouten List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2010 00:10:05 -0000 The following reply was made to PR usb/149675; it has been noted by GNATS. From: Ed Schouten To: Hans Petter Selasky Cc: freebsd-usb@freebsd.org, Paul Thornton , freebsd-gnats-submit@freebsd.org Subject: Re: usb/149675: uftdi doesn't react to break properly Date: Mon, 16 Aug 2010 02:09:24 +0200 --PY8tzLeNxmyMVNR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Hans Petter Selasky wrote: > And this patch, which I'm not sure is needed. >=20 > See USB P4 change ID 182431 for more details. >=20 > http://p4web.freebsd.org/@@182431?ac=3D10 >=20 > Ed, can you comment? Both patches look good! --=20 Ed Schouten WWW: http://80386.nl/ --PY8tzLeNxmyMVNR3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkxogbQACgkQ52SDGA2eCwVsQACfUXGH8krzk6oBZIJw+kcoUXXE iEEAni8hMmlWZ7eOGwVN0G+yGqzqfx+o =WpY0 -----END PGP SIGNATURE----- --PY8tzLeNxmyMVNR3-- From owner-freebsd-usb@FreeBSD.ORG Mon Aug 16 11:07:11 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 3B5671065694 for ; Mon, 16 Aug 2010 11:07:11 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2884A8FC28 for ; Mon, 16 Aug 2010 11:07:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7GB7Btc059045 for ; Mon, 16 Aug 2010 11:07:11 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7GB7ALl059043 for freebsd-usb@FreeBSD.org; Mon, 16 Aug 2010 11:07:10 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 16 Aug 2010 11:07:10 GMT Message-Id: <201008161107.o7GB7ALl059043@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-usb@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-usb@FreeBSD.org 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: Mon, 16 Aug 2010 11:07:11 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o usb/149675 usb uftdi doesn't react to break properly o usb/149528 usb Wireless USB stick not detected - vendor id 0x083a dev o usb/149283 usb [uftdi] avrdude unable to talk to Arduino board (via u o usb/149162 usb ASUS WL-167g doesn't work in 8.1 (continue of 149058) o usb/149039 usb [uhso] Binding problem with uhso s usb/148702 usb [usb8] [request] IO DATA USB-RSAQ5 support on FreeBSD- o usb/148080 usb usbconfig(8) sometimes does not turn off the device o usb/147516 usb [umass] [usb67] kernel unable to deal with Olympus USB o usb/146871 usb [usbdevs] [usb8] [patch] provide descriprive string fo o usb/146840 usb [hang] FreeBSD 7.2 / 7.3 / 8.0 hang at startup after e o usb/146153 usb [axe] [usb8] Hosts in network doesn't receive any pack o usb/146054 usb [urtw] [usb8] urtw driver potentially out of date f usb/145513 usb [usb8] New USB stack: no new devices after forced usb o usb/145455 usb [usb8] [patch] USB debug support cannot be disabled o usb/145415 usb [umass] [usb8] USB card reader does not create slices a usb/145184 usb GENERIC can't mount root from USB on Asus EEE o usb/145165 usb [keyboard] [usb8] ukbd_set_leds_callback: error=USB_ER f kern/144938 usb [keyboard] [boot] Boot Failure with Apple (MB869LL/A) o usb/144387 usb [run] [panic] if_run panic o usb/144043 usb [umass] [usb8] USB DLT tape drive throws random errors o usb/143790 usb [boot] can not boot from usb hdd f usb/143620 usb [cdce] [usb8] the module if_cdce doesn't support my Op f usb/143294 usb [usb8] copying process stops at some time (10 - 50 sec o usb/143286 usb [ukbd] [usb8] [boot] boot failures on RELENG_8 system f usb/143186 usb [usbdevs] [usb8] [patch] add USB device IDs for Google a usb/143139 usb [umass] [usb8] [patch] Quirk for Century EX35SW4_SB4 J o usb/143045 usb [umass] [usb8] [patch] mounting Fujitsu 2600Z camera d o usb/142991 usb [uftdi] [usb67] [patch] Patch to add Crystalfontz 533 f usb/142989 usb [usb8] canon eos 50D attaches but detaches after few s f usb/142957 usb [umass] [usb8] [patch] patch for USB disk SYNCHRONIZE o usb/142719 usb [urtw] [usb8] AirLive WL-1600USB (RTL8187L chipset) fa o usb/142713 usb [usb67] [panic] Kernel Panik when connecting an IPhone f usb/142276 usb [umass] [usb8] Cache Synchronization Error with Olympu o usb/142229 usb [ums] [usb8] [hang] connecting a USB mouse to a Dell P o usb/141680 usb [uath] [usb8] Netgear WG111T not working with uath dri o usb/141664 usb [pcm] [usb8] Logitech USB microphone failure [regressi o usb/141474 usb [boot] [usb8] FreeBSD 8.0 can not install from USB CDR o usb/141327 usb [ukbd] [usb67] USB kbd not working with 7.1+PAE on IBM o usb/141212 usb [ukbd] [usb8] ukbd_set_leds_callback:700: error=USB_ER o kern/141011 usb [usb] Encrypted root, geli password at boot; enter key o usb/140920 usb [install] [usb8] USB based install fails on 8.0-RELEAS o usb/140893 usb [urtw] [usb8] WPA2 not working on rtl8187b f usb/140883 usb [axe] [usb8] USB gigabit ethernet hangs after short pe o kern/140849 usb [ums] [usb8] USB mouse doesn't work under FreeBSD 8.0- a usb/140810 usb [uftdi] [usb8] 8.X copy and paste problem / tty overfl o kern/140614 usb [uplcom] [patch] adding support for Radio Shack Gigwar o usb/140477 usb [umass] [usb8] [patch] allow boot-time attachment of d o usb/140236 usb [msdosfs] [usb8] Labels wiped on external Journaled US o usb/140160 usb [usb8] [acpi] USB ports are no longer "active" after A s usb/139990 usb [panic] [patch] [usb67] Kernel frequently panics after a usb/139598 usb [umass] [usb8] CAM reports "xptioctl: put "device pass o usb/139243 usb [uhci] [usb67] unplug prolific USB serial -> uhci_abor a usb/138904 usb [rum] [panic] [usb67] unpluging USB wifi card panics s f usb/138882 usb [ohci] [panic] [usb67] Can't install FreeBSD 7.2 due t o usb/138798 usb [boot] [usb8] 8.0-BETA4 can't boot from USB flash driv o usb/138659 usb [usb8][uftdi] driver broken in RELENG_8/CURRENT o usb/138570 usb [usb] [panic] USB mass device panics current 7.2-STABL o usb/138548 usb [usb67] [usb8] usb devices periodically have unknown a o usb/138175 usb [usb67] [boot] System cannot boot, when USB reader wit o usb/138124 usb [snd_uaudio] [usb8] Axed uaudio functionality in the u o usb/138119 usb [usb67] [usb8] MultiBay CDROM (probably on USB bus) is o usb/137872 usb [usb67] [boot] slow booting on usb flash drive o usb/137806 usb [ukbd] [usb67] USB keyboard doesn't work until it's un o usb/137763 usb [usb67][ukbd] Logitech wireless keyboard media keys no o usb/137377 usb [usb8] request support for Huawei E180 o usb/137341 usb [usb8][rum] driver if_rum doesn't work at all and thro f usb/137190 usb [usb8][patch] inhibit spurious button releases for som o usb/137189 usb [usb8][patch] create and use sysctl nodes for HID repo p usb/137188 usb [usb8][patch] correctly handle USB report descriptors o usb/137129 usb [ums] [usb8] SteelSeries Ikari USB laser mouse not att p usb/136761 usb [usbdevs][usb67][patch] Teach usbdevs / u3g(4) about H o usb/135938 usb [aue] [usb67] aue driver only passes traffic in promis o usb/135542 usb [keyboard] boot loader does not work with a usb keyboa o usb/135348 usb [umass] [patch] USB Drive Hangs with ZFS (JMicron USB2 o usb/135206 usb machine reboots when inserted USB device o usb/135200 usb SAMSUNG i740 usb mass: Synchronize cache failed, statu o usb/135182 usb UMASS quirk - Olympus FE20 camera o usb/134950 usb Lowering DTR for USB-modem via ubsa is not possible o usb/134299 usb Kernel Panic plugging in MF626 USB UMTS Stick u3g o usb/134193 usb System freeze on usb MP3 player insertion o usb/134085 usb [umass] Adding usb quirk for Sony USB flash drive o usb/133989 usb [usb8] [ukbd] USB keyboard dead at mountroot> prompt o usb/133712 usb [ural] [patch] RE: Fixed an issue with ural(4) that wa o usb/133390 usb umass crashes system in 7.1 when Olympus D-540 attache o usb/133296 usb [rum] driver not working properly in hostap mode o usb/132594 usb USB subsystem causes page fault and crashes o usb/132312 usb [hang] Xorg 7.4 halts USB controller o usb/132080 usb [patch] [usb] [rum] Kernel panic after NOMEM caused by o usb/132066 usb [ukbd] Keyboard failure USB keyboard DELL 760 o usb/132036 usb [panic] page fault when connecting Olympus C740 camera o usb/131583 usb [umass] Failure when detaching umass Device o usb/131576 usb [aue] ADMtek USB To LAN Converter can't send data o usb/131521 usb Registering Belkin UPS to usb_quirks.c p usb/131123 usb [patch] [usb67] re-add UQ_ASSUME_CM_OVER_DATA USB quir o usb/131074 usb no run-time detection of usb devices plugged into exte o usb/130736 usb Page fault unplugging USB stick o usb/130230 usb Samsung Electronics YP-U3 does not attach in 7.1-RELEA o usb/130208 usb Boot process severely hampered by umass0 error o usb/130122 usb [usb8] DVD drive detects as 'da' device o usb/129766 usb [usb] plugging in usb modem HUAWEI E226 panics system o usb/129673 usb [uhci] uhci (uhub) confused on replugging USB 1.1 scan o usb/129500 usb [umass] [panic] FreeBSD Crashes when connecting SanDis o usb/129311 usb [usb] [panic] Instant crash with an USB card reader s usb/128990 usb [usb] u3g does not handle RTS/CTS available on for exa o usb/128977 usb [usb67] [patch] uaudio is not full duplex p usb/128803 usb [usbdevs] [patch] Quirk for I-Tuner Networks USBLCD4X2 o usb/128485 usb [umodem] [patch] Nokia N80 modem support o usb/128425 usb [umass] Cannot Connect Maxtor Onetouch 4 USB drive o usb/128418 usb [panic] [rum] loading if_rum causes panic, looks like p usb/127980 usb [umass] [patch] [usb67] Fix Samsung YP U2 MP3 player o o usb/127926 usb [boot] USB Timeout during bootup p usb/127549 usb [umass] [usb67] [patch] Meizu MiniPlayer M6 (SL) requi s usb/127453 usb [request] ubsa, uark, ubser, uftdi, and friends should p docs/127406 usb [patch] update umodem man page: Sony Ericsson W810i o usb/127342 usb [boot] [panic] enabling usb keyboard and mouse support o usb/127248 usb [ucom] panic while uplcom devices attach and detach o usb/127222 usb [ohci] Regression in 7.0 usb storage generic driver o usb/126884 usb [ugen] [patch] Bug in buffer handling in ugen.c o usb/126848 usb [usb]: USB Keyboard hangs during Installation o usb/126740 usb [ulpt] doesn't work on 7.0-RELEASE, 10 second stall be o usb/126519 usb [usb] [panic] panic when plugging in an iphone o kern/126396 usb [panic] kernel panic after unplug USB Bluetooth device o usb/125736 usb [ukbd] [hang] system hangs after AT keyboard detect if o usb/125631 usb [ums] [panic] kernel panic during bootup while 'Logite o usb/125510 usb [panic] repeated plug and unplug of USB mass storage d o usb/125450 usb [panic] Removing USB flash card while being accessed c o usb/125238 usb [ums] Habu Mouse turns off in X o usb/125088 usb [keyboard] Touchpad not detected on Adesso AKB-430UG U o usb/124980 usb [panic] kernel panic on detaching unmounted umass devi o kern/124777 usb [ucom] USB cua devices don't revert to tty devices whe o usb/124758 usb [rum] [panic] rum panics SMP kernel o usb/124708 usb [panic] Kernel panic on USB KVM reattach f usb/124604 usb [ums] Microsoft combo wireless mouse doesn't work o kern/124130 usb [usb] gmirror fails to start usb devices that were pre o usb/123969 usb [usb] Supermicro H8SMi-2 usb problem: port reset faile o usb/123714 usb [usb] [panic] Panic when hald-storage-probe runs with o usb/123691 usb usbd(8): usbd hangs o usb/123690 usb [usb] [panic] Panic on USB device insertion when usb l o usb/123611 usb [usb] BBB reset failed, STALLED from Imation/Mitsumi U o usb/123509 usb [umass] continuous reset Samsung SGH-G600 phone o usb/122992 usb [umass] [patch] MotoROKR Z6 Phone not recognised by um o usb/122936 usb [ucom] [ubsa] Device does not receive interrupt o usb/122905 usb [ubsa] [patch] add Huawei E220 to ubsa o usb/122819 usb [usb] [patch] Patch to provide dynamic additions to th o usb/122813 usb [udbp] [request] udbp driver should be removed in favo o usb/122547 usb [ehci] USB Printer not being recognized after reboot o usb/122539 usb [ohci] [panic] AnyDATA ADU-E1000D - kernel panic: ohci o usb/122483 usb [panic] [ulpt] Repeatable panic in 7.0-STABLE o usb/122119 usb [umass] umass device causes creation of daX but not da o usb/121755 usb [ohci] [patch] Fix panic after ohci/uhub cardbus devic o usb/121734 usb [ugen] ugen HP1022 printer device not working since up o usb/121708 usb [keyboard] nforce 650i mobo w/ usb keyboard infinite k o usb/121474 usb [cam] [patch] QUIRK: SAMSUNG HM250JI in LaCie usb hard o usb/121275 usb [boot] [panic] FreeBSD fails to boot with usb legacy s o usb/121232 usb [usb] [panic] USB CardBus card removal causes reboot s p usb/121184 usb [uipaq] [patch] add ids from linux ipaq driver (plus a o usb/121169 usb [umass] Issues with usb mp3 player o usb/121045 usb [uftdi] [patch] Add support for PC-OP-RS1 and KURO-RS o usb/120786 usb [usb] [panic] Kernel panic when forced umount of a det o usb/120729 usb [panic] fault while in kernel mode with connecting USB o usb/120572 usb [umass] [patch] quirk to support ASUS P535 as umass (a o usb/120321 usb [hang] System hangs when transferring data to WD MyBoo o usb/120283 usb [panic] Automation reboot with wireless keyboard & mou o usb/120034 usb [hang] 6.2 & 6.3 hangs on boot at usb0: OHCI with 1.5 o usb/119981 usb [axe] [patch] add support for LOGITEC LAN-GTJ/U2 gigab o usb/119977 usb [ums] Mouse does not work in a Cherry-USB keyboard/mou o usb/119653 usb [cam] [patch] iriver s7 player sync cache error patch o usb/119633 usb [umass] umass0: BBB reset failed, IOERROR [regression] o usb/119513 usb [irq] inserting dlink dwl-g630 wireless card results i o usb/119509 usb [usb] USB flaky on Dell Optiplex 755 o usb/119481 usb [hang] FreeBSD not responding after connecting USB-Mas o usb/119389 usb [umass] Sony DSC-W1 CBI reset failed, STALLED [regress o usb/119227 usb [ubsa] [patch] ubsa buffer is too small; should be tun o usb/119201 usb [cam] [patch] Quirks for Olympus FE-210 camera, LG and o usb/118480 usb [umass] Timeout in USB mass storage freezes vfs layer o usb/118353 usb [panic] [ppp] repeatable kernel panic during ppp(4) se o usb/118141 usb [ucom] usb serial and nokia phones ucomreadcb ucomread o usb/118140 usb [ucom] [patch] quick hack for ucom to get it behave wi o usb/118098 usb [umass] 6th gen iPod causes problems when disconnectin o usb/117955 usb [umass] [panic] inserting minolta dimage a2 crashes OS o usb/117946 usb [panic] D-Link DUB-E100 rev. B1 crashes FreeBSD 7.0-BE o usb/117938 usb [ums] [patch] Adding support for MS WL Natural and MS o usb/117911 usb [ums] [request] Mouse Gembird MUSWC not work o usb/117893 usb [umass] Lacie USB DVD writing failing o usb/117613 usb [uhci] [irq] uhci interrupt storm & USB leaked memory o usb/117598 usb [snd_uaudio] [patch] Not possible to record with Plant o usb/117313 usb [umass] [panic] panic on usb camera insertion o usb/117200 usb [ugen] ugen0 prints strange string on attach if detach o usb/117183 usb [panic] USB/fusefs -- panic while transferring large a o usb/116947 usb [ukbd] [patch] [regression] enable boot protocol on th o usb/116699 usb [usbhid] USB HID devices do not initialize at system b o usb/116561 usb [umodem] [panic] RELENG_6 umodem panic "trying to slee o usb/116282 usb [ulpt] Cannot print on USB HP LJ1018 or LJ1300 o usb/115935 usb [usbdevs] [patch] kernel counterproductively attaches o usb/115933 usb [uftdi] [patch] RATOC REX-USB60F (usb serial converter o usb/115400 usb [ehci] Problem with EHCI on ASUS M2N4-SLI o usb/115298 usb [ulpt] [panic] Turning off USB printer panics kernel o usb/114916 usb [umass] [patch] USB Maxtor drive (L300RO) requires qui o kern/114780 usb [uplcom] [panic] Panics while stress testing the uplco o usb/114682 usb [umass] generic USB media-card reader unusable o usb/114310 usb [libusb] [patch] [panic] USB hub attachment panics ker o usb/114068 usb [usb67] [usb8] [umass] [patch] Problem with connection o conf/114013 usb [patch] WITHOUT_USB allow to compil a lot of USB stuff o usb/113060 usb [usb67] [ulpt] [patch] Samsung printer not working in o usb/110856 usb [usb67] [ugen] [patch] interrupt in msgs are truncated s usb/108344 usb [usb67] [atausb] [panic] kernel with atausb panics whe o usb/107827 usb [usb67] [ohci] [panic] ohci_add_done addr not found o usb/107388 usb [usb67] [usb8] [new driver] [patch] add utoppy device o usb/106041 usb [usb67] [usb8] [request] FreeBSD does not recognise Mu o usb/105361 usb [usb67] [panic] Kernel panic during unmounting mass st s usb/103917 usb [usb67] [uhub] USB driver reports "Addr 0 should never o usb/103418 usb [usb67] [usb8] [patch] [request] usbhidctl(8) add abil o usb/103046 usb [usb67] [ulpt] [patch] ulpt event driven I/O with sele o usb/101775 usb [usb67] [usb8] [libusbhid] [patch] possible error in r o usb/101761 usb [usb67] [patch] [request] usb.h: increase maximal size o usb/100746 usb [usb67] [ukbd] system does not boot due to USB keyboar o usb/99538 usb [keyboard] while using USB keyboard default params of o usb/99431 usb [keyboard] FreeBSD on MSI 6566E (Intel 845E motherboar o kern/99200 usb [bluetooth] SMP-Kernel crashes reliably when Bluetooth o usb/98343 usb [boot] BBB reset failed errors with Creative Muvo MP3 o usb/97472 usb [cam] [patch] add support for Olympus C150,D390 s usb/97286 usb [mouse] [request] MS Wireless Intellimouse Explorer 2. o usb/97175 usb [umass] [hang] USB cardreader hangs system o usb/96457 usb [umass] [panic] fatback on umass = reboot o usb/96381 usb [cam] [patch] add a quirk table entry for a flash ram o usb/96224 usb [usb] [msdosfs] mount_msdosfs cause page fault in sync s usb/96120 usb [ums] [request] USB mouse not always detected s usb/95636 usb [umass] [boot] 5 minute delay at boot when using VT620 o usb/95562 usb [umass] Write Stress in USB Mass drive causes "vinvalb s usb/95348 usb [keyboard] USB keyboard unplug causes noise on screen o usb/95037 usb [umass] USB disk not recognized on hot-plug. o usb/94897 usb [panic] Kernel Panic when cleanly unmounting USB disk o usb/94717 usb [ulpt] Reading from /dev/ulpt can break work of a UHCI o usb/94384 usb [panic] kernel panic with usb2 hardware o usb/93872 usb [cam] [patch] SCSI quirk required for ELTA 8061 OL USB o usb/93828 usb [ohci] [panic] ohci causes panic on boot (HP Pavillion o usb/93389 usb [umass] [patch] Digital Camera Pentax S60 don't work o usb/92852 usb [ums] [patch] Vertical scroll not working properly on o usb/92171 usb [panic] panic unplugging Vodafone Mobile Connect (UMTS o usb/92142 usb [uhub] SET_ADDR_FAILED and SHORT_XFER errors from usb o usb/92083 usb [ural] [panic] panic using WPA on ural NIC in 6.0-RELE o usb/92052 usb [ulpt] usbd causes defunct process with busy file-hand o usb/91906 usb [ehci] [hang] FreeBSD hangs while booting with USB leg o usb/91896 usb camcontrol(8): Serial Number of USB Memory Sticks is n o usb/91811 usb [umass] Compact Flash in HP Photosmart 2610 return " o usb/91546 usb [umodem] [patch] Nokia 6630 mobile phone does not work o usb/91538 usb [ulpt] [patch] Unable to print to EPSON CX3500 o usb/91283 usb [boot] [regression] booting very slow with usb devices o usb/91238 usb [umass] USB tape unit fails to write a second tape fil o usb/90700 usb [umass] [panic] Kernel panic on connect/mount/use umas o usb/89954 usb [umass] [panic] USB Disk driver race condition? s usb/89003 usb [request] LaCie Firewire drive not properly supported o usb/88743 usb [hang] [regression] USB makes kernel hang at boot (reg o usb/88408 usb [axe] axe0 read PHY failed o usb/87648 usb [mouse] Logitech USB-optical mouse problem. o usb/87224 usb [usb] Cannot mount USB Zip750 o usb/86767 usb [umass] [patch] bogus "slice starts beyond end of the o usb/86298 usb [mouse] Known good USB mouse won't work with correct s s usb/85067 usb [uscanner] Cannot attach ScanJet 4300C to usb device s usb/84336 usb [usb] [reboot] instant system reboot when unmounting a o usb/83977 usb [ucom] [panic] ucom1: open bulk out error (addr 2): IN o usb/83863 usb [ugen] Communication problem between opensc/openct via o usb/83756 usb [ums] [patch] Microsoft Intellimouse Explorer 4.0A doe o usb/83563 usb [umass] [panic] Page Fault while detaching Mpman Usb d o usb/83504 usb [kernel] [patch] SpeedTouch USB stop working on recent o usb/82660 usb [ehci] [panic] EHCI: I/O stuck in state 'physrd'/panic s usb/82569 usb [umass] [panic] USB mass storage plug/unplug causes sy o usb/82520 usb [udbp] [reboot] Reboot when USL101 connected o usb/82350 usb [ucom] [panic] null pointer dereference in USB stack o usb/81621 usb [ehci] [hang] external hd hangs under load on ehci o usb/80935 usb [uvisor] [patch] uvisor.c is not work with CLIE TH55. o usb/80854 usb [patch] [request] suggestion for new iface-no-probe me s usb/80777 usb [request] usb_rem_task() should wait for callback to c s usb/80776 usb [udav] [request] UDAV device driver shouldn't use usb_ o usb/80774 usb [patch] have "usbd_find_desc" in line with the other " f usb/80361 usb [umass] [patch] mounting of Dell usb-stick fails f usb/80040 usb [sound] [hang] Use of sound mixer causes system freeze o usb/79723 usb [usb] [request] prepare for high speed isochronous tra o usb/78984 usb [umass] [patch] Creative MUVO umass failure f usb/77294 usb [ucom] [panic] ucom + ulpcom panic o usb/76732 usb [ums] Mouse problems with USB KVM Switch o usb/76653 usb [umass] [patch] Problem with Asahi Optical usb device o usb/76461 usb [umass] disklabel of umass(4)-CAM(4)-da(4) not used by f usb/76395 usb [uhci] USB printer does not work, usbdevs says "addr 0 s usb/75928 usb [umass] [request] Cytronix SmartMedia card (SMC) reade o usb/75800 usb [ucom] ucom1: init failed STALLED error in time of syn f usb/75797 usb [sound] [regression] 5.3-STABLE(2005 1/4) detect USB h o usb/75764 usb [umass] [patch] "umass0: Phase Error" - no device for f usb/75705 usb [umass] [panic] da0 attach / Optio S4 (with backtrace) f usb/74771 usb [umass] [hang] mounting write-protected umass device a s usb/74453 usb [umass] [patch] Q-lity CD-RW USB ECW-043 (ScanLogic SL o usb/74211 usb [umass] USB flash drive causes CAM status 0x4 on 4.10R o usb/73307 usb [panic] Kernel panics on USB disconnect s usb/72733 usb [ucom] [request] Kyocera 7135 Palm OS connection probl o usb/71455 usb [umass] Slow USB umass performance of 5.3 o usb/71417 usb [ugen] Cryptoflex e-gate USB token (ugen0) communicati o usb/71416 usb [ugen] Cryptoflex e-gate USB token (ugen0) detach is n o usb/71280 usb [aue] aue0 device (linksys usb100tx) doesn't work in 1 o usb/71155 usb [ulpt] misbehaving usb-printer hangs processes, causes o usb/70523 usb [umct] [patch] umct sending/receiving wrong characters o usb/69006 usb [usbdevs] [patch] Apple Cinema Display hangs USB ports o usb/68232 usb [ugen] [patch] ugen(4) isochronous handling correction o usb/67301 usb [uftdi] [panic] RTS and system panic o usb/66547 usb [ucom] Palm Tungsten T USB does not initialize correct o usb/63621 usb [umass] [panic] USB MemoryStick Reader stalls/crashes s usb/62257 usb [umass] [request] card reader UCR-61S2B is only half-s o usb/59698 usb [keyboard] [patch] Rework of ukbd HID to AT code trans s bin/57255 usb [patch] usbd(8) and multi-function devices s usb/52026 usb [usb] [request] umass driver support for InSystem ISD2 s usb/51958 usb [urio] [patch] update for urio driver o usb/40948 usb [umass] [request] USB HP CDW8200 does not work o usb/30929 usb [usb] [patch] use usbd to initialize USB ADSL modem 312 problems total. From owner-freebsd-usb@FreeBSD.ORG Wed Aug 18 09:00:12 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE29F1065673 for ; Wed, 18 Aug 2010 09:00:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 90FCD8FC20 for ; Wed, 18 Aug 2010 09:00:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7I90BZZ030157 for ; Wed, 18 Aug 2010 09:00:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7I90B2H030156; Wed, 18 Aug 2010 09:00:11 GMT (envelope-from gnats) Resent-Date: Wed, 18 Aug 2010 09:00:11 GMT Resent-Message-Id: <201008180900.o7I90B2H030156@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Lapo Luchini Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 734F21065693 for ; Wed, 18 Aug 2010 08:50:52 +0000 (UTC) (envelope-from lapo@lapo.it) Received: from andxor.it (relay.andxor.it [195.223.2.3]) by mx1.freebsd.org (Postfix) with SMTP id 9EC498FC18 for ; Wed, 18 Aug 2010 08:50:50 +0000 (UTC) Received: (qmail 54307 invoked from network); 18 Aug 2010 08:50:47 -0000 Received: from unknown (HELO lapo.andxor.it) (192.168.2.22) by andxor.it with SMTP; 18 Aug 2010 08:50:47 -0000 Received: from lapo.andxor.it (localhost.andxor.it [127.0.0.1]) by lapo.andxor.it (8.14.4/8.14.4) with ESMTP id o7I8olgK016770; Wed, 18 Aug 2010 10:50:47 +0200 (CEST) (envelope-from lapo@lapo.andxor.it) Received: (from lapo@localhost) by lapo.andxor.it (8.14.4/8.14.4/Submit) id o7I8oltU016720; Wed, 18 Aug 2010 10:50:47 +0200 (CEST) (envelope-from lapo) Message-Id: <201008180850.o7I8oltU016720@lapo.andxor.it> Date: Wed, 18 Aug 2010 10:50:47 +0200 (CEST) From: Lapo Luchini To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Lapo Luchini Subject: usb/149759: add USB vendor 04FC X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Lapo Luchini List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2010 09:00:13 -0000 >Number: 149759 >Category: usb >Synopsis: add USB vendor 04FC >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Aug 18 09:00:11 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Lapo Luchini >Release: FreeBSD 8.1-RELEASE amd64 >Organization: >Environment: System: FreeBSD lapo.andxor.it 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: My mouse vendor is not showing in dmesg. The vendor is reported as "Sunplus Technology Co., Ltd" by Linux though my mouse shows the vendor name "Kraun"; it's the same exact model that's in this page . >How-To-Repeat: # dmesg | fgrep ums ums0: on usbus6 ums0: 3 buttons and [XYZ] coordinates ID=0 # usbconfig dump_device_desc ugen6.4: at usbus6, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0110 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0008 idVendor = 0x04fc idProduct = 0x0003 bcdDevice = 0x0910 iManufacturer = 0x0000 iProduct = 0x0002 iSerialNumber = 0x0000 bNumConfigurations = 0x0001 >Fix: Add vendor 0x04fc to sys/dev/usb/usbdevs, but it already seems to be there as "AIPTEK International". (then why it doesn't show up? I guess I'm missing the point here) >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Wed Aug 18 09:23:44 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 C5979106566B for ; Wed, 18 Aug 2010 09:23:44 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.swipnet.se [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id 05F568FC15 for ; Wed, 18 Aug 2010 09:23:43 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=aL7kIdnnCbQA:10 a=Q9fys5e9bTEA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=6J4m5fgsAAAA:8 a=Xh3NsKisAAAA:8 a=39yAlj8-_i5yCYJjbVsA:9 a=F9tQZBNSrfGsNKOQUyoA:7 a=WERvt18-avcXMfal-KYthnMHofIA:4 a=PUjeQqilurYA:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe12.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 1217403921; Wed, 18 Aug 2010 11:23:42 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org, Lapo Luchini Date: Wed, 18 Aug 2010 11:19:53 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <201008180850.o7I8oltU016720@lapo.andxor.it> In-Reply-To: <201008180850.o7I8oltU016720@lapo.andxor.it> 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-15" Content-Transfer-Encoding: 7bit Message-Id: <201008181119.53791.hselasky@c2i.net> Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: usb/149759: add USB vendor 04FC 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: Wed, 18 Aug 2010 09:23:44 -0000 On Wednesday 18 August 2010 10:50:47 Lapo Luchini wrote: > >Number: 149759 > >Category: usb > >Synopsis: add USB vendor 04FC > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: change-request > >Submitter-Id: current-users > >Arrival-Date: Wed Aug 18 09:00:11 UTC 2010 > >Closed-Date: > >Last-Modified: > >Originator: Lapo Luchini > >Release: FreeBSD 8.1-RELEASE amd64 > >Organization: > > >Environment: > System: FreeBSD lapo.andxor.it 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul > 19 02:36:49 UTC 2010 > root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 > > >Description: > My mouse vendor is not showing in dmesg. > The vendor is reported as "Sunplus Technology Co., Ltd" by Linux > though my mouse shows the vendor name > "Kraun"; it's the same exact model that's in this page > guage=it>. > > >How-To-Repeat: > # dmesg | fgrep ums > ums0: 4> on usbus6 ums0: 3 buttons and [XYZ] coordinates ID=0 > > # usbconfig dump_device_desc > > ugen6.4: at usbus6, cfg=0 md=HOST > spd=LOW (1.5Mbps) pwr=ON > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0110 > bDeviceClass = 0x0000 > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0008 > idVendor = 0x04fc > idProduct = 0x0003 > bcdDevice = 0x0910 > iManufacturer = 0x0000 > iProduct = 0x0002 > iSerialNumber = 0x0000 > bNumConfigurations = 0x0001 > > >Fix: > Add vendor 0x04fc to sys/dev/usb/usbdevs, but it already seems to be there > as "AIPTEK International". (then why it doesn't show up? I guess I'm > missing the point here) > > >Release-Note: > >Audit-Trail: > > >Unformatted: Hi, You need: options USB_VERBOSE in the kernel for that information to show up. --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Aug 18 09:40:06 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03C72106566B for ; Wed, 18 Aug 2010 09:40:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C80238FC12 for ; Wed, 18 Aug 2010 09:40:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7I9e5DG070934 for ; Wed, 18 Aug 2010 09:40:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7I9e5Ze070933; Wed, 18 Aug 2010 09:40:05 GMT (envelope-from gnats) Date: Wed, 18 Aug 2010 09:40:05 GMT Message-Id: <201008180940.o7I9e5Ze070933@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/149759: add USB vendor 04FC X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2010 09:40:06 -0000 The following reply was made to PR usb/149759; it has been noted by GNATS. From: Hans Petter Selasky To: freebsd-usb@freebsd.org, Lapo Luchini Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: usb/149759: add USB vendor 04FC Date: Wed, 18 Aug 2010 11:19:53 +0200 On Wednesday 18 August 2010 10:50:47 Lapo Luchini wrote: > >Number: 149759 > >Category: usb > >Synopsis: add USB vendor 04FC > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: change-request > >Submitter-Id: current-users > >Arrival-Date: Wed Aug 18 09:00:11 UTC 2010 > >Closed-Date: > >Last-Modified: > >Originator: Lapo Luchini > >Release: FreeBSD 8.1-RELEASE amd64 > >Organization: > > >Environment: > System: FreeBSD lapo.andxor.it 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul > 19 02:36:49 UTC 2010 > root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 > > >Description: > My mouse vendor is not showing in dmesg. > The vendor is reported as "Sunplus Technology Co., Ltd" by Linux > though my mouse shows the vendor name > "Kraun"; it's the same exact model that's in this page > guage=it>. > > >How-To-Repeat: > # dmesg | fgrep ums > ums0: 4> on usbus6 ums0: 3 buttons and [XYZ] coordinates ID=0 > > # usbconfig dump_device_desc > > ugen6.4: at usbus6, cfg=0 md=HOST > spd=LOW (1.5Mbps) pwr=ON > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0110 > bDeviceClass = 0x0000 > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0008 > idVendor = 0x04fc > idProduct = 0x0003 > bcdDevice = 0x0910 > iManufacturer = 0x0000 > iProduct = 0x0002 > iSerialNumber = 0x0000 > bNumConfigurations = 0x0001 > > >Fix: > Add vendor 0x04fc to sys/dev/usb/usbdevs, but it already seems to be there > as "AIPTEK International". (then why it doesn't show up? I guess I'm > missing the point here) > > >Release-Note: > >Audit-Trail: > > >Unformatted: Hi, You need: options USB_VERBOSE in the kernel for that information to show up. --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Aug 18 12:50:05 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A95301065673 for ; Wed, 18 Aug 2010 12:50:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6E2808FC21 for ; Wed, 18 Aug 2010 12:50:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7ICo5tE061155 for ; Wed, 18 Aug 2010 12:50:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7ICo540061154; Wed, 18 Aug 2010 12:50:05 GMT (envelope-from gnats) Resent-Date: Wed, 18 Aug 2010 12:50:05 GMT Resent-Message-Id: <201008181250.o7ICo540061154@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, adrian ilarion ciobanu Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29F4D106566C for ; Wed, 18 Aug 2010 12:40:58 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 1ACE48FC18 for ; Wed, 18 Aug 2010 12:40:58 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o7ICeveb089549 for ; Wed, 18 Aug 2010 12:40:57 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o7ICevPR089548; Wed, 18 Aug 2010 12:40:57 GMT (envelope-from nobody) Message-Id: <201008181240.o7ICevPR089548@www.freebsd.org> Date: Wed, 18 Aug 2010 12:40:57 GMT From: adrian ilarion ciobanu To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/149764: usbdevs update: Huawei K3765 3G modem 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: Wed, 18 Aug 2010 12:50:05 -0000 >Number: 149764 >Category: usb >Synopsis: usbdevs update: Huawei K3765 3G modem >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Aug 18 12:50:05 UTC 2010 >Closed-Date: >Last-Modified: >Originator: adrian ilarion ciobanu >Release: FreeBSD 8.1-RELEASE i386 >Organization: >Environment: FreeBSD 8.1-RELEASE FreeBSD 8-1-RELEASE #0: Wed Aug 18 12:04:40 EEST 2010 root@:/usr/objs/usr/src/sys/GENERIC i386 >Description: usbdevs and u3g.c should be updated with Huawei K3765 3G (flipflop) modem definitions so when flip-flopping the device the system will recognize it properly as a 3G modem instead of umass-only device. manufacturer: Huawei model: K3765 VID: 0x12d1 PID: 0x1465 (modem) PID: 0x1520 (storage) >How-To-Repeat: insert a Huawei K3765 3G usb modem >Fix: add to sys/dev/usb/usbdevs: product HUAWEI K3765 0x1465 3G modem add to sys/dev/usb/serial/u3g.c: U3G_DEV(HUAWEI, K3765, U3GINIT_HUAWEI), >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Wed Aug 18 14:48:38 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70A05106567A; Wed, 18 Aug 2010 14:48:38 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 483F88FC08; Wed, 18 Aug 2010 14:48:38 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7IEmcRP078998; Wed, 18 Aug 2010 14:48:38 GMT (envelope-from uqs@freefall.freebsd.org) Received: (from uqs@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7IEmcs0078992; Wed, 18 Aug 2010 14:48:38 GMT (envelope-from uqs) Date: Wed, 18 Aug 2010 14:48:38 GMT Message-Id: <201008181448.o7IEmcs0078992@freefall.freebsd.org> To: uspoerlein@gmail.com, uqs@FreeBSD.org, freebsd-usb@FreeBSD.org From: uqs@FreeBSD.org Cc: Subject: Re: usb/127980: [umass] [patch] [usb67] Fix Samsung YP U2 MP3 player on 7.x and 8.x 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: Wed, 18 Aug 2010 14:48:38 -0000 Synopsis: [umass] [patch] [usb67] Fix Samsung YP U2 MP3 player on 7.x and 8.x State-Changed-From-To: patched->closed State-Changed-By: uqs State-Changed-When: Wed Aug 18 14:48:37 UTC 2010 State-Changed-Why: I no longer have this device, so I cannot test an MFC to stable/7. http://www.freebsd.org/cgi/query-pr.cgi?pr=127980 From owner-freebsd-usb@FreeBSD.ORG Wed Aug 18 20:26:03 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 7078A1065694; Wed, 18 Aug 2010 20:26:03 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id CA8B98FC22; Wed, 18 Aug 2010 20:26:02 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=AloUlVQQLuutPgH7MSFGD/V8MYI3aUCj623mET0KTys= c=1 sm=1 a=yQieY_QXiBcA:10 a=Q9fys5e9bTEA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=NP3z_X3quJYFRJZ8tDcA:9 a=B8SlvbMWyDwsXUpHMRj9YCI2dq8A:4 a=PUjeQqilurYA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:117 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 7973625; Wed, 18 Aug 2010 22:25:19 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Wed, 18 Aug 2010 22:22:17 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <201008181240.o7ICevPR089548@www.freebsd.org> In-Reply-To: <201008181240.o7ICevPR089548@www.freebsd.org> 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-15" Content-Transfer-Encoding: 7bit Message-Id: <201008182222.17760.hselasky@c2i.net> Cc: freebsd-gnats-submit@freebsd.org, adrian ilarion ciobanu Subject: Re: usb/149764: usbdevs update: Huawei K3765 3G modem 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: Wed, 18 Aug 2010 20:26:03 -0000 On Wednesday 18 August 2010 14:40:57 adrian ilarion ciobanu wrote: > >Number: 149764 > >Category: usb > >Synopsis: usbdevs update: Huawei K3765 3G modem > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-usb > >State: open Committed to USB P4. See change ID #182575. --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Aug 18 20:30:06 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A24F5106567A for ; Wed, 18 Aug 2010 20:30:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 780CE8FC13 for ; Wed, 18 Aug 2010 20:30:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7IKU6kh014592 for ; Wed, 18 Aug 2010 20:30:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7IKU6Kw014581; Wed, 18 Aug 2010 20:30:06 GMT (envelope-from gnats) Date: Wed, 18 Aug 2010 20:30:06 GMT Message-Id: <201008182030.o7IKU6Kw014581@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/149764: usbdevs update: Huawei K3765 3G modem X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2010 20:30:06 -0000 The following reply was made to PR usb/149764; it has been noted by GNATS. From: Hans Petter Selasky To: freebsd-usb@freebsd.org Cc: adrian ilarion ciobanu , freebsd-gnats-submit@freebsd.org Subject: Re: usb/149764: usbdevs update: Huawei K3765 3G modem Date: Wed, 18 Aug 2010 22:22:17 +0200 On Wednesday 18 August 2010 14:40:57 adrian ilarion ciobanu wrote: > >Number: 149764 > >Category: usb > >Synopsis: usbdevs update: Huawei K3765 3G modem > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-usb > >State: open Committed to USB P4. See change ID #182575. --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Aug 18 21:17:10 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 1B9B210656A3 for ; Wed, 18 Aug 2010 21:17:10 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id D72228FC22 for ; Wed, 18 Aug 2010 21:17:09 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 99AAE8540; Wed, 18 Aug 2010 21:17:08 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Stefan Bethke In-Reply-To: <201002131713.02782.hselasky@c2i.net> Date: Wed, 18 Aug 2010 23:17:07 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <8D8F7A05-9733-4540-A5EA-E6BFF635B16D@lassitu.de> References: <201002101050.08302.freebsd-usb@dino.sk> <201002131125.43505.hselasky@c2i.net> <201002131630.06417.freebsd-usb@dino.sk> <201002131713.02782.hselasky@c2i.net> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1081) Cc: freebsd-usb@freebsd.org Subject: Re: Huawei E1752 under FreeBSD 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: Wed, 18 Aug 2010 21:17:10 -0000 Am 13.02.2010 um 17:13 schrieb Hans Petter Selasky: > Committed to USB P4: >=20 > http://p4web.freebsd.org/chv.cgi?CH=3D174658 > http://perforce.freebsd.org/chv.cgi?CH=3D174658 This this support for the Huawei E1752 ever get committed to stable? = I've got a E1550, which shows up with the same USB dev id as the E1752, = according to the latest usb_modeswitch device_reference.txt, and takes = the same command to enable the serial ports. Is there some additional action needed? Thanks, Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-usb@FreeBSD.ORG Thu Aug 19 06:55:33 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 5A1441065670; Thu, 19 Aug 2010 06:55:33 +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 A98908FC14; Thu, 19 Aug 2010 06:55:32 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=uQlts9P3TFIiE3mXDKsOajf6rXzGvPXEyWzE93HpGms= c=1 sm=1 a=8nJEP1OIZ-IA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=6I5d2MoRAAAA:8 a=nCOrB48uFyknk2WwFtAA:9 a=WOoVFkAgzjlURxtrUs4A:7 a=iDluyptYiqbYG2XNYHfkcGLtPKEA: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 9145083; Thu, 19 Aug 2010 08:54:36 +0200 From: Hans Petter Selasky To: Stefan Bethke Date: Thu, 19 Aug 2010 08:51:48 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <201002101050.08302.freebsd-usb@dino.sk> <201002131713.02782.hselasky@c2i.net> <8D8F7A05-9733-4540-A5EA-E6BFF635B16D@lassitu.de> In-Reply-To: <8D8F7A05-9733-4540-A5EA-E6BFF635B16D@lassitu.de> 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: <201008190851.48327.hselasky@c2i.net> Cc: gavin@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Huawei E1752 under FreeBSD 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: Thu, 19 Aug 2010 06:55:33 -0000 On Wednesday 18 August 2010 23:17:07 Stefan Bethke wrote: > Am 13.02.2010 um 17:13 schrieb Hans Petter Selasky: > > Committed to USB P4: > > > > http://p4web.freebsd.org/chv.cgi?CH=174658 > > http://perforce.freebsd.org/chv.cgi?CH=174658 > > This this support for the Huawei E1752 ever get committed to stable? I've > got a E1550, which shows up with the same USB dev id as the E1752, > according to the latest usb_modeswitch device_reference.txt, and takes the > same command to enable the serial ports. > > Is there some additional action needed? Gavin, any comments? --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Aug 19 21:05:07 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 758631065698 for ; Thu, 19 Aug 2010 21:05:07 +0000 (UTC) (envelope-from gofdu-freebsd-usb@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 2ABD28FC1A for ; Thu, 19 Aug 2010 21:05:07 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OmC3n-00051x-Q9 for freebsd-usb@freebsd.org; Thu, 19 Aug 2010 22:50:03 +0200 Received: from 193.33.173.33 ([193.33.173.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Aug 2010 22:50:03 +0200 Received: from c.kworr by 193.33.173.33 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Aug 2010 22:50:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-usb@freebsd.org From: Volodymyr Kostyrko Date: Thu, 19 Aug 2010 23:37:00 +0300 Lines: 40 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 193.33.173.33 User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; uk-UA; rv:1.9.2.8) Gecko/20100807 Thunderbird/3.1.2 Subject: Transcend JetFlash V85 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: Thu, 19 Aug 2010 21:05:07 -0000 Hi people. Just recently saw the message on STABLE: MFC r210931: Disable sync cache for the Transcend Jetflash V90. This sounds good since I have the same problem with my JetFlash V85: Aug 19 23:33:55 limbo kernel: (da4:umass-sim1:1:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0 Aug 19 23:33:55 limbo kernel: (da4:umass-sim1:1:0:0): CAM status: SCSI Status Error Aug 19 23:33:55 limbo kernel: (da4:umass-sim1:1:0:0): SCSI status: Check Condition Aug 19 23:33:55 limbo kernel: (da4:umass-sim1:1:0:0): SCSI sense: ILLEGAL REQUEST asc:26,0 (Invalid field in parameter list) My flash looks like: ugen3.3: at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x058f idProduct = 0x6387 bcdDevice = 0x0100 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 bNumConfigurations = 0x0001 Can someone help me understanding how can I a a quirk for my flash drive? -- Sphinx of black quartz judge my vow. From owner-freebsd-usb@FreeBSD.ORG Thu Aug 19 21:42:23 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 DA1D9106567A for ; Thu, 19 Aug 2010 21:42:23 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe11.swipnet.se [212.247.155.65]) by mx1.freebsd.org (Postfix) with ESMTP id 6B9A48FC16 for ; Thu, 19 Aug 2010 21:42:22 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=IkcTkHD0fZMA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=5ecbVzmiFSlVr3hZDZcA:9 a=kZ4Z7X90wmiEsiqzlJHvUOxmcz4A:4 a=QEXdDO2ut3YA:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe11.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 1251980985; Thu, 19 Aug 2010 23:42:21 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Thu, 19 Aug 2010 23:38:37 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: In-Reply-To: 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201008192338.37828.hselasky@c2i.net> Cc: Volodymyr Kostyrko Subject: Re: Transcend JetFlash V85 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: Thu, 19 Aug 2010 21:42:23 -0000 On Thursday 19 August 2010 22:37:00 Volodymyr Kostyrko wrote: > Hi people. > > Just recently saw the message on STABLE: > > MFC r210931: > Disable sync cache for the Transcend Jetflash V90. > > This sounds good since I have the same problem with my JetFlash V85: > Aug 19 23:33:55 limbo kernel: (da4:umass-sim1:1:0:0): SYNCHRONIZE > CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0 > Aug 19 23:33:55 limbo kernel: (da4:umass-sim1:1:0:0): CAM status: SCSI > Status Error > Aug 19 23:33:55 limbo kernel: (da4:umass-sim1:1:0:0): SCSI status: Check > Condition > Aug 19 23:33:55 limbo kernel: (da4:umass-sim1:1:0:0): SCSI sense: > ILLEGAL REQUEST asc:26,0 (Invalid field in parameter list) > > My flash looks like: > ugen3.3: at usbus3, cfg=0 md=HOST > spd=HIGH (480Mbps) pwr=ON > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0200 > bDeviceClass = 0x0000 > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0040 > idVendor = 0x058f > idProduct = 0x6387 > bcdDevice = 0x0100 > iManufacturer = 0x0001 > iProduct = 0x0002 > iSerialNumber = 0x0003 > bNumConfigurations = 0x0001 > > Can someone help me understanding how can I a a quirk for my flash drive? You can use usbconfig to add quirks on the fly. See: usbconfig -h And: man usbconfig --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Aug 20 07:20:04 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2978610656A4 for ; Fri, 20 Aug 2010 07:20:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E05D78FC23 for ; Fri, 20 Aug 2010 07:20:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7K7K3ft011771 for ; Fri, 20 Aug 2010 07:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7K7K36s011769; Fri, 20 Aug 2010 07:20:03 GMT (envelope-from gnats) Resent-Date: Fri, 20 Aug 2010 07:20:03 GMT Resent-Message-Id: <201008200720.o7K7K36s011769@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Daniel Braniss Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80EEF1065673 for ; Fri, 20 Aug 2010 07:11:17 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id 360B58FC08 for ; Fri, 20 Aug 2010 07:11:17 +0000 (UTC) Received: from rnd.cs.huji.ac.il ([132.65.80.8]) by kabab.cs.huji.ac.il with esmtp id 1OmL3a-000PoX-Hi for FreeBSD-gnats-submit@freebsd.org; Fri, 20 Aug 2010 09:26:26 +0300 Received: from danny by rnd.cs.huji.ac.il with local (Exim 4.71 (FreeBSD)) (envelope-from ) id 1OmL3a-000FKZ-HW for FreeBSD-gnats-submit@freebsd.org; Fri, 20 Aug 2010 09:26:26 +0300 Message-Id: Date: Fri, 20 Aug 2010 09:26:26 +0300 From: Daniel Braniss To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: usb/149826: recognice another PL2303 based usb dongle X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Braniss List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2010 07:20:04 -0000 >Number: 149826 >Category: usb >Synopsis: recognice another PL2303 based usb dongle >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Fri Aug 20 07:20:03 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Daniel Braniss >Release: FreeBSD 8.1-STABLE amd64 >Organization: >Environment: System: FreeBSD rnd 8.1-STABLE FreeBSD 8.1-STABLE #35 r2957: Sun Jul 25 09:26:48 IDT 2010 danny@rnd:/r+d/obj/rnd/r+d/stable/8/sys/HUJI amd64 >Description: this dongle is a cellular modem, and I have been using it to send and receive SMS. >How-To-Repeat: >Fix: --- a/sys/dev/usb/serial/uplcom.c Wed Aug 18 21:44:50 2010 +0000 +++ b/sys/dev/usb/serial/uplcom.c Fri Aug 20 09:19:40 2010 +0300 @@ -294,6 +294,8 @@ UPLCOM_DEV(MOBILEACTION, MA620, 0, 0xFFFF, PL2303X), /* Corega CG-USBRS232R */ UPLCOM_DEV(COREGA, CGUSBRS232R, 0, 0xFFFF, PL2303X), + /* GPRS */ + UPLCOM_DEV(PROLIFIC, GPRS, 0, 0xFFFF, PL2303), }; #undef UPLCOM_DEV >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Fri Aug 20 11:06:43 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 D9E961065693 for ; Fri, 20 Aug 2010 11:06:43 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 377418FC08 for ; Fri, 20 Aug 2010 11:06:43 +0000 (UTC) Received: from gw ([192.168.10.10] helo=terran) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1OmP9W-0008Ej-IM for freebsd-usb@freebsd.org; Fri, 20 Aug 2010 13:48:50 +0300 Date: Fri, 20 Aug 2010 13:49:02 +0300 From: Alexandr Rybalko To: freebsd-usb@freebsd.org Message-Id: <20100820134902.64744506.ray@dlink.ua> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Fri__20_Aug_2010_13_49_02_+0300_G180I7BIZj0VDu3j" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: patch: u3g + quirks: Add DTR/RTS support for QUALCOMM MSM6800 based modems 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: Fri, 20 Aug 2010 11:06:43 -0000 This is a multi-part message in MIME format. --Multipart=_Fri__20_Aug_2010_13_49_02_+0300_G180I7BIZj0VDu3j Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hi, The attached patch (also at http://my.ddteam.net/files/usb.serial.diff) add support for DTR/RTS on QUALCOMM MSM6800 based modems (Known: AnyData ADU-500A, ADU-510A). Please review and apply if the changes are okay. Let me know if you have any comments. -- Alexandr Rybalko aka Alex RAY --Multipart=_Fri__20_Aug_2010_13_49_02_+0300_G180I7BIZj0VDu3j-- From owner-freebsd-usb@FreeBSD.ORG Fri Aug 20 16:15:20 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 C3D3D10656A3 for ; Fri, 20 Aug 2010 16:15:20 +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 504AF8FC1B for ; Fri, 20 Aug 2010 16:15:19 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=uQlts9P3TFIiE3mXDKsOajf6rXzGvPXEyWzE93HpGms= c=1 sm=1 a=jNjj0npkQw4A:10 a=Q9fys5e9bTEA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=4I05h4SrAAAA:8 a=pAJeSyp9inBX-d0YxCMA:9 a=iq7h21pyNI65yybIGvRtdOCtMnQA:4 a=PUjeQqilurYA: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 9691338; Fri, 20 Aug 2010 18:14:21 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Fri, 20 Aug 2010 18:11:31 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <20100820134902.64744506.ray@dlink.ua> In-Reply-To: <20100820134902.64744506.ray@dlink.ua> 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-15" Content-Transfer-Encoding: 7bit Message-Id: <201008201811.31398.hselasky@c2i.net> Cc: Subject: Re: patch: u3g + quirks: Add DTR/RTS support for QUALCOMM MSM6800 based modems 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: Fri, 20 Aug 2010 16:15:20 -0000 On Friday 20 August 2010 12:49:02 Alexandr Rybalko wrote: > Hi, > > The attached patch (also at http://my.ddteam.net/files/usb.serial.diff) add > support for DTR/RTS on QUALCOMM MSM6800 based modems (Known: AnyData > ADU-500A, ADU-510A). > > Please review and apply if the changes are okay. > Let me know if you have any comments. DTR and RTS are defined to the same value. Is this correct? +#define U3G_REG_LINE_CTRL_DTR 0x01 +#define U3G_REG_LINE_CTRL_RTS 0x01 --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Aug 20 16:19:17 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 EF0861065694; Fri, 20 Aug 2010 16:19:17 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.swip.net [212.247.154.161]) by mx1.freebsd.org (Postfix) with ESMTP id 4B5878FC18; Fri, 20 Aug 2010 16:19:16 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=SLL6iUR4mT0wNXVHW9RxQHy4+MdEWXaI2PxhqtT+/BA= c=1 sm=1 a=4Zzmq2maDT0A:10 a=Q9fys5e9bTEA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=rYD8F_bu7g4uF5zgPAkA:9 a=wgPTajzDzGsKsLzt4rgA:7 a=75sp-2iIUS4XFkY2XjEKD3ecBEkA:4 a=PUjeQqilurYA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:117 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe06.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 8522781; Fri, 20 Aug 2010 18:18:41 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org, Daniel Braniss Date: Fri, 20 Aug 2010 18:15:29 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: In-Reply-To: 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-15" Content-Transfer-Encoding: 7bit Message-Id: <201008201815.29494.hselasky@c2i.net> Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: usb/149826: recognice another PL2303 based usb dongle 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: Fri, 20 Aug 2010 16:19:18 -0000 On Friday 20 August 2010 08:26:26 Daniel Braniss wrote: > >Number: 149826 > >Category: usb > >Synopsis: recognice another PL2303 based usb dongle > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: update > >Submitter-Id: current-users > >Arrival-Date: Fri Aug 20 07:20:03 UTC 2010 > >Closed-Date: > >Last-Modified: > >Originator: Daniel Braniss > >Release: FreeBSD 8.1-STABLE amd64 > >Organization: > > >Environment: > System: FreeBSD rnd 8.1-STABLE FreeBSD 8.1-STABLE #35 r2957: Sun Jul 25 > 09:26:48 IDT 2010 danny@rnd:/r+d/obj/rnd/r+d/stable/8/sys/HUJI amd64 > > >Description: > this dongle is a cellular modem, and I have been using it > to send and receive SMS. > > >How-To-Repeat: > > >Fix: > --- a/sys/dev/usb/serial/uplcom.c Wed Aug 18 21:44:50 2010 +0000 > +++ b/sys/dev/usb/serial/uplcom.c Fri Aug 20 09:19:40 2010 +0300 > @@ -294,6 +294,8 @@ > UPLCOM_DEV(MOBILEACTION, MA620, 0, 0xFFFF, PL2303X), > /* Corega CG-USBRS232R */ > UPLCOM_DEV(COREGA, CGUSBRS232R, 0, 0xFFFF, PL2303X), > + /* GPRS */ > + UPLCOM_DEV(PROLIFIC, GPRS, 0, 0xFFFF, PL2303), > }; > #undef UPLCOM_DEV > Hi, Can you include your sys/dev/usb/usbdevs changes? --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Aug 20 16:20:03 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBFC4106564A for ; Fri, 20 Aug 2010 16:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AC0A38FC08 for ; Fri, 20 Aug 2010 16:20:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7KGK3Y1053385 for ; Fri, 20 Aug 2010 16:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7KGK36m053384; Fri, 20 Aug 2010 16:20:03 GMT (envelope-from gnats) Date: Fri, 20 Aug 2010 16:20:03 GMT Message-Id: <201008201620.o7KGK36m053384@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/149826: recognice another PL2303 based usb dongle X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2010 16:20:03 -0000 The following reply was made to PR usb/149826; it has been noted by GNATS. From: Hans Petter Selasky To: freebsd-usb@freebsd.org, Daniel Braniss Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: usb/149826: recognice another PL2303 based usb dongle Date: Fri, 20 Aug 2010 18:15:29 +0200 On Friday 20 August 2010 08:26:26 Daniel Braniss wrote: > >Number: 149826 > >Category: usb > >Synopsis: recognice another PL2303 based usb dongle > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: update > >Submitter-Id: current-users > >Arrival-Date: Fri Aug 20 07:20:03 UTC 2010 > >Closed-Date: > >Last-Modified: > >Originator: Daniel Braniss > >Release: FreeBSD 8.1-STABLE amd64 > >Organization: > > >Environment: > System: FreeBSD rnd 8.1-STABLE FreeBSD 8.1-STABLE #35 r2957: Sun Jul 25 > 09:26:48 IDT 2010 danny@rnd:/r+d/obj/rnd/r+d/stable/8/sys/HUJI amd64 > > >Description: > this dongle is a cellular modem, and I have been using it > to send and receive SMS. > > >How-To-Repeat: > > >Fix: > --- a/sys/dev/usb/serial/uplcom.c Wed Aug 18 21:44:50 2010 +0000 > +++ b/sys/dev/usb/serial/uplcom.c Fri Aug 20 09:19:40 2010 +0300 > @@ -294,6 +294,8 @@ > UPLCOM_DEV(MOBILEACTION, MA620, 0, 0xFFFF, PL2303X), > /* Corega CG-USBRS232R */ > UPLCOM_DEV(COREGA, CGUSBRS232R, 0, 0xFFFF, PL2303X), > + /* GPRS */ > + UPLCOM_DEV(PROLIFIC, GPRS, 0, 0xFFFF, PL2303), > }; > #undef UPLCOM_DEV > Hi, Can you include your sys/dev/usb/usbdevs changes? --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Aug 20 18:20:02 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D81F1065672 for ; Fri, 20 Aug 2010 18:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6D76A8FC18 for ; Fri, 20 Aug 2010 18:20:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7KIK2wG070293 for ; Fri, 20 Aug 2010 18:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7KIK2mo070292; Fri, 20 Aug 2010 18:20:02 GMT (envelope-from gnats) Date: Fri, 20 Aug 2010 18:20:02 GMT Message-Id: <201008201820.o7KIK2mo070292@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Daniel Braniss Cc: Subject: Re: usb/149826: recognice another PL2303 based usb dongle X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Braniss List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2010 18:20:02 -0000 The following reply was made to PR usb/149826; it has been noted by GNATS. From: Daniel Braniss To: Hans Petter Selasky Cc: freebsd-usb@freebsd.org, FreeBSD-gnats-submit@freebsd.org Subject: Re: usb/149826: recognice another PL2303 based usb dongle Date: Fri, 20 Aug 2010 21:14:03 +0300 > On Friday 20 August 2010 08:26:26 Daniel Braniss wrote: > > >Number: 149826 > > >Category: usb > > >Synopsis: recognice another PL2303 based usb dongle > > >Confidential: no > > >Severity: non-critical > > >Priority: low > > >Responsible: freebsd-usb > > >State: open > > >Quarter: > > >Keywords: > > >Date-Required: > > >Class: update > > >Submitter-Id: current-users > > >Arrival-Date: Fri Aug 20 07:20:03 UTC 2010 > > >Closed-Date: > > >Last-Modified: > > >Originator: Daniel Braniss > > >Release: FreeBSD 8.1-STABLE amd64 > > >Organization: > > > > >Environment: > > System: FreeBSD rnd 8.1-STABLE FreeBSD 8.1-STABLE #35 r2957: Sun Jul 25 > > 09:26:48 IDT 2010 danny@rnd:/r+d/obj/rnd/r+d/stable/8/sys/HUJI amd64 > > > > >Description: > > this dongle is a cellular modem, and I have been using it > > to send and receive SMS. > > > > >How-To-Repeat: > > > > >Fix: > > --- a/sys/dev/usb/serial/uplcom.c Wed Aug 18 21:44:50 2010 +0000 > > +++ b/sys/dev/usb/serial/uplcom.c Fri Aug 20 09:19:40 2010 +0300 > > @@ -294,6 +294,8 @@ > > UPLCOM_DEV(MOBILEACTION, MA620, 0, 0xFFFF, PL2303X), > > /* Corega CG-USBRS232R */ > > UPLCOM_DEV(COREGA, CGUSBRS232R, 0, 0xFFFF, PL2303X), > > + /* GPRS */ > > + UPLCOM_DEV(PROLIFIC, GPRS, 0, 0xFFFF, PL2303), > > }; > > #undef UPLCOM_DEV > > > > Hi, > > Can you include your sys/dev/usb/usbdevs changes? > > --HPS hi, this is whatt's missing, forgot about it: product PROLIFIC GPRS 0x0609 Wireless Data Card thanks, danny From owner-freebsd-usb@FreeBSD.ORG Fri Aug 20 18:23:14 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 7CA5D1065696 for ; Fri, 20 Aug 2010 18:23:14 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.tele2.se [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id D21F48FC13 for ; Fri, 20 Aug 2010 18:23:13 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=4Zzmq2maDT0A:10 a=8nJEP1OIZ-IA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=NngbjUi2fWYpjv1RcSwA:9 a=MaYaffZlUcv0ppoANeWTjVY3rggA:4 a=wPNLvfGTeEIA:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 650542012; Fri, 20 Aug 2010 20:23:11 +0200 From: Hans Petter Selasky To: Daniel Braniss Date: Fri, 20 Aug 2010 20:19:25 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <201008201815.29494.hselasky@c2i.net> In-Reply-To: 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: <201008202019.25802.hselasky@c2i.net> Cc: FreeBSD-gnats-submit@freebsd.org, freebsd-usb@freebsd.org Subject: Re: usb/149826: recognice another PL2303 based usb dongle 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: Fri, 20 Aug 2010 18:23:14 -0000 Please check and verify USB P4 change #182661. --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Aug 20 18:40:03 2010 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B312910656A8 for ; Fri, 20 Aug 2010 18:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 890A78FC15 for ; Fri, 20 Aug 2010 18:40:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7KIe3Q9089918 for ; Fri, 20 Aug 2010 18:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7KIe3Tl089915; Fri, 20 Aug 2010 18:40:03 GMT (envelope-from gnats) Date: Fri, 20 Aug 2010 18:40:03 GMT Message-Id: <201008201840.o7KIe3Tl089915@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/149826: recognice another PL2303 based usb dongle X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2010 18:40:03 -0000 The following reply was made to PR usb/149826; it has been noted by GNATS. From: Hans Petter Selasky To: Daniel Braniss Cc: freebsd-usb@freebsd.org, FreeBSD-gnats-submit@freebsd.org Subject: Re: usb/149826: recognice another PL2303 based usb dongle Date: Fri, 20 Aug 2010 20:19:25 +0200 Please check and verify USB P4 change #182661. --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Aug 20 18:41:17 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 3021C10657A1 for ; Fri, 20 Aug 2010 18:41:17 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id D88438FC1D for ; Fri, 20 Aug 2010 18:41:16 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1OmW6N-0005i9-3H; Fri, 20 Aug 2010 21:14:03 +0300 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Hans Petter Selasky In-reply-to: <201008201815.29494.hselasky@c2i.net> References: <201008201815.29494.hselasky@c2i.net> Comments: In-reply-to Hans Petter Selasky message dated "Fri, 20 Aug 2010 18:15:29 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 20 Aug 2010 21:14:03 +0300 From: Daniel Braniss Message-ID: Cc: FreeBSD-gnats-submit@freebsd.org, freebsd-usb@freebsd.org Subject: Re: usb/149826: recognice another PL2303 based usb dongle 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: Fri, 20 Aug 2010 18:41:17 -0000 > On Friday 20 August 2010 08:26:26 Daniel Braniss wrote: > > >Number: 149826 > > >Category: usb > > >Synopsis: recognice another PL2303 based usb dongle > > >Confidential: no > > >Severity: non-critical > > >Priority: low > > >Responsible: freebsd-usb > > >State: open > > >Quarter: > > >Keywords: > > >Date-Required: > > >Class: update > > >Submitter-Id: current-users > > >Arrival-Date: Fri Aug 20 07:20:03 UTC 2010 > > >Closed-Date: > > >Last-Modified: > > >Originator: Daniel Braniss > > >Release: FreeBSD 8.1-STABLE amd64 > > >Organization: > > > > >Environment: > > System: FreeBSD rnd 8.1-STABLE FreeBSD 8.1-STABLE #35 r2957: Sun Jul 25 > > 09:26:48 IDT 2010 danny@rnd:/r+d/obj/rnd/r+d/stable/8/sys/HUJI amd64 > > > > >Description: > > this dongle is a cellular modem, and I have been using it > > to send and receive SMS. > > > > >How-To-Repeat: > > > > >Fix: > > --- a/sys/dev/usb/serial/uplcom.c Wed Aug 18 21:44:50 2010 +0000 > > +++ b/sys/dev/usb/serial/uplcom.c Fri Aug 20 09:19:40 2010 +0300 > > @@ -294,6 +294,8 @@ > > UPLCOM_DEV(MOBILEACTION, MA620, 0, 0xFFFF, PL2303X), > > /* Corega CG-USBRS232R */ > > UPLCOM_DEV(COREGA, CGUSBRS232R, 0, 0xFFFF, PL2303X), > > + /* GPRS */ > > + UPLCOM_DEV(PROLIFIC, GPRS, 0, 0xFFFF, PL2303), > > }; > > #undef UPLCOM_DEV > > > > Hi, > > Can you include your sys/dev/usb/usbdevs changes? > > --HPS hi, this is whatt's missing, forgot about it: product PROLIFIC GPRS 0x0609 Wireless Data Card thanks, danny From owner-freebsd-usb@FreeBSD.ORG Fri Aug 20 20:20:59 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 891A81065697 for ; Fri, 20 Aug 2010 20:20:59 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0D8EA8FC0C for ; Fri, 20 Aug 2010 20:20:58 +0000 (UTC) Received: by bwz20 with SMTP id 20so3443494bwz.13 for ; Fri, 20 Aug 2010 13:20:57 -0700 (PDT) Received: by 10.204.78.143 with SMTP id l15mr1385420bkk.22.1282334307303; Fri, 20 Aug 2010 12:58:27 -0700 (PDT) Received: from localhost ([91.209.51.118]) by mx.google.com with ESMTPS id d27sm2290966bku.10.2010.08.20.12.58.24 (version=SSLv3 cipher=RC4-MD5); Fri, 20 Aug 2010 12:58:25 -0700 (PDT) Date: Fri, 20 Aug 2010 22:58:21 +0300 From: Alex RAY To: Hans Petter Selasky Message-Id: <20100820225821.330bb0ea.ray@ddteam.net> In-Reply-To: <201008201811.31398.hselasky@c2i.net> References: <20100820134902.64744506.ray@dlink.ua> <201008201811.31398.hselasky@c2i.net> Organization: DDTeam.net X-Mailer: Sylpheed 3.0.3 (GTK+ 2.16.6; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Fri__20_Aug_2010_22_58_21_+0300_HmsuF_wT/JmaB_l5" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-usb@freebsd.org Subject: Re: patch: u3g + quirks: Add DTR/RTS support for QUALCOMM MSM6800 based modems 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: Fri, 20 Aug 2010 20:20:59 -0000 This is a multi-part message in MIME format. --Multipart=_Fri__20_Aug_2010_22_58_21_+0300_HmsuF_wT/JmaB_l5 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 20 Aug 2010 18:11:31 +0200 Hans Petter Selasky wrote: > On Friday 20 August 2010 12:49:02 Alexandr Rybalko wrote: > > Hi, > > > > The attached patch (also at http://my.ddteam.net/files/usb.serial.diff) add > > support for DTR/RTS on QUALCOMM MSM6800 based modems (Known: AnyData > > ADU-500A, ADU-510A). > > > > Please review and apply if the changes are okay. > > Let me know if you have any comments. > > DTR and RTS are defined to the same value. Is this correct? > > +#define U3G_REG_LINE_CTRL_DTR 0x01 > +#define U3G_REG_LINE_CTRL_RTS 0x01 > > --HPS Oops, my mistake, must be: +#define U3G_REG_LINE_CTRL_DTR 0x01 +#define U3G_REG_LINE_CTRL_RTS 0x02 I attach correct patch and refresh http://my.ddteam.net/files/usb.serial.diff. -- Alexandr Rybalko aka Alex RAY --Multipart=_Fri__20_Aug_2010_22_58_21_+0300_HmsuF_wT/JmaB_l5-- From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 12:31:09 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 57CC610656AA for ; Sat, 21 Aug 2010 12:31:09 +0000 (UTC) (envelope-from thebeelzebubtrigger@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 13EBC8FC13 for ; Sat, 21 Aug 2010 12:31:08 +0000 (UTC) Received: by gxk24 with SMTP id 24so1889128gxk.13 for ; Sat, 21 Aug 2010 05:31:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=ByvWakZjAyUDNKX7AZJ3oSUBoxqroF7Vk5kfnh0Y2y8=; b=DWg9kfpmKqxx6rfSgYFI3PritxpdaUpZtC9gDXCU3dltSSh+vePnlD6LHKjaj5BY09 Om02dmZjIeoLocuwEYuQcAinnztAwt+ZyOneJBIod95nY8j5PYRdYX2A3Mvqf96Fmk0Z izqDFlO53/h/YkvgOtUCqVt7ppja46rjXO6z8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=rJUrMJmyx3Pa7/xOd+xu+207Tkz0wk7bU6z73DozFDEel5NAyS12O0SaHSX389TY+4 7ltjl8wYR0dodG5+JTeXJzZbO78Tbbv9WLKNgWeLqs5Z1+EQP2lO/K8mdXNbEU9QwMa1 T1NWjmYTbsmd+SekoZqPFKGgLulxUlJesxflY= Received: by 10.100.214.20 with SMTP id m20mr2987625ang.69.1282392198551; Sat, 21 Aug 2010 05:03:18 -0700 (PDT) Received: from satcidananda.16x108.merseine.nu (adsl-152-64-246.asm.bellsouth.net [72.152.64.246]) by mx.google.com with ESMTPS id i30sm6503619anh.29.2010.08.21.05.03.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 05:03:18 -0700 (PDT) Date: Sat, 21 Aug 2010 08:03:16 -0400 From: Indi To: freebsd-usb@freebsd.org Message-ID: <20100821120316.GA3352@satcidananda.16x108.merseine.nu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: USB HDD needs replugging? 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, 21 Aug 2010 12:31:09 -0000 Hi list, I recently bought a Seagate 320 GB portable USB HDD. Works perfectly with Linux and OS X, but in FreeBSD it has to be unplugged and replugged in order to show up in /dev/. Is there a way to make it behave normally? TIA, Indulekha From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 13:07:52 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 0009E106567A for ; Sat, 21 Aug 2010 13:07:51 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id 8A81F8FC1E for ; Sat, 21 Aug 2010 13:07:51 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=8mUlEYGF/1ewVNyGLrc5XeWvvpKOEXP975HI1NO5ccA= c=1 sm=1 a=H72ThNcfaIcA:10 a=8nJEP1OIZ-IA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=7EYlCJM1FU0p9o4i7JsA:9 a=sWUdBdTE5GRUjlwjJoLJkzr7ZQUA:4 a=wPNLvfGTeEIA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:117 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 9846268; Sat, 21 Aug 2010 15:07:07 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sat, 21 Aug 2010 15:04:03 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <20100821120316.GA3352@satcidananda.16x108.merseine.nu> In-Reply-To: <20100821120316.GA3352@satcidananda.16x108.merseine.nu> 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: <201008211504.03243.hselasky@c2i.net> Cc: Indi Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 13:07:52 -0000 On Saturday 21 August 2010 14:03:16 Indi wrote: > Hi list, > > I recently bought a Seagate 320 GB portable USB HDD. > Works perfectly with Linux and OS X, but in FreeBSD > it has to be unplugged and replugged in order to show > up in /dev/. > > Is there a way to make it behave normally? Try checking the USB Mass Storaquirks. See: usbconfig -h --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 13:47:46 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 CF94C1065695 for ; Sat, 21 Aug 2010 13:47:46 +0000 (UTC) (envelope-from thebeelzebubtrigger@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8A28D8FC15 for ; Sat, 21 Aug 2010 13:47:46 +0000 (UTC) Received: by gyg4 with SMTP id 4so1903165gyg.13 for ; Sat, 21 Aug 2010 06:47:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:content-type :content-transfer-encoding:organization:date:message-id:mime-version :x-mailer; bh=pN1n4lq8mU4lAJMu5GK73HxUdkgUYgyiMj5Mrdq0WC8=; b=fl70JjZH1seikEyh/24t76pSGiD51sORfiyo4bY5pBTuy0qU0/mzMs6mi489pLSZC9 oTi5IemPxnAEpSAaREVZtvOSm6e1C2b0t4W+E+o7YR2yT/i7X5xJipvZ6eEZPrYzKeXq yNZQq8I7ytAsq9CJgIlDBhss7QoPDexfil7Ns= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:content-type:content-transfer-encoding:organization :date:message-id:mime-version:x-mailer; b=ldIpTcMmzOB9Ye9mJDSg5oxXD3bsOJKfd/4Hzcc0oxiYSCceyMcS6yzioYOU55gvgr fnsK06h+OhYJRVbP6CGFfPEcEpzRfenYYESyTQKHERxB5B3pqeo+9K8C9aVCIjEtQe0w SuJgvImSKp6nsxou2luZ8B/XbZpK1Wkv1/VM4= Received: by 10.150.69.30 with SMTP id r30mr3249570yba.43.1282398465683; Sat, 21 Aug 2010 06:47:45 -0700 (PDT) Received: from satcidananda.16x108.merseine.nu (adsl-152-64-246.asm.bellsouth.net [72.152.64.246]) by mx.google.com with ESMTPS id v6sm1435153ybm.23.2010.08.21.06.47.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 06:47:45 -0700 (PDT) From: indulekha To: freebsd-usb@freebsd.org Content-Type: text/plain; charset="ASCII" Content-Transfer-Encoding: quoted-printable Organization: what, me organize? Date: Sat, 21 Aug 2010 09:47:43 -0400 Message-ID: <1282398463.4367.1.camel@satcidananda> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 FreeBSD GNOME Team Port Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 13:47:46 -0000 On Sat, Aug 21, 2010 at 03:04:03PM +0200, Hans Petter Selasky wrote: > On Saturday 21 August 2010 14:03:16 Indi wrote: > > Hi list, > >=20 > > I recently bought a Seagate 320 GB portable USB HDD. > > Works perfectly with Linux and OS X, but in FreeBSD > > it has to be unplugged and replugged in order to show > > up in /dev/. > >=20 > > Is there a way to make it behave normally? >=20 > Try checking the USB Mass Storaquirks. See: >=20 > usbconfig -h > Thanks for that. Here's what I found, but I have no idea what to do with it: sudo usbconfig -u 4 -a 5 dump_device_desc ugen4.5: at usbus4, cfg=3D0 md=3DHOST spd=3DHIGH (480Mbp= s) pwr=3DON bLength =3D 0x0012=20 bDescriptorType =3D 0x0001=20 bcdUSB =3D 0x0200=20 bDeviceClass =3D 0x0000=20 bDeviceSubClass =3D 0x0000=20 bDeviceProtocol =3D 0x0000=20 bMaxPacketSize0 =3D 0x0040=20 idVendor =3D 0x0bc2=20 idProduct =3D 0x2300=20 bcdDevice =3D 0x0130=20 iManufacturer =3D 0x0001 iProduct =3D 0x0002 iSerialNumber =3D 0x0003 <2GH2P74N > bNumConfigurations =3D 0x0001=20 $ sudo usbconfig -u 4 -a 5 dump_device_quirks Dumping current device quirks: VID=3D0x0b05 PID=3D0x1726 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_HID_IGNO= RE VID=3D0x1608 PID=3D0x0001 REVLO=3D0x0094 REVHI=3D0x0094 QUIRK=3DUQ_SWAP_UNI= CODE VID=3D0x04fa PID=3D0x4201 REVLO=3D0x00a2 REVHI=3D0x00a2 QUIRK=3DUQ_BAD_ADC VID=3D0x04fa PID=3D0x4201 REVLO=3D0x00a2 REVHI=3D0x00a2 QUIRK=3DUQ_AU_NO_XU VID=3D0x04d2 PID=3D0x0070 REVLO=3D0x0103 REVHI=3D0x0103 QUIRK=3DUQ_BAD_ADC VID=3D0x04d2 PID=3D0xff05 REVLO=3D0x0000 REVHI=3D0x0000 QUIRK=3DUQ_BAD_AUDI= O VID=3D0x05c7 PID=3D0x2011 REVLO=3D0x0110 REVHI=3D0x0110 QUIRK=3DUQ_SPUR_BUT= _UP VID=3D0x0566 PID=3D0x2802 REVLO=3D0x0001 REVHI=3D0x0001 QUIRK=3DUQ_SPUR_BUT= _UP VID=3D0x0711 PID=3D0x0100 REVLO=3D0x0102 REVHI=3D0x0102 QUIRK=3DUQ_BUS_POWE= RED VID=3D0x0711 PID=3D0x0210 REVLO=3D0x0102 REVHI=3D0x0102 QUIRK=3DUQ_BUS_POWE= RED VID=3D0x0451 PID=3D0x1446 REVLO=3D0x0110 REVHI=3D0x0110 QUIRK=3DUQ_POWER_CL= AIM VID=3D0x0562 PID=3D0x0001 REVLO=3D0x0009 REVHI=3D0x0009 QUIRK=3DUQ_AU_NO_FR= AC VID=3D0x1527 PID=3D0x0201 REVLO=3D0x0100 REVHI=3D0x0100 QUIRK=3DUQ_AU_INP_A= SYNC VID=3D0x046d PID=3D0xc032 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_NO_STRIN= GS VID=3D0x03f0 PID=3D0x0004 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_BROKEN_B= IDIR VID=3D0x03f0 PID=3D0x0104 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_BROKEN_B= IDIR VID=3D0x03f0 PID=3D0x0204 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_BROKEN_B= IDIR VID=3D0x03f0 PID=3D0x0304 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_BROKEN_B= IDIR VID=3D0x03f0 PID=3D0x0404 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_BROKEN_B= IDIR VID=3D0x03f0 PID=3D0x0212 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_BROKEN_B= IDIR VID=3D0x0924 PID=3D0xffef REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_BROKEN_B= IDIR VID=3D0x051d PID=3D0x0002 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_HID_IGNO= RE VID=3D0x050d PID=3D0x0551 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_HID_IGNO= RE VID=3D0x0764 PID=3D0x0501 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_HID_IGNO= RE VID=3D0x1163 PID=3D0x0100 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_HID_IGNO= RE VID=3D0x04d8 PID=3D0x0002 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_HID_IGNO= RE VID=3D0x04d8 PID=3D0xc001 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_HID_IGNO= RE VID=3D0x0463 PID=3D0x0001 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_HID_IGNO= RE VID=3D0x0463 PID=3D0xffff REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_HID_IGNO= RE VID=3D0x05ac PID=3D0x1290 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_HID_IGNO= RE VID=3D0x05ac PID=3D0x1292 REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_HID_IGNO= RE VID=3D0x04b4 PID=3D0x0bad REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_KBD_IGNO= RE VID=3D0x04b4 PID=3D0x0bad REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_HID_IGNO= RE VID=3D0x1781 PID=3D0x083e REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_KBD_IGNO= RE VID=3D0x1781 PID=3D0x083e REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_HID_IGNO= RE VID=3D0x1130 PID=3D0xf211 REVLO=3D0x0101 REVHI=3D0x0101 QUIRK=3DUQ_AUDIO_SW= AP_LR VID=3D0x045e PID=3D0x008c REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_MS_LEADI= NG_BYTE VID=3D0x1781 PID=3D0x083f REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_KBD_IGNO= RE VID=3D0x1781 PID=3D0x083f REVLO=3D0x0000 REVHI=3D0xffff QUIRK=3DUQ_HID_IGNO= RE =20 From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 14:54:38 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 8CC9A1065673 for ; Sat, 21 Aug 2010 14:54:38 +0000 (UTC) (envelope-from thebeelzebubtrigger@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 418448FC29 for ; Sat, 21 Aug 2010 14:54:37 +0000 (UTC) Received: by yxe42 with SMTP id 42so1903995yxe.13 for ; Sat, 21 Aug 2010 07:54:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:content-transfer-encoding :organization:date:message-id:mime-version:x-mailer; bh=sOBhz7dqYPA3tmNME1C+wmPiVmgV2iDh9frDPQnk1ZM=; b=wt3vRG1ysW1Vl6fYiU/9sAA21Pw46SyqRD33Ss6OY3bmVN7EgXfuoB7bPZbiQO2yuh b6TR0A8AvKzIYaIifm8mbbc/Aj+QwGWzLVV6rynVx3Dt574AG33ChyVoWX8xNBPTKRTq J44WAa6v9OC/D6nCJ12zPoCoZ/op86QrE0zpE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type :content-transfer-encoding:organization:date:message-id:mime-version :x-mailer; b=CktDrC6rkdpwu/cvH2T4sbzouNLJ6S9RK8voDs3TSzEbTue9wOYyJ6jcAoMWvkol3u PNlddfYYyWV16Vc76PVhuPeVyxRJ4oc5/bh6Ac5vGnJTc7Sbi5Dn0G8VUqSIwtmClhbi DjfzLFwbJWwLHngXsBCa2rgphbdHT//ad16T4= Received: by 10.100.6.11 with SMTP id 11mr1814840anf.33.1282402476301; Sat, 21 Aug 2010 07:54:36 -0700 (PDT) Received: from satcidananda.16x108.merseine.nu (adsl-152-64-246.asm.bellsouth.net [72.152.64.246]) by mx.google.com with ESMTPS id f22sm6734446anh.24.2010.08.21.07.54.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 07:54:35 -0700 (PDT) From: indulekha To: Hans Petter Selasky In-Reply-To: <201008211637.52943.hselasky@c2i.net> References: <20100821120316.GA3352@satcidananda.16x108.merseine.nu> <201008211504.03243.hselasky@c2i.net> <20100821132944.GA4067@satcidananda.16x108.merseine.nu> <201008211637.52943.hselasky@c2i.net> Content-Type: text/plain; charset="ASCII" Content-Transfer-Encoding: quoted-printable Organization: what, me organize? Date: Sat, 21 Aug 2010 10:54:32 -0400 Message-ID: <1282402472.2030.2.camel@satcidananda> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 FreeBSD GNOME Team Port Cc: freebsd-usb@freebsd.org Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 14:54:38 -0000 On Sat, 2010-08-21 at 16:37 +0200, Hans Petter Selasky wrote: > There is a command to add quirks. Look at the source code: >=20 > grep UQ_ /sys/dev/usb/storage/umass.c >=20 > and look for UQ_ >=20 Thanks for the suggestion. Unfortunately the string "UQ_"=20 (or even "UQ") does not appear in umass.c. --=20 Indulekha From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 14:56:16 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 901931065696 for ; Sat, 21 Aug 2010 14:56:16 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 1ADA78FC16 for ; Sat, 21 Aug 2010 14:56:15 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=6KUfmzbym87FxoMGRWTr46e60yW4QTEOPMCHQyBOt0U= c=1 sm=1 a=H72ThNcfaIcA:10 a=8nJEP1OIZ-IA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=UH0mKKRQ6JA-vnDh_sUA:9 a=ANYz9sbukyWcqINeZuJUuxQetGsA:4 a=wPNLvfGTeEIA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:117 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 9153567; Sat, 21 Aug 2010 16:56:05 +0200 From: Hans Petter Selasky To: indulekha Date: Sat, 21 Aug 2010 16:52:28 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <20100821120316.GA3352@satcidananda.16x108.merseine.nu> <201008211637.52943.hselasky@c2i.net> <1282402472.2030.2.camel@satcidananda> In-Reply-To: <1282402472.2030.2.camel@satcidananda> 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: <201008211652.28344.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 14:56:16 -0000 On Saturday 21 August 2010 16:54:32 indulekha wrote: > On Sat, 2010-08-21 at 16:37 +0200, Hans Petter Selasky wrote: > > There is a command to add quirks. Look at the source code: > > > > grep UQ_ /sys/dev/usb/storage/umass.c > > > > and look for UQ_ > > Thanks for the suggestion. Unfortunately the string "UQ_" > (or even "UQ") does not appear in umass.c. Then you typed something wrong: grep UQ_ /sys/dev/usb/storage/umass.c if (usb_test_quirk(uaa, UQ_MSC_FORCE_WIRE_BBB)) { } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_WIRE_CBI)) { } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_WIRE_CBI_I)) { if (usb_test_quirk(uaa, UQ_MSC_FORCE_PROTO_SCSI)) { } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_PROTO_ATAPI)) { } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_PROTO_UFI)) { } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_PROTO_RBC)) { if (usb_test_quirk(uaa, UQ_MSC_NO_TEST_UNIT_READY)) if (usb_test_quirk(uaa, UQ_MSC_NO_RS_CLEAR_UA)) if (usb_test_quirk(uaa, UQ_MSC_NO_START_STOP)) if (usb_test_quirk(uaa, UQ_MSC_NO_GETMAXLUN)) if (usb_test_quirk(uaa, UQ_MSC_NO_INQUIRY)) if (usb_test_quirk(uaa, UQ_MSC_NO_INQUIRY_EVPD)) if (usb_test_quirk(uaa, UQ_MSC_NO_SYNC_CACHE)) if (usb_test_quirk(uaa, UQ_MSC_SHUTTLE_INIT)) if (usb_test_quirk(uaa, UQ_MSC_ALT_IFACE_1)) if (usb_test_quirk(uaa, UQ_MSC_FLOPPY_SPEED)) if (usb_test_quirk(uaa, UQ_MSC_IGNORE_RESIDUE)) if (usb_test_quirk(uaa, UQ_MSC_WRONG_CSWSIG)) if (usb_test_quirk(uaa, UQ_MSC_RBC_PAD_TO_12)) if (usb_test_quirk(uaa, UQ_MSC_READ_CAP_OFFBY1)) if (usb_test_quirk(uaa, UQ_MSC_FORCE_SHORT_INQ)) --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 14:57:52 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 47BE0106567A for ; Sat, 21 Aug 2010 14:57:52 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe11.tele2.se [212.247.155.65]) by mx1.freebsd.org (Postfix) with ESMTP id 9A2D58FC0C for ; Sat, 21 Aug 2010 14:57:51 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=H72ThNcfaIcA:10 a=8nJEP1OIZ-IA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=vfrwmJbJkze4Qoj40roA:9 a=7okk8MHgiIZzFPsgzwiiVTtxdM8A:4 a=wPNLvfGTeEIA:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe11.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 1252457896; Sat, 21 Aug 2010 16:57:49 +0200 From: Hans Petter Selasky To: indulekha Date: Sat, 21 Aug 2010 16:54:03 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <20100821120316.GA3352@satcidananda.16x108.merseine.nu> <1282402472.2030.2.camel@satcidananda> <201008211652.28344.hselasky@c2i.net> In-Reply-To: <201008211652.28344.hselasky@c2i.net> 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: <201008211654.03995.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 14:57:52 -0000 On Saturday 21 August 2010 16:52:28 Hans Petter Selasky wrote: > On Saturday 21 August 2010 16:54:32 indulekha wrote: > > On Sat, 2010-08-21 at 16:37 +0200, Hans Petter Selasky wrote: > > > There is a command to add quirks. Look at the source code: > > > > > > grep UQ_ /sys/dev/usb/storage/umass.c > > > > > > and look for UQ_ > > > > Thanks for the suggestion. Unfortunately the string "UQ_" > > (or even "UQ") does not appear in umass.c. > > Then you typed something wrong: > > grep UQ_ /sys/dev/usb/storage/umass.c > if (usb_test_quirk(uaa, UQ_MSC_FORCE_WIRE_BBB)) { > } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_WIRE_CBI)) { > } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_WIRE_CBI_I)) { > if (usb_test_quirk(uaa, UQ_MSC_FORCE_PROTO_SCSI)) { > } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_PROTO_ATAPI)) { > } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_PROTO_UFI)) { > } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_PROTO_RBC)) { > if (usb_test_quirk(uaa, UQ_MSC_NO_TEST_UNIT_READY)) > if (usb_test_quirk(uaa, UQ_MSC_NO_RS_CLEAR_UA)) > if (usb_test_quirk(uaa, UQ_MSC_NO_START_STOP)) > if (usb_test_quirk(uaa, UQ_MSC_NO_GETMAXLUN)) > if (usb_test_quirk(uaa, UQ_MSC_NO_INQUIRY)) > if (usb_test_quirk(uaa, UQ_MSC_NO_INQUIRY_EVPD)) > if (usb_test_quirk(uaa, UQ_MSC_NO_SYNC_CACHE)) > if (usb_test_quirk(uaa, UQ_MSC_SHUTTLE_INIT)) > if (usb_test_quirk(uaa, UQ_MSC_ALT_IFACE_1)) > if (usb_test_quirk(uaa, UQ_MSC_FLOPPY_SPEED)) > if (usb_test_quirk(uaa, UQ_MSC_IGNORE_RESIDUE)) > if (usb_test_quirk(uaa, UQ_MSC_WRONG_CSWSIG)) > if (usb_test_quirk(uaa, UQ_MSC_RBC_PAD_TO_12)) > if (usb_test_quirk(uaa, UQ_MSC_READ_CAP_OFFBY1)) > if (usb_test_quirk(uaa, UQ_MSC_FORCE_SHORT_INQ)) > > --HPS Hi, Another suggestion: Look in the dmesg and see if there are any errors. --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 15:06:31 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 EF49C1065672 for ; Sat, 21 Aug 2010 15:06:31 +0000 (UTC) (envelope-from chungyeol.lee@gmail.com) Received: from mail-px0-f196.google.com (mail-px0-f196.google.com [209.85.212.196]) by mx1.freebsd.org (Postfix) with ESMTP id BC2B48FC08 for ; Sat, 21 Aug 2010 15:06:31 +0000 (UTC) Received: by pxi9 with SMTP id 9so618306pxi.7 for ; Sat, 21 Aug 2010 08:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:resent-from:resent-date :resent-message-id:resent-to:date:from:to:subject:message-id :reply-to:mime-version:content-type:content-disposition:organazation :user-agent; bh=Y/PIYk1mp62kvhh2/hg7gn12lgzfKVgklTS8hH+lOBo=; b=HnLjgzyauerXMfElLZfSRUF4ySixTIg9PSEx6BnK9T5VGQRj1GpOTuRTcX63JKim3d hwDjSfhDv1JWjV6hxW8p7StojCD4LqOmBPE690BIixE6ub2dYOrOJk1EP/dVGq7NwWCz FurM8fljLr+AM5amAUWFay8P8oZEseOXsulyM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=resent-from:resent-date:resent-message-id:resent-to:date:from:to :subject:message-id:reply-to:mime-version:content-type :content-disposition:organazation:user-agent; b=IfPmt6HnwLLg41JiyCDGQtBAyBysRajjtbd+xshHoHJkNHKmmFuBcSNmSqEDNh46an ZPREbWrZlaYBlDLsfllny1/FAM9U0tSR8UlMYoQ1jjli2YzAD4Y9rr0xHiGnUB0B2E2s v/LQnLojFRAsPCXl8ZWw7nP+5GcwFXNNdJQ/k= Received: by 10.114.134.9 with SMTP id h9mr3196827wad.5.1282402381125; Sat, 21 Aug 2010 07:53:01 -0700 (PDT) Received: from genie.honey.home ([124.57.9.45]) by mx.google.com with ESMTPS id g4sm7438546wae.14.2010.08.21.07.52.59 (version=SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 07:53:00 -0700 (PDT) Resent-From: Chung-Yeol Lee Resent-Date: Sat, 21 Aug 2010 23:52:53 +0900 Resent-Message-ID: <20100821145253.GA1846@genie.honey.home> Resent-To: freebsd-usb@freebsd.org Date: Sat, 21 Aug 2010 17:23:06 +0900 From: "Lee, Chung-Yeol" To: freebsd-questions@freebsd.org Message-ID: <20100821082306.GA2204@genie.honey.home> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="/9DWx/yDrRhgMJTb" Content-Disposition: inline Organazation: KAIST User-Agent: Mutt/1.5.20 (2009-06-14) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Use extra buttons of Kensington Slimblade Trackball X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Lee, Chung-Yeol" List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Aug 2010 15:06:32 -0000 --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, While I'm searching how to use the extra buttons in Kensington Slimblade Trackball, I made a patch for myself based on the linux driver. I confirmed it works as intended. However, I have no experience with the FreeBSD kernel and I'm not sure that I modified it in a correct way. -- especially, I don't know should I use usb_quirks? Can somebody check the attached diff file so that I can send problem report? Thanks. --/9DWx/yDrRhgMJTb-- From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 15:08:50 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 B23BE106567A for ; Sat, 21 Aug 2010 15:08:50 +0000 (UTC) (envelope-from thebeelzebubtrigger@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2F87D8FC12 for ; Sat, 21 Aug 2010 15:08:49 +0000 (UTC) Received: by gyg4 with SMTP id 4so1921523gyg.13 for ; Sat, 21 Aug 2010 08:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:content-transfer-encoding :organization:date:message-id:mime-version:x-mailer; bh=r4TWmeoNeiysvSkOnWLZ2+p74XfEmHBDSooX+H7uxAQ=; b=tLpIAF9g5ghb+NEi1a1QezN8HQiYocJdR8vJ2Esn9Pn78yAkUNlh5F4kEpwzOl6kKh I5ycV51Q4SVKlsSs5s61A2XDexT6eCkXOAVOVfP/8VCp7q+DFBTDqAUPJU7HAwTXY6x3 kMhTRd7JehvMRRW1feFg6I26A84Nwe0x48uiE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type :content-transfer-encoding:organization:date:message-id:mime-version :x-mailer; b=WZLc56tz+2GMWQCshDeUiHR7+6DgpgCpO7WG4g197F9zqRkHoJa8WCIiu+SDV9gxy8 6VmupsPvLuN7Ng5d8SptG9JHm0DlRywKHN7pnanpITDQMfa7ux5atsbEWkQCq/i7UmhI 0oxSyiWQCPqN+yZgJodgN60Bfv+H9Xs2wffx4= Received: by 10.100.54.19 with SMTP id c19mr3197696ana.71.1282403329231; Sat, 21 Aug 2010 08:08:49 -0700 (PDT) Received: from satcidananda.16x108.merseine.nu (adsl-152-64-246.asm.bellsouth.net [72.152.64.246]) by mx.google.com with ESMTPS id a12sm6754659and.16.2010.08.21.08.08.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 08:08:48 -0700 (PDT) From: indulekha To: Hans Petter Selasky In-Reply-To: <201008211652.28344.hselasky@c2i.net> References: <20100821120316.GA3352@satcidananda.16x108.merseine.nu> <201008211637.52943.hselasky@c2i.net> <1282402472.2030.2.camel@satcidananda> <201008211652.28344.hselasky@c2i.net> Content-Type: text/plain; charset="ASCII" Content-Transfer-Encoding: quoted-printable Organization: what, me organize? Date: Sat, 21 Aug 2010 11:08:44 -0400 Message-ID: <1282403324.2030.10.camel@satcidananda> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 FreeBSD GNOME Team Port Cc: freebsd-usb@freebsd.org Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 15:08:50 -0000 On Sat, 2010-08-21 at 16:52 +0200, Hans Petter Selasky wrote: > On Saturday 21 August 2010 16:54:32 indulekha wrote: > > On Sat, 2010-08-21 at 16:37 +0200, Hans Petter Selasky wrote: > > > There is a command to add quirks. Look at the source code: > > >=20 > > > grep UQ_ /sys/dev/usb/storage/umass.c > > >=20 > > > and look for UQ_ > >=20 > > Thanks for the suggestion. Unfortunately the string "UQ_" > > (or even "UQ") does not appear in umass.c. >=20 > Then you typed something wrong: >=20 > grep UQ_ /sys/dev/usb/storage/umass.c > if (usb_test_quirk(uaa, UQ_MSC_FORCE_WIRE_BBB)) { > } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_WIRE_CBI)) { > } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_WIRE_CBI_I)) { > if (usb_test_quirk(uaa, UQ_MSC_FORCE_PROTO_SCSI)) { > } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_PROTO_ATAPI)) { > } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_PROTO_UFI)) { > } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_PROTO_RBC)) { > if (usb_test_quirk(uaa, UQ_MSC_NO_TEST_UNIT_READY)) > if (usb_test_quirk(uaa, UQ_MSC_NO_RS_CLEAR_UA)) > if (usb_test_quirk(uaa, UQ_MSC_NO_START_STOP)) > if (usb_test_quirk(uaa, UQ_MSC_NO_GETMAXLUN)) > if (usb_test_quirk(uaa, UQ_MSC_NO_INQUIRY)) > if (usb_test_quirk(uaa, UQ_MSC_NO_INQUIRY_EVPD)) > if (usb_test_quirk(uaa, UQ_MSC_NO_SYNC_CACHE)) > if (usb_test_quirk(uaa, UQ_MSC_SHUTTLE_INIT)) > if (usb_test_quirk(uaa, UQ_MSC_ALT_IFACE_1)) > if (usb_test_quirk(uaa, UQ_MSC_FLOPPY_SPEED)) > if (usb_test_quirk(uaa, UQ_MSC_IGNORE_RESIDUE)) > if (usb_test_quirk(uaa, UQ_MSC_WRONG_CSWSIG)) > if (usb_test_quirk(uaa, UQ_MSC_RBC_PAD_TO_12)) > if (usb_test_quirk(uaa, UQ_MSC_READ_CAP_OFFBY1)) > if (usb_test_quirk(uaa, UQ_MSC_FORCE_SHORT_INQ)) >=20 > --HPS Well, see for yourself then: $ grep UQ_ /sys/dev/usb/storage/umass.c indulekha@satcidananda[~] [11:02]:$=20 Nada. Here's the entire file /sys/dev/usb/storage/umass.c, the string=20 you specified does not appear anywhere in it: #include __FBSDID("$FreeBSD: src/sys/dev/usb/storage/umass.c,v 1.21.2.2.2.1 2009/10/= 25 01:10:29 kensmith Exp $"); /*- * Copyright (c) 1999 MAEKAWA Masahide , * Nick Hibma * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO= SE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI= AL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI= CT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WA= Y * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/usb/storage/umass.c,v 1.21.2.2.2.1 2009/10/25 01:1= 0:29 kensmith Exp $ * $NetBSD: umass.c,v 1.28 2000/04/02 23:46:53 augustss Exp $ */ /* Also already merged from NetBSD: * $NetBSD: umass.c,v 1.67 2001/11/25 19:05:22 augustss Exp $ * $NetBSD: umass.c,v 1.90 2002/11/04 19:17:33 pooka Exp $ * $NetBSD: umass.c,v 1.108 2003/11/07 17:03:25 wiz Exp $ * $NetBSD: umass.c,v 1.109 2003/12/04 13:57:31 keihan Exp $ */ /* * Universal Serial Bus Mass Storage Class specs: * http://www.usb.org/developers/devclass_docs/usb_msc_overview_1.2.pdf * http://www.usb.org/developers/devclass_docs/usbmassbulk_10.pdf * http://www.usb.org/developers/devclass_docs/usb_msc_cbi_1.1.pdf * http://www.usb.org/developers/devclass_docs/usbmass-ufi10.pdf */ /* * Ported to NetBSD by Lennart Augustsson . * Parts of the code written by Jason R. Thorpe . */ /* * The driver handles 3 Wire Protocols * - Command/Bulk/Interrupt (CBI) * - Command/Bulk/Interrupt with Command Completion Interrupt (CBI with CCI= ) * - Mass Storage Bulk-Only (BBB) * (BBB refers Bulk/Bulk/Bulk for Command/Data/Status phases) * * Over these wire protocols it handles the following command protocols * - SCSI * - UFI (floppy command set) * - 8070i (ATAPI) * * UFI and 8070i (ATAPI) are transformed versions of the SCSI command set. = The * sc->sc_transform method is used to convert the commands into the appropr= iate * format (if at all necessary). For example, UFI requires all commands to = be * 12 bytes in length amongst other things. * * The source code below is marked and can be split into a number of pieces * (in this order): * * - probe/attach/detach * - generic transfer routines * - BBB * - CBI * - CBI_I (in addition to functions from CBI) * - CAM (Common Access Method) * - SCSI * - UFI * - 8070i (ATAPI) * * The protocols are implemented using a state machine, for the transfers a= s * well as for the resets. The state machine is contained in umass_t_*_call= back. * The state machine is started through either umass_command_start() or * umass_reset(). * * The reason for doing this is a) CAM performs a lot better this way and b= ) it * avoids using tsleep from interrupt context (for example after a failed * transfer). */ /* * The SCSI related part of this driver has been derived from the * dev/ppbus/vpo.c driver, by Nicolas Souchu (nsouch@FreeBSD.org). * * The CAM layer uses so called actions which are messages sent to the host * adapter for completion. The actions come in through umass_cam_action. Th= e * appropriate block of routines is called depending on the transport proto= col * in use. When the transfer has finished, these routines call * umass_cam_cb again to complete the CAM command. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "usbdevs.h" #include #include #include #include #include #include #include #define UMASS_EXT_BUFFER #ifdef UMASS_EXT_BUFFER /* this enables loading of virtual buffers into DMA */ #define UMASS_USB_FLAGS .ext_buffer=3D1, #else #define UMASS_USB_FLAGS #endif #if USB_DEBUG #define DIF(m, x) \ do { \ if (umass_debug & (m)) { x ; } \ } while (0) #define DPRINTF(sc, m, fmt, ...) \ do { \ if (umass_debug & (m)) { \ printf("%s:%s: " fmt, \ (sc) ? (const char *)(sc)->sc_name : \ (const char *)"umassX", \ __FUNCTION__ ,## __VA_ARGS__); \ } \ } while (0) #define UDMASS_GEN 0x00010000 /* general */ #define UDMASS_SCSI 0x00020000 /* scsi */ #define UDMASS_UFI 0x00040000 /* ufi command set */ #define UDMASS_ATAPI 0x00080000 /* 8070i command set */ #define UDMASS_CMD (UDMASS_SCSI|UDMASS_UFI|UDMASS_ATAPI) #define UDMASS_USB 0x00100000 /* USB general */ #define UDMASS_BBB 0x00200000 /* Bulk-Only transfers */ #define UDMASS_CBI 0x00400000 /* CBI transfers */ #define UDMASS_WIRE (UDMASS_BBB|UDMASS_CBI) #define UDMASS_ALL 0xffff0000 /* all of the above */ static int umass_debug =3D 0; SYSCTL_NODE(_hw_usb, OID_AUTO, umass, CTLFLAG_RW, 0, "USB umass"); SYSCTL_INT(_hw_usb_umass, OID_AUTO, debug, CTLFLAG_RW, &umass_debug, 0, "umass debug level"); #else #define DIF(...) do { } while (0) #define DPRINTF(...) do { } while (0) #endif #define UMASS_GONE ((struct umass_softc *)1) #define UMASS_BULK_SIZE (1 << 17) #define UMASS_CBI_DIAGNOSTIC_CMDLEN 12 /* bytes */ #define UMASS_MAX_CMDLEN MAX(12, CAM_MAX_CDBLEN) /* bytes */ /* USB transfer definitions */ #define UMASS_T_BBB_RESET1 0 /* Bulk-Only */ #define UMASS_T_BBB_RESET2 1 #define UMASS_T_BBB_RESET3 2 #define UMASS_T_BBB_COMMAND 3 #define UMASS_T_BBB_DATA_READ 4 #define UMASS_T_BBB_DATA_RD_CS 5 #define UMASS_T_BBB_DATA_WRITE 6 #define UMASS_T_BBB_DATA_WR_CS 7 #define UMASS_T_BBB_STATUS 8 #define UMASS_T_BBB_MAX 9 #define UMASS_T_CBI_RESET1 0 /* CBI */ #define UMASS_T_CBI_RESET2 1 #define UMASS_T_CBI_RESET3 2 #define UMASS_T_CBI_COMMAND 3 #define UMASS_T_CBI_DATA_READ 4 #define UMASS_T_CBI_DATA_RD_CS 5 #define UMASS_T_CBI_DATA_WRITE 6 #define UMASS_T_CBI_DATA_WR_CS 7 #define UMASS_T_CBI_STATUS 8 #define UMASS_T_CBI_RESET4 9 #define UMASS_T_CBI_MAX 10 #define UMASS_T_MAX MAX(UMASS_T_CBI_MAX, UMASS_T_BBB_MAX) /* Generic definitions */ /* Direction for transfer */ #define DIR_NONE 0 #define DIR_IN 1 #define DIR_OUT 2 /* device name */ #define DEVNAME "umass" #define DEVNAME_SIM "umass-sim" /* Approximate maximum transfer speeds (assumes 33% overhead). */ #define UMASS_FULL_TRANSFER_SPEED 1000 #define UMASS_HIGH_TRANSFER_SPEED 40000 #define UMASS_FLOPPY_TRANSFER_SPEED 20 #define UMASS_TIMEOUT 5000 /* ms */ /* CAM specific definitions */ #define UMASS_SCSIID_MAX 1 /* maximum number of drives expected */ #define UMASS_SCSIID_HOST UMASS_SCSIID_MAX /* Bulk-Only features */ #define UR_BBB_RESET 0xff /* Bulk-Only reset */ #define UR_BBB_GET_MAX_LUN 0xfe /* Get maximum lun */ /* Command Block Wrapper */ typedef struct { uDWord dCBWSignature; #define CBWSIGNATURE 0x43425355 uDWord dCBWTag; uDWord dCBWDataTransferLength; uByte bCBWFlags; #define CBWFLAGS_OUT 0x00 #define CBWFLAGS_IN 0x80 uByte bCBWLUN; uByte bCDBLength; #define CBWCDBLENGTH 16 uByte CBWCDB[CBWCDBLENGTH]; } __packed umass_bbb_cbw_t; #define UMASS_BBB_CBW_SIZE 31 /* Command Status Wrapper */ typedef struct { uDWord dCSWSignature; #define CSWSIGNATURE 0x53425355 #define CSWSIGNATURE_IMAGINATION_DBX1 0x43425355 #define CSWSIGNATURE_OLYMPUS_C1 0x55425355 uDWord dCSWTag; uDWord dCSWDataResidue; uByte bCSWStatus; #define CSWSTATUS_GOOD 0x0 #define CSWSTATUS_FAILED 0x1 #define CSWSTATUS_PHASE 0x2 } __packed umass_bbb_csw_t; #define UMASS_BBB_CSW_SIZE 13 /* CBI features */ #define UR_CBI_ADSC 0x00 typedef union { struct { uint8_t type; #define IDB_TYPE_CCI 0x00 uint8_t value; #define IDB_VALUE_PASS 0x00 #define IDB_VALUE_FAIL 0x01 #define IDB_VALUE_PHASE 0x02 #define IDB_VALUE_PERSISTENT 0x03 #define IDB_VALUE_STATUS_MASK 0x03 } __packed common; struct { uint8_t asc; uint8_t ascq; } __packed ufi; } __packed umass_cbi_sbl_t; struct umass_softc; /* see below */ typedef void (umass_callback_t)(struct umass_softc *sc, union ccb *ccb, uint32_t residue, uint8_t status); #define STATUS_CMD_OK 0 /* everything ok */ #define STATUS_CMD_UNKNOWN 1 /* will have to fetch sense */ #define STATUS_CMD_FAILED 2 /* transfer was ok, command failed */ #define STATUS_WIRE_FAILED 3 /* couldn't even get command across */ typedef uint8_t (umass_transform_t)(struct umass_softc *sc, uint8_t *cmd_pt= r, uint8_t cmd_len); struct umass_devdescr { uint32_t vid; #define VID_WILDCARD 0xffffffff #define VID_EOT 0xfffffffe uint32_t pid; #define PID_WILDCARD 0xffffffff #define PID_EOT 0xfffffffe uint32_t rid; #define RID_WILDCARD 0xffffffff #define RID_EOT 0xfffffffe /* wire and command protocol */ uint16_t proto; #define UMASS_PROTO_DEFAULT 0x0000 /* use protocol indicated by USB descrip= tors */ #define UMASS_PROTO_BBB 0x0001 /* USB wire protocol */ #define UMASS_PROTO_CBI 0x0002 #define UMASS_PROTO_CBI_I 0x0004 #define UMASS_PROTO_WIRE 0x00ff /* USB wire protocol mask */ #define UMASS_PROTO_SCSI 0x0100 /* command protocol */ #define UMASS_PROTO_ATAPI 0x0200 #define UMASS_PROTO_UFI 0x0400 #define UMASS_PROTO_RBC 0x0800 #define UMASS_PROTO_COMMAND 0xff00 /* command protocol mask */ /* Device specific quirks */ uint16_t quirks; #define NO_QUIRKS 0x0000 /* * The drive does not support Test Unit Ready. Convert to Start Unit */ #define NO_TEST_UNIT_READY 0x0001 /* * The drive does not reset the Unit Attention state after REQUEST * SENSE has been sent. The INQUIRY command does not reset the UA * either, and so CAM runs in circles trying to retrieve the initial * INQUIRY data. */ #define RS_NO_CLEAR_UA 0x0002 /* The drive does not support START STOP. */ #define NO_START_STOP 0x0004 /* Don't ask for full inquiry data (255b). */ #define FORCE_SHORT_INQUIRY 0x0008 /* Needs to be initialised the Shuttle way */ #define SHUTTLE_INIT 0x0010 /* Drive needs to be switched to alternate iface 1 */ #define ALT_IFACE_1 0x0020 /* Drive does not do 1Mb/s, but just floppy speeds (20kb/s) */ #define FLOPPY_SPEED 0x0040 /* The device can't count and gets the residue of transfers wrong */ #define IGNORE_RESIDUE 0x0080 /* No GetMaxLun call */ #define NO_GETMAXLUN 0x0100 /* The device uses a weird CSWSIGNATURE. */ #define WRONG_CSWSIG 0x0200 /* Device cannot handle INQUIRY so fake a generic response */ #define NO_INQUIRY 0x0400 /* Device cannot handle INQUIRY EVPD, return CHECK CONDITION */ #define NO_INQUIRY_EVPD 0x0800 /* Pad all RBC requests to 12 bytes. */ #define RBC_PAD_TO_12 0x1000 /* * Device reports number of sectors from READ_CAPACITY, not max * sector number. */ #define READ_CAPACITY_OFFBY1 0x2000 /* * Device cannot handle a SCSI synchronize cache command. Normally * this quirk would be handled in the cam layer, but for IDE bridges * we need to associate the quirk with the bridge and not the * underlying disk device. This is handled by faking a success * result. */ #define NO_SYNCHRONIZE_CACHE 0x4000 }; static const struct umass_devdescr umass_devdescr[] =3D { {USB_VENDOR_ASAHIOPTICAL, PID_WILDCARD, RID_WILDCARD, UMASS_PROTO_DEFAULT, RS_NO_CLEAR_UA }, {USB_VENDOR_ADDON, USB_PRODUCT_ADDON_ATTACHE, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, IGNORE_RESIDUE }, {USB_VENDOR_ADDON, USB_PRODUCT_ADDON_A256MB, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, IGNORE_RESIDUE }, {USB_VENDOR_ADDON, USB_PRODUCT_ADDON_DISKPRO512, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, IGNORE_RESIDUE }, {USB_VENDOR_ADDONICS2, USB_PRODUCT_ADDONICS2_CABLE_205, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_AIPTEK, USB_PRODUCT_AIPTEK_POCKETCAM3M, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_AIPTEK2, USB_PRODUCT_AIPTEK2_SUNPLUS_TECH, RID_WILDCARD, UMASS_PROTO_DEFAULT, NO_SYNCHRONIZE_CACHE }, {USB_VENDOR_ALCOR, USB_PRODUCT_ALCOR_AU6390, RID_WILDCARD, UMASS_PROTO_DEFAULT, NO_SYNCHRONIZE_CACHE }, {USB_VENDOR_ALCOR, USB_PRODUCT_ALCOR_UMCR_9361, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_GETMAXLUN }, {USB_VENDOR_ALCOR, USB_PRODUCT_ALCOR_TRANSCEND, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_GETMAXLUN }, {USB_VENDOR_ASAHIOPTICAL, USB_PRODUCT_ASAHIOPTICAL_OPTIO230, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY }, {USB_VENDOR_ASAHIOPTICAL, USB_PRODUCT_ASAHIOPTICAL_OPTIO330, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY }, {USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_USB2SCSI, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_CASIO, USB_PRODUCT_CASIO_QV_DIGICAM, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_CBI, NO_INQUIRY }, {USB_VENDOR_CCYU, USB_PRODUCT_CCYU_ED1064, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_CENTURY, USB_PRODUCT_CENTURY_EX35QUAT, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE }, {USB_VENDOR_CYPRESS, USB_PRODUCT_CYPRESS_XX6830XX, RID_WILDCARD, UMASS_PROTO_DEFAULT, NO_GETMAXLUN | NO_SYNCHRONIZE_CACHE }, {USB_VENDOR_DESKNOTE, USB_PRODUCT_DESKNOTE_UCR_61S2B, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_DMI, USB_PRODUCT_DMI_CFSM_RW, RID_WILDCARD, UMASS_PROTO_SCSI, NO_GETMAXLUN }, {USB_VENDOR_EPSON, USB_PRODUCT_EPSON_STYLUS_875DC, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_CBI, NO_INQUIRY }, {USB_VENDOR_EPSON, USB_PRODUCT_EPSON_STYLUS_895, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_GETMAXLUN }, {USB_VENDOR_FEIYA, USB_PRODUCT_FEIYA_5IN1, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_FREECOM, USB_PRODUCT_FREECOM_DVD, RID_WILDCARD, UMASS_PROTO_SCSI, NO_QUIRKS }, {USB_VENDOR_FUJIPHOTO, USB_PRODUCT_FUJIPHOTO_MASS0100, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I, RS_NO_CLEAR_UA }, {USB_VENDOR_GENESYS, USB_PRODUCT_GENESYS_GL641USB2IDE, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE | NO_SYNCHRONIZE_CACHE }, {USB_VENDOR_GENESYS, USB_PRODUCT_GENESYS_GL641USB2IDE_2, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_BBB, FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE }, {USB_VENDOR_GENESYS, USB_PRODUCT_GENESYS_GL641USB, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE }, {USB_VENDOR_GENESYS, USB_PRODUCT_GENESYS_GL641USB_2, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, WRONG_CSWSIG }, {USB_VENDOR_HAGIWARA, USB_PRODUCT_HAGIWARA_FG, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_HAGIWARA, USB_PRODUCT_HAGIWARA_FGSM, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_HITACHI, USB_PRODUCT_HITACHI_DVDCAM_DZ_MV100A, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_CBI, NO_GETMAXLUN }, {USB_VENDOR_HITACHI, USB_PRODUCT_HITACHI_DVDCAM_USB, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I, NO_INQUIRY }, {USB_VENDOR_HP, USB_PRODUCT_HP_CDW4E, RID_WILDCARD, UMASS_PROTO_ATAPI, NO_QUIRKS }, {USB_VENDOR_HP, USB_PRODUCT_HP_CDW8200, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I, NO_TEST_UNIT_READY | NO_START_STOP }, {USB_VENDOR_IMAGINATION, USB_PRODUCT_IMAGINATION_DBX1, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, WRONG_CSWSIG }, {USB_VENDOR_INSYSTEM, USB_PRODUCT_INSYSTEM_USBCABLE, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI, NO_TEST_UNIT_READY | NO_START_STOP | ALT_IFACE_1 }, {USB_VENDOR_INSYSTEM, USB_PRODUCT_INSYSTEM_ATAPI, RID_WILDCARD, UMASS_PROTO_RBC | UMASS_PROTO_CBI, NO_QUIRKS }, {USB_VENDOR_INSYSTEM, USB_PRODUCT_INSYSTEM_STORAGE_V2, RID_WILDCARD, UMASS_PROTO_RBC | UMASS_PROTO_CBI, NO_QUIRKS }, {USB_VENDOR_IODATA, USB_PRODUCT_IODATA_IU_CD2, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_IODATA, USB_PRODUCT_IODATA_DVR_UEH8, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_IOMEGA, USB_PRODUCT_IOMEGA_ZIP100, RID_WILDCARD, /* * XXX This is not correct as there are Zip drives that use * ATAPI. */ UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_TEST_UNIT_READY }, {USB_VENDOR_KYOCERA, USB_PRODUCT_KYOCERA_FINECAM_L3, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY }, {USB_VENDOR_KYOCERA, USB_PRODUCT_KYOCERA_FINECAM_S3X, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI, NO_INQUIRY }, {USB_VENDOR_KYOCERA, USB_PRODUCT_KYOCERA_FINECAM_S4, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI, NO_INQUIRY }, {USB_VENDOR_KYOCERA, USB_PRODUCT_KYOCERA_FINECAM_S5, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY }, {USB_VENDOR_LACIE, USB_PRODUCT_LACIE_HD, RID_WILDCARD, UMASS_PROTO_RBC | UMASS_PROTO_CBI, NO_QUIRKS }, {USB_VENDOR_LEXAR, USB_PRODUCT_LEXAR_CF_READER, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY }, {USB_VENDOR_LEXAR, USB_PRODUCT_LEXAR_JUMPSHOT, RID_WILDCARD, UMASS_PROTO_SCSI, NO_QUIRKS }, {USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_LDR_H443SU2, RID_WILDCARD, UMASS_PROTO_SCSI, NO_QUIRKS }, {USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_LDR_H443U2, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_MELCO, USB_PRODUCT_MELCO_DUBPXXG, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE }, {USB_VENDOR_MICROTECH, USB_PRODUCT_MICROTECH_DPCM, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_CBI, NO_TEST_UNIT_READY | NO_START_STOP }, {USB_VENDOR_MICROTECH, USB_PRODUCT_MICROTECH_SCSIDB25, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_MICROTECH, USB_PRODUCT_MICROTECH_SCSIHD50, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_MINOLTA, USB_PRODUCT_MINOLTA_E223, RID_WILDCARD, UMASS_PROTO_SCSI, NO_QUIRKS }, {USB_VENDOR_MINOLTA, USB_PRODUCT_MINOLTA_F300, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_MITSUMI, USB_PRODUCT_MITSUMI_CDRRW, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI, NO_QUIRKS }, {USB_VENDOR_MITSUMI, USB_PRODUCT_MITSUMI_FDD, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_GETMAXLUN }, {USB_VENDOR_MOTOROLA2, USB_PRODUCT_MOTOROLA2_E398, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, FORCE_SHORT_INQUIRY | NO_INQUIRY_EVPD | NO_GETMAXLUN }, {USB_VENDOR_MPMAN, PID_WILDCARD, RID_WILDCARD, UMASS_PROTO_DEFAULT, NO_SYNCHRONIZE_CACHE }, {USB_VENDOR_MSYSTEMS, USB_PRODUCT_MSYSTEMS_DISKONKEY, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, IGNORE_RESIDUE | NO_GETMAXLUN | RS_NO_CLEAR_UA }, {USB_VENDOR_MSYSTEMS, USB_PRODUCT_MSYSTEMS_DISKONKEY2, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_MYSON, USB_PRODUCT_MYSON_HEDEN, RID_WILDCARD, UMASS_PROTO_DEFAULT, IGNORE_RESIDUE | NO_SYNCHRONIZE_CACHE }, {USB_VENDOR_MYSON, USB_PRODUCT_MYSON_HEDEN_8813, RID_WILDCARD, UMASS_PROTO_DEFAULT, NO_SYNCHRONIZE_CACHE }, {USB_VENDOR_MYSON, USB_PRODUCT_MYSON_STARREADER, RID_WILDCARD, UMASS_PROTO_DEFAULT, NO_SYNCHRONIZE_CACHE }, {USB_VENDOR_NEODIO, USB_PRODUCT_NEODIO_ND3260, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, FORCE_SHORT_INQUIRY }, {USB_VENDOR_NETAC, USB_PRODUCT_NETAC_CF_CARD, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY }, {USB_VENDOR_NETAC, USB_PRODUCT_NETAC_ONLYDISK, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, IGNORE_RESIDUE }, {USB_VENDOR_NETCHIP, USB_PRODUCT_NETCHIP_CLIK_40, RID_WILDCARD, UMASS_PROTO_ATAPI, NO_INQUIRY }, {USB_VENDOR_NIKON, USB_PRODUCT_NIKON_D300, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_OLYMPUS, USB_PRODUCT_OLYMPUS_C1, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, WRONG_CSWSIG }, {USB_VENDOR_OLYMPUS, USB_PRODUCT_OLYMPUS_C700, RID_WILDCARD, UMASS_PROTO_SCSI, NO_GETMAXLUN }, {USB_VENDOR_ONSPEC, USB_PRODUCT_ONSPEC_SDS_HOTFIND_D, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_GETMAXLUN | NO_SYNCHRONIZE_CACHE }, {USB_VENDOR_ONSPEC, USB_PRODUCT_ONSPEC_CFMS_RW, RID_WILDCARD, UMASS_PROTO_SCSI, NO_QUIRKS }, {USB_VENDOR_ONSPEC, USB_PRODUCT_ONSPEC_CFSM_COMBO, RID_WILDCARD, UMASS_PROTO_SCSI, NO_QUIRKS }, {USB_VENDOR_ONSPEC, USB_PRODUCT_ONSPEC_CFSM_READER, RID_WILDCARD, UMASS_PROTO_SCSI, NO_QUIRKS }, {USB_VENDOR_ONSPEC, USB_PRODUCT_ONSPEC_CFSM_READER2, RID_WILDCARD, UMASS_PROTO_SCSI, NO_QUIRKS }, {USB_VENDOR_ONSPEC, USB_PRODUCT_ONSPEC_MDCFE_B_CF_READER, RID_WILDCARD, UMASS_PROTO_SCSI, NO_QUIRKS }, {USB_VENDOR_ONSPEC, USB_PRODUCT_ONSPEC_MDSM_B_READER, RID_WILDCARD, UMASS_PROTO_SCSI, NO_INQUIRY }, {USB_VENDOR_ONSPEC, USB_PRODUCT_ONSPEC_READER, RID_WILDCARD, UMASS_PROTO_SCSI, NO_QUIRKS }, {USB_VENDOR_ONSPEC, USB_PRODUCT_ONSPEC_UCF100, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_BBB, NO_INQUIRY | NO_GETMAXLUN }, {USB_VENDOR_ONSPEC2, USB_PRODUCT_ONSPEC2_IMAGEMATE_SDDR55, RID_WILDCARD, UMASS_PROTO_SCSI, NO_GETMAXLUN }, {USB_VENDOR_PANASONIC, USB_PRODUCT_PANASONIC_KXL840AN, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_BBB, NO_GETMAXLUN }, {USB_VENDOR_PANASONIC, USB_PRODUCT_PANASONIC_KXLCB20AN, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_PANASONIC, USB_PRODUCT_PANASONIC_KXLCB35AN, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_PANASONIC, USB_PRODUCT_PANASONIC_LS120CAM, RID_WILDCARD, UMASS_PROTO_UFI, NO_QUIRKS }, {USB_VENDOR_PLEXTOR, USB_PRODUCT_PLEXTOR_40_12_40U, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_TEST_UNIT_READY }, {USB_VENDOR_PNY, USB_PRODUCT_PNY_ATTACHE2, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, IGNORE_RESIDUE | NO_START_STOP }, {USB_VENDOR_SAMSUNG, USB_PRODUCT_SAMSUNG_YP_U2, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, SHUTTLE_INIT | NO_GETMAXLUN }, {USB_VENDOR_SAMSUNG_TECHWIN, USB_PRODUCT_SAMSUNG_TECHWIN_DIGIMAX_410, RID_= WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY }, {USB_VENDOR_SANDISK, USB_PRODUCT_SANDISK_SDDR05A, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_CBI, READ_CAPACITY_OFFBY1 | NO_GETMAXLUN }, {USB_VENDOR_SANDISK, USB_PRODUCT_SANDISK_SDDR09, RID_WILDCARD, UMASS_PROTO_SCSI, READ_CAPACITY_OFFBY1 | NO_GETMAXLUN }, {USB_VENDOR_SANDISK, USB_PRODUCT_SANDISK_SDDR12, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_CBI, READ_CAPACITY_OFFBY1 | NO_GETMAXLUN }, {USB_VENDOR_SANDISK, USB_PRODUCT_SANDISK_SDCZ2_256, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, IGNORE_RESIDUE }, {USB_VENDOR_SANDISK, USB_PRODUCT_SANDISK_SDCZ4_128, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, IGNORE_RESIDUE }, {USB_VENDOR_SANDISK, USB_PRODUCT_SANDISK_SDCZ4_256, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, IGNORE_RESIDUE }, {USB_VENDOR_SANDISK, USB_PRODUCT_SANDISK_SDDR31, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, READ_CAPACITY_OFFBY1 }, {USB_VENDOR_SCANLOGIC, USB_PRODUCT_SCANLOGIC_SL11R, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_BBB, NO_INQUIRY }, {USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_EUSB, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I, NO_TEST_UNIT_READY | NO_START_STOP | SHUTTLE_INIT }, {USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_CDRW, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI, NO_QUIRKS }, {USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_CF, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI, NO_QUIRKS }, {USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_EUSBATAPI, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI, NO_QUIRKS }, {USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_EUSBCFSM, RID_WILDCARD, UMASS_PROTO_SCSI, NO_QUIRKS }, {USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_EUSCSI, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_HIFD, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_CBI, NO_GETMAXLUN }, {USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_SDDR09, RID_WILDCARD, UMASS_PROTO_SCSI, NO_GETMAXLUN }, {USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_ZIOMMC, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_CBI, NO_GETMAXLUN }, {USB_VENDOR_SIGMATEL, USB_PRODUCT_SIGMATEL_I_BEAD100, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, SHUTTLE_INIT }, {USB_VENDOR_SIIG, USB_PRODUCT_SIIG_WINTERREADER, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, IGNORE_RESIDUE }, {USB_VENDOR_SKANHEX, USB_PRODUCT_SKANHEX_MD_7425, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY }, {USB_VENDOR_SKANHEX, USB_PRODUCT_SKANHEX_SX_520Z, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY }, {USB_VENDOR_SONY, USB_PRODUCT_SONY_HANDYCAM, 0x0500, UMASS_PROTO_RBC | UMASS_PROTO_CBI, RBC_PAD_TO_12 }, {USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_40_MS, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY }, {USB_VENDOR_SONY, USB_PRODUCT_SONY_DSC, 0x0500, UMASS_PROTO_RBC | UMASS_PROTO_CBI, RBC_PAD_TO_12 }, {USB_VENDOR_SONY, USB_PRODUCT_SONY_DSC, 0x0600, UMASS_PROTO_RBC | UMASS_PROTO_CBI, RBC_PAD_TO_12 }, {USB_VENDOR_SONY, USB_PRODUCT_SONY_DSC, RID_WILDCARD, UMASS_PROTO_RBC | UMASS_PROTO_CBI, NO_QUIRKS }, {USB_VENDOR_SONY, USB_PRODUCT_SONY_HANDYCAM, RID_WILDCARD, UMASS_PROTO_RBC | UMASS_PROTO_CBI, NO_QUIRKS }, {USB_VENDOR_SONY, USB_PRODUCT_SONY_MSC, RID_WILDCARD, UMASS_PROTO_RBC | UMASS_PROTO_CBI, NO_QUIRKS }, {USB_VENDOR_SONY, USB_PRODUCT_SONY_MS_MSC_U03, RID_WILDCARD, UMASS_PROTO_UFI | UMASS_PROTO_CBI, NO_GETMAXLUN }, {USB_VENDOR_SONY, USB_PRODUCT_SONY_MS_NW_MS7, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_GETMAXLUN }, {USB_VENDOR_SONY, USB_PRODUCT_SONY_MS_PEG_N760C, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY }, {USB_VENDOR_SONY, USB_PRODUCT_SONY_MSACUS1, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_GETMAXLUN }, {USB_VENDOR_SONY, USB_PRODUCT_SONY_PORTABLE_HDD_V2, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_SUPERTOP, USB_PRODUCT_SUPERTOP_IDE, RID_WILDCARD, UMASS_PROTO_DEFAULT, IGNORE_RESIDUE | NO_SYNCHRONIZE_CACHE }, {USB_VENDOR_TAUGA, USB_PRODUCT_TAUGA_CAMERAMATE, RID_WILDCARD, UMASS_PROTO_SCSI, NO_QUIRKS }, {USB_VENDOR_TEAC, USB_PRODUCT_TEAC_FD05PUB, RID_WILDCARD, UMASS_PROTO_UFI | UMASS_PROTO_CBI, NO_QUIRKS }, {USB_VENDOR_TREK, USB_PRODUCT_TREK_MEMKEY, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY }, {USB_VENDOR_TREK, USB_PRODUCT_TREK_THUMBDRIVE_8MB, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_BBB, IGNORE_RESIDUE }, {USB_VENDOR_TRUMPION, USB_PRODUCT_TRUMPION_C3310, RID_WILDCARD, UMASS_PROTO_UFI | UMASS_PROTO_CBI, NO_QUIRKS }, {USB_VENDOR_TRUMPION, USB_PRODUCT_TRUMPION_MP3, RID_WILDCARD, UMASS_PROTO_RBC, NO_QUIRKS }, {USB_VENDOR_TRUMPION, USB_PRODUCT_TRUMPION_T33520, RID_WILDCARD, UMASS_PROTO_SCSI, NO_QUIRKS }, {USB_VENDOR_TWINMOS, USB_PRODUCT_TWINMOS_MDIV, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, {USB_VENDOR_VIA, USB_PRODUCT_VIA_USB2IDEBRIDGE, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_SYNCHRONIZE_CACHE }, {USB_VENDOR_VIVITAR, USB_PRODUCT_VIVITAR_35XX, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY }, {USB_VENDOR_WESTERN, USB_PRODUCT_WESTERN_COMBO, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE }, {USB_VENDOR_WESTERN, USB_PRODUCT_WESTERN_EXTHDD, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE }, {USB_VENDOR_WESTERN, USB_PRODUCT_WESTERN_MYBOOK, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY_EVPD }, {USB_VENDOR_WINMAXGROUP, USB_PRODUCT_WINMAXGROUP_FLASH64MC, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY }, {USB_VENDOR_YANO, USB_PRODUCT_YANO_FW800HD, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE }, {USB_VENDOR_YANO, USB_PRODUCT_YANO_U640MO, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I, FORCE_SHORT_INQUIRY }, {USB_VENDOR_YEDATA, USB_PRODUCT_YEDATA_FLASHBUSTERU, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_CBI, NO_GETMAXLUN }, {USB_VENDOR_ZORAN, USB_PRODUCT_ZORAN_EX20DSC, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI, NO_QUIRKS }, {USB_VENDOR_MEIZU, USB_PRODUCT_MEIZU_M6_SL, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY | NO_SYNCHRONIZE_CACHE }, {USB_VENDOR_ACTIONS, USB_PRODUCT_ACTIONS_MP4, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_SYNCHRONIZE_CACHE }, {VID_EOT, PID_EOT, RID_EOT, 0, 0} }; struct umass_softc { struct scsi_sense cam_scsi_sense; struct scsi_test_unit_ready cam_scsi_test_unit_ready; struct mtx sc_mtx; struct { uint8_t *data_ptr; union ccb *ccb; umass_callback_t *callback; uint32_t data_len; /* bytes */ uint32_t data_rem; /* bytes */ uint32_t data_timeout; /* ms */ uint32_t actlen; /* bytes */ uint8_t cmd_data[UMASS_MAX_CMDLEN]; uint8_t cmd_len; /* bytes */ uint8_t dir; uint8_t lun; } sc_transfer; /* Bulk specific variables for transfers in progress */ umass_bbb_cbw_t cbw; /* command block wrapper */ umass_bbb_csw_t csw; /* command status wrapper */ /* CBI specific variables for transfers in progress */ umass_cbi_sbl_t sbl; /* status block */ device_t sc_dev; struct usb_device *sc_udev; struct cam_sim *sc_sim; /* SCSI Interface Module */ struct usb_xfer *sc_xfer[UMASS_T_MAX]; /* * The command transform function is used to convert the SCSI * commands into their derivatives, like UFI, ATAPI, and friends. */ umass_transform_t *sc_transform; uint32_t sc_unit; uint16_t sc_proto; /* wire and cmd protocol */ uint16_t sc_quirks; /* they got it almost right */ uint8_t sc_name[16]; uint8_t sc_iface_no; /* interface number */ uint8_t sc_maxlun; /* maximum LUN number, inclusive */ uint8_t sc_last_xfer_index; uint8_t sc_status_try; }; struct umass_probe_proto { uint16_t quirks; uint16_t proto; int32_t error; }; /* prototypes */ static device_probe_t umass_probe; static device_attach_t umass_attach; static device_detach_t umass_detach; static usb_callback_t umass_tr_error; static usb_callback_t umass_t_bbb_reset1_callback; static usb_callback_t umass_t_bbb_reset2_callback; static usb_callback_t umass_t_bbb_reset3_callback; static usb_callback_t umass_t_bbb_command_callback; static usb_callback_t umass_t_bbb_data_read_callback; static usb_callback_t umass_t_bbb_data_rd_cs_callback; static usb_callback_t umass_t_bbb_data_write_callback; static usb_callback_t umass_t_bbb_data_wr_cs_callback; static usb_callback_t umass_t_bbb_status_callback; static usb_callback_t umass_t_cbi_reset1_callback; static usb_callback_t umass_t_cbi_reset2_callback; static usb_callback_t umass_t_cbi_reset3_callback; static usb_callback_t umass_t_cbi_reset4_callback; static usb_callback_t umass_t_cbi_command_callback; static usb_callback_t umass_t_cbi_data_read_callback; static usb_callback_t umass_t_cbi_data_rd_cs_callback; static usb_callback_t umass_t_cbi_data_write_callback; static usb_callback_t umass_t_cbi_data_wr_cs_callback; static usb_callback_t umass_t_cbi_status_callback; static void umass_cancel_ccb(struct umass_softc *); static void umass_init_shuttle(struct umass_softc *); static void umass_reset(struct umass_softc *); static void umass_t_bbb_data_clear_stall_callback(struct usb_xfer *, uint8_t, uint8_t, usb_error_t); static void umass_command_start(struct umass_softc *, uint8_t, void *, uint32_t, uint32_t, umass_callback_t *, union ccb *); static uint8_t umass_bbb_get_max_lun(struct umass_softc *); static void umass_cbi_start_status(struct umass_softc *); static void umass_t_cbi_data_clear_stall_callback(struct usb_xfer *, uint8_t, uint8_t, usb_error_t); static int umass_cam_attach_sim(struct umass_softc *); static void umass_cam_rescan_callback(struct cam_periph *, union ccb *); static void umass_cam_rescan(struct umass_softc *); static void umass_cam_attach(struct umass_softc *); static void umass_cam_detach_sim(struct umass_softc *); static void umass_cam_action(struct cam_sim *, union ccb *); static void umass_cam_poll(struct cam_sim *); static void umass_cam_cb(struct umass_softc *, union ccb *, uint32_t, uint8_t); static void umass_cam_sense_cb(struct umass_softc *, union ccb *, uint32_t, uint8_t); static void umass_cam_quirk_cb(struct umass_softc *, union ccb *, uint32_t, uint8_t); static uint8_t umass_scsi_transform(struct umass_softc *, uint8_t *, uint8_= t); static uint8_t umass_rbc_transform(struct umass_softc *, uint8_t *, uint8_t= ); static uint8_t umass_ufi_transform(struct umass_softc *, uint8_t *, uint8_t= ); static uint8_t umass_atapi_transform(struct umass_softc *, uint8_t *, uint8_t); static uint8_t umass_no_transform(struct umass_softc *, uint8_t *, uint8_t)= ; static uint8_t umass_std_transform(struct umass_softc *, union ccb *, uint8= _t *, uint8_t); #if USB_DEBUG static void umass_bbb_dump_cbw(struct umass_softc *, umass_bbb_cbw_t *); static void umass_bbb_dump_csw(struct umass_softc *, umass_bbb_csw_t *); static void umass_cbi_dump_cmd(struct umass_softc *, void *, uint8_t); static void umass_dump_buffer(struct umass_softc *, uint8_t *, uint32_t, uint32_t); #endif static struct usb_config umass_bbb_config[UMASS_T_BBB_MAX] =3D { [UMASS_T_BBB_RESET1] =3D { .type =3D UE_CONTROL, .endpoint =3D 0x00, /* Control pipe */ .direction =3D UE_DIR_ANY, .bufsize =3D sizeof(struct usb_device_request), .callback =3D &umass_t_bbb_reset1_callback, .timeout =3D 5000, /* 5 seconds */ .interval =3D 500, /* 500 milliseconds */ }, [UMASS_T_BBB_RESET2] =3D { .type =3D UE_CONTROL, .endpoint =3D 0x00, /* Control pipe */ .direction =3D UE_DIR_ANY, .bufsize =3D sizeof(struct usb_device_request), .callback =3D &umass_t_bbb_reset2_callback, .timeout =3D 5000, /* 5 seconds */ .interval =3D 50, /* 50 milliseconds */ }, [UMASS_T_BBB_RESET3] =3D { .type =3D UE_CONTROL, .endpoint =3D 0x00, /* Control pipe */ .direction =3D UE_DIR_ANY, .bufsize =3D sizeof(struct usb_device_request), .callback =3D &umass_t_bbb_reset3_callback, .timeout =3D 5000, /* 5 seconds */ .interval =3D 50, /* 50 milliseconds */ }, [UMASS_T_BBB_COMMAND] =3D { .type =3D UE_BULK, .endpoint =3D UE_ADDR_ANY, .direction =3D UE_DIR_OUT, .bufsize =3D sizeof(umass_bbb_cbw_t), .callback =3D &umass_t_bbb_command_callback, .timeout =3D 5000, /* 5 seconds */ }, [UMASS_T_BBB_DATA_READ] =3D { .type =3D UE_BULK, .endpoint =3D UE_ADDR_ANY, .direction =3D UE_DIR_IN, .bufsize =3D UMASS_BULK_SIZE, .flags =3D {.proxy_buffer =3D 1,.short_xfer_ok =3D 1, UMASS_USB_FLAGS}, .callback =3D &umass_t_bbb_data_read_callback, .timeout =3D 0, /* overwritten later */ }, [UMASS_T_BBB_DATA_RD_CS] =3D { .type =3D UE_CONTROL, .endpoint =3D 0x00, /* Control pipe */ .direction =3D UE_DIR_ANY, .bufsize =3D sizeof(struct usb_device_request), .callback =3D &umass_t_bbb_data_rd_cs_callback, .timeout =3D 5000, /* 5 seconds */ }, [UMASS_T_BBB_DATA_WRITE] =3D { .type =3D UE_BULK, .endpoint =3D UE_ADDR_ANY, .direction =3D UE_DIR_OUT, .bufsize =3D UMASS_BULK_SIZE, .flags =3D {.proxy_buffer =3D 1,.short_xfer_ok =3D 1, UMASS_USB_FLAGS}, .callback =3D &umass_t_bbb_data_write_callback, .timeout =3D 0, /* overwritten later */ }, [UMASS_T_BBB_DATA_WR_CS] =3D { .type =3D UE_CONTROL, .endpoint =3D 0x00, /* Control pipe */ .direction =3D UE_DIR_ANY, .bufsize =3D sizeof(struct usb_device_request), .callback =3D &umass_t_bbb_data_wr_cs_callback, .timeout =3D 5000, /* 5 seconds */ }, [UMASS_T_BBB_STATUS] =3D { .type =3D UE_BULK, .endpoint =3D UE_ADDR_ANY, .direction =3D UE_DIR_IN, .bufsize =3D sizeof(umass_bbb_csw_t), .flags =3D {.short_xfer_ok =3D 1,}, .callback =3D &umass_t_bbb_status_callback, .timeout =3D 5000, /* ms */ }, }; static struct usb_config umass_cbi_config[UMASS_T_CBI_MAX] =3D { [UMASS_T_CBI_RESET1] =3D { .type =3D UE_CONTROL, .endpoint =3D 0x00, /* Control pipe */ .direction =3D UE_DIR_ANY, .bufsize =3D (sizeof(struct usb_device_request) + UMASS_CBI_DIAGNOSTIC_CMDLEN), .callback =3D &umass_t_cbi_reset1_callback, .timeout =3D 5000, /* 5 seconds */ .interval =3D 500, /* 500 milliseconds */ }, [UMASS_T_CBI_RESET2] =3D { .type =3D UE_CONTROL, .endpoint =3D 0x00, /* Control pipe */ .direction =3D UE_DIR_ANY, .bufsize =3D sizeof(struct usb_device_request), .callback =3D &umass_t_cbi_reset2_callback, .timeout =3D 5000, /* 5 seconds */ .interval =3D 50, /* 50 milliseconds */ }, [UMASS_T_CBI_RESET3] =3D { .type =3D UE_CONTROL, .endpoint =3D 0x00, /* Control pipe */ .direction =3D UE_DIR_ANY, .bufsize =3D sizeof(struct usb_device_request), .callback =3D &umass_t_cbi_reset3_callback, .timeout =3D 5000, /* 5 seconds */ .interval =3D 50, /* 50 milliseconds */ }, [UMASS_T_CBI_COMMAND] =3D { .type =3D UE_CONTROL, .endpoint =3D 0x00, /* Control pipe */ .direction =3D UE_DIR_ANY, .bufsize =3D (sizeof(struct usb_device_request) + UMASS_MAX_CMDLEN), .callback =3D &umass_t_cbi_command_callback, .timeout =3D 5000, /* 5 seconds */ }, [UMASS_T_CBI_DATA_READ] =3D { .type =3D UE_BULK, .endpoint =3D UE_ADDR_ANY, .direction =3D UE_DIR_IN, .bufsize =3D UMASS_BULK_SIZE, .flags =3D {.proxy_buffer =3D 1,.short_xfer_ok =3D 1, UMASS_USB_FLAGS}, .callback =3D &umass_t_cbi_data_read_callback, .timeout =3D 0, /* overwritten later */ }, [UMASS_T_CBI_DATA_RD_CS] =3D { .type =3D UE_CONTROL, .endpoint =3D 0x00, /* Control pipe */ .direction =3D UE_DIR_ANY, .bufsize =3D sizeof(struct usb_device_request), .callback =3D &umass_t_cbi_data_rd_cs_callback, .timeout =3D 5000, /* 5 seconds */ }, [UMASS_T_CBI_DATA_WRITE] =3D { .type =3D UE_BULK, .endpoint =3D UE_ADDR_ANY, .direction =3D UE_DIR_OUT, .bufsize =3D UMASS_BULK_SIZE, .flags =3D {.proxy_buffer =3D 1,.short_xfer_ok =3D 1, UMASS_USB_FLAGS}, .callback =3D &umass_t_cbi_data_write_callback, .timeout =3D 0, /* overwritten later */ }, [UMASS_T_CBI_DATA_WR_CS] =3D { .type =3D UE_CONTROL, .endpoint =3D 0x00, /* Control pipe */ .direction =3D UE_DIR_ANY, .bufsize =3D sizeof(struct usb_device_request), .callback =3D &umass_t_cbi_data_wr_cs_callback, .timeout =3D 5000, /* 5 seconds */ }, [UMASS_T_CBI_STATUS] =3D { .type =3D UE_INTERRUPT, .endpoint =3D UE_ADDR_ANY, .direction =3D UE_DIR_IN, .flags =3D {.short_xfer_ok =3D 1,}, .bufsize =3D sizeof(umass_cbi_sbl_t), .callback =3D &umass_t_cbi_status_callback, .timeout =3D 5000, /* ms */ }, [UMASS_T_CBI_RESET4] =3D { .type =3D UE_CONTROL, .endpoint =3D 0x00, /* Control pipe */ .direction =3D UE_DIR_ANY, .bufsize =3D sizeof(struct usb_device_request), .callback =3D &umass_t_cbi_reset4_callback, .timeout =3D 5000, /* ms */ }, }; /* If device cannot return valid inquiry data, fake it */ static const uint8_t fake_inq_data[SHORT_INQUIRY_LENGTH] =3D { 0, /* removable */ 0x80, SCSI_REV_2, SCSI_REV_2, /* additional_length */ 31, 0, 0, 0 }; #define UFI_COMMAND_LENGTH 12 /* UFI commands are always 12 bytes */ #define ATAPI_COMMAND_LENGTH 12 /* ATAPI commands are always 12 bytes */ static devclass_t umass_devclass; static device_method_t umass_methods[] =3D { /* Device interface */ DEVMETHOD(device_probe, umass_probe), DEVMETHOD(device_attach, umass_attach), DEVMETHOD(device_detach, umass_detach), {0, 0} }; static driver_t umass_driver =3D { .name =3D "umass", .methods =3D umass_methods, .size =3D sizeof(struct umass_softc), }; DRIVER_MODULE(umass, uhub, umass_driver, umass_devclass, NULL, 0); MODULE_DEPEND(umass, usb, 1, 1, 1); MODULE_DEPEND(umass, cam, 1, 1, 1); /* * USB device probe/attach/detach */ static uint16_t umass_get_proto(struct usb_interface *iface) { struct usb_interface_descriptor *id; uint16_t retval; retval =3D 0; /* Check for a standards compliant device */ id =3D usbd_get_interface_descriptor(iface); if ((id =3D=3D NULL) || (id->bInterfaceClass !=3D UICLASS_MASS)) { goto done; } switch (id->bInterfaceSubClass) { case UISUBCLASS_SCSI: retval |=3D UMASS_PROTO_SCSI; break; case UISUBCLASS_UFI: retval |=3D UMASS_PROTO_UFI; break; case UISUBCLASS_RBC: retval |=3D UMASS_PROTO_RBC; break; case UISUBCLASS_SFF8020I: case UISUBCLASS_SFF8070I: retval |=3D UMASS_PROTO_ATAPI; break; default: retval =3D 0; goto done; } switch (id->bInterfaceProtocol) { case UIPROTO_MASS_CBI: retval |=3D UMASS_PROTO_CBI; break; case UIPROTO_MASS_CBI_I: retval |=3D UMASS_PROTO_CBI_I; break; case UIPROTO_MASS_BBB_OLD: case UIPROTO_MASS_BBB: retval |=3D UMASS_PROTO_BBB; break; default: retval =3D 0; goto done; } done: return (retval); } /* * Match the device we are seeing with the * devices supported. */ static struct umass_probe_proto umass_probe_proto(device_t dev, struct usb_attach_arg *uaa) { const struct umass_devdescr *udd =3D umass_devdescr; struct umass_probe_proto ret; memset(&ret, 0, sizeof(ret)); /* * An entry specifically for Y-E Data devices as they don't fit in * the device description table. */ if ((uaa->info.idVendor =3D=3D USB_VENDOR_YEDATA) && (uaa->info.idProduct =3D=3D USB_PRODUCT_YEDATA_FLASHBUSTERU)) { /* * Revisions < 1.28 do not handle the interrupt endpoint * very well. */ if (uaa->info.bcdDevice < 0x128) { ret.proto =3D UMASS_PROTO_UFI | UMASS_PROTO_CBI; } else { ret.proto =3D UMASS_PROTO_UFI | UMASS_PROTO_CBI_I; } /* * Revisions < 1.28 do not have the TEST UNIT READY command * Revisions =3D=3D 1.28 have a broken TEST UNIT READY */ if (uaa->info.bcdDevice <=3D 0x128) { ret.quirks |=3D NO_TEST_UNIT_READY; } ret.quirks |=3D RS_NO_CLEAR_UA | FLOPPY_SPEED; goto done; } /* * Check the list of supported devices for a match. While looking, * check for wildcarded and fully matched. First match wins. */ for (; udd->vid !=3D VID_EOT; udd++) { if (((udd->vid =3D=3D uaa->info.idVendor) || (udd->vid =3D=3D VID_WILDCARD)) && ((udd->pid =3D=3D uaa->info.idProduct) || (udd->pid =3D=3D PID_WILDCARD))) { if (udd->rid =3D=3D RID_WILDCARD) { ret.proto =3D udd->proto; ret.quirks =3D udd->quirks; if (ret.proto =3D=3D UMASS_PROTO_DEFAULT) goto default_proto; else goto done; } else if (udd->rid =3D=3D uaa->info.bcdDevice) { ret.proto =3D udd->proto; ret.quirks =3D udd->quirks; if (ret.proto =3D=3D UMASS_PROTO_DEFAULT) goto default_proto; else goto done; } /* else RID does not match */ } } default_proto: ret.proto =3D umass_get_proto(uaa->iface); if (ret.proto =3D=3D 0) ret.error =3D ENXIO; else ret.error =3D 0; done: return (ret); } static int umass_probe(device_t dev) { struct usb_attach_arg *uaa =3D device_get_ivars(dev); struct umass_probe_proto temp; if (uaa->usb_mode !=3D USB_MODE_HOST) { return (ENXIO); } if (uaa->use_generic =3D=3D 0) { /* give other drivers a try first */ return (ENXIO); } temp =3D umass_probe_proto(dev, uaa); return (temp.error); } static int umass_attach(device_t dev) { struct umass_softc *sc =3D device_get_softc(dev); struct usb_attach_arg *uaa =3D device_get_ivars(dev); struct umass_probe_proto temp =3D umass_probe_proto(dev, uaa); struct usb_interface_descriptor *id; int32_t err; /* * NOTE: the softc struct is bzero-ed in device_set_driver. * We can safely call umass_detach without specifically * initializing the struct. */ sc->sc_dev =3D dev; sc->sc_udev =3D uaa->device; sc->sc_proto =3D temp.proto; sc->sc_quirks =3D temp.quirks; sc->sc_unit =3D device_get_unit(dev); snprintf(sc->sc_name, sizeof(sc->sc_name), "%s", device_get_nameunit(dev)); device_set_usb_desc(dev); mtx_init(&sc->sc_mtx, device_get_nameunit(dev),=20 NULL, MTX_DEF | MTX_RECURSE); /* get interface index */ id =3D usbd_get_interface_descriptor(uaa->iface); if (id =3D=3D NULL) { device_printf(dev, "failed to get " "interface number\n"); goto detach; } sc->sc_iface_no =3D id->bInterfaceNumber; #if USB_DEBUG device_printf(dev, " "); switch (sc->sc_proto & UMASS_PROTO_COMMAND) { case UMASS_PROTO_SCSI: printf("SCSI"); break; case UMASS_PROTO_ATAPI: printf("8070i (ATAPI)"); break; case UMASS_PROTO_UFI: printf("UFI"); break; case UMASS_PROTO_RBC: printf("RBC"); break; default: printf("(unknown 0x%02x)", sc->sc_proto & UMASS_PROTO_COMMAND); break; } printf(" over "); switch (sc->sc_proto & UMASS_PROTO_WIRE) { case UMASS_PROTO_BBB: printf("Bulk-Only"); break; case UMASS_PROTO_CBI: /* uses Comand/Bulk pipes */ printf("CBI"); break; case UMASS_PROTO_CBI_I: /* uses Comand/Bulk/Interrupt pipes */ printf("CBI with CCI"); break; default: printf("(unknown 0x%02x)", sc->sc_proto & UMASS_PROTO_WIRE); } printf("; quirks =3D 0x%04x\n", sc->sc_quirks); #endif if (sc->sc_quirks & ALT_IFACE_1) { err =3D usbd_set_alt_interface_index (uaa->device, uaa->info.bIfaceIndex, 1); if (err) { DPRINTF(sc, UDMASS_USB, "could not switch to " "Alt Interface 1\n"); goto detach; } } /* allocate all required USB transfers */ if (sc->sc_proto & UMASS_PROTO_BBB) { err =3D usbd_transfer_setup(uaa->device, &uaa->info.bIfaceIndex, sc->sc_xfer, umass_bbb_config, UMASS_T_BBB_MAX, sc, &sc->sc_mtx); /* skip reset first time */ sc->sc_last_xfer_index =3D UMASS_T_BBB_COMMAND; } else if (sc->sc_proto & (UMASS_PROTO_CBI | UMASS_PROTO_CBI_I)) { err =3D usbd_transfer_setup(uaa->device, &uaa->info.bIfaceIndex, sc->sc_xfer, umass_cbi_config, (sc->sc_proto & UMASS_PROTO_CBI_I) ? UMASS_T_CBI_MAX : (UMASS_T_CBI_MAX - 2), sc, &sc->sc_mtx); /* skip reset first time */ sc->sc_last_xfer_index =3D UMASS_T_CBI_COMMAND; } else { err =3D USB_ERR_INVAL; } if (err) { device_printf(dev, "could not setup required " "transfers, %s\n", usbd_errstr(err)); goto detach; } sc->sc_transform =3D (sc->sc_proto & UMASS_PROTO_SCSI) ? &umass_scsi_transform : (sc->sc_proto & UMASS_PROTO_UFI) ? &umass_ufi_transform : (sc->sc_proto & UMASS_PROTO_ATAPI) ? &umass_atapi_transform : (sc->sc_proto & UMASS_PROTO_RBC) ? &umass_rbc_transform : &umass_no_transform; /* from here onwards the device can be used. */ if (sc->sc_quirks & SHUTTLE_INIT) { umass_init_shuttle(sc); } /* get the maximum LUN supported by the device */ if (((sc->sc_proto & UMASS_PROTO_WIRE) =3D=3D UMASS_PROTO_BBB) && !(sc->sc_quirks & NO_GETMAXLUN)) sc->sc_maxlun =3D umass_bbb_get_max_lun(sc); else sc->sc_maxlun =3D 0; /* Prepare the SCSI command block */ sc->cam_scsi_sense.opcode =3D REQUEST_SENSE; sc->cam_scsi_test_unit_ready.opcode =3D TEST_UNIT_READY; /* * some devices need a delay after that the configuration value is * set to function properly: */ usb_pause_mtx(NULL, hz); /* register the SIM */ err =3D umass_cam_attach_sim(sc); if (err) { goto detach; } /* scan the SIM */ umass_cam_attach(sc); DPRINTF(sc, UDMASS_GEN, "Attach finished\n"); return (0); /* success */ detach: umass_detach(dev); return (ENXIO); /* failure */ } static int umass_detach(device_t dev) { struct umass_softc *sc =3D device_get_softc(dev); DPRINTF(sc, UDMASS_USB, "\n"); /* teardown our statemachine */ usbd_transfer_unsetup(sc->sc_xfer, UMASS_T_MAX); #if (__FreeBSD_version >=3D 700037) mtx_lock(&sc->sc_mtx); #endif umass_cam_detach_sim(sc); #if (__FreeBSD_version >=3D 700037) mtx_unlock(&sc->sc_mtx); #endif return (0); /* success */ } static void umass_init_shuttle(struct umass_softc *sc) { struct usb_device_request req; usb_error_t err; uint8_t status[2] =3D {0, 0}; /* * The Linux driver does this, but no one can tell us what the * command does. */ req.bmRequestType =3D UT_READ_VENDOR_DEVICE; req.bRequest =3D 1; /* XXX unknown command */ USETW(req.wValue, 0); req.wIndex[0] =3D sc->sc_iface_no; req.wIndex[1] =3D 0; USETW(req.wLength, sizeof(status)); err =3D usbd_do_request(sc->sc_udev, NULL, &req, &status); DPRINTF(sc, UDMASS_GEN, "Shuttle init returned 0x%02x%02x\n", status[0], status[1]); } /* * Generic functions to handle transfers */ static void umass_transfer_start(struct umass_softc *sc, uint8_t xfer_index) { DPRINTF(sc, UDMASS_GEN, "transfer index =3D " "%d\n", xfer_index); if (sc->sc_xfer[xfer_index]) { sc->sc_last_xfer_index =3D xfer_index; usbd_transfer_start(sc->sc_xfer[xfer_index]); } else { umass_cancel_ccb(sc); } } static void umass_reset(struct umass_softc *sc) { DPRINTF(sc, UDMASS_GEN, "resetting device\n"); /* * stop the last transfer, if not already stopped: */ usbd_transfer_stop(sc->sc_xfer[sc->sc_last_xfer_index]); umass_transfer_start(sc, 0); } static void umass_cancel_ccb(struct umass_softc *sc) { union ccb *ccb; mtx_assert(&sc->sc_mtx, MA_OWNED); ccb =3D sc->sc_transfer.ccb; sc->sc_transfer.ccb =3D NULL; sc->sc_last_xfer_index =3D 0; if (ccb) { (sc->sc_transfer.callback) (sc, ccb, (sc->sc_transfer.data_len - sc->sc_transfer.actlen), STATUS_WIRE_FAILED); } } static void umass_tr_error(struct usb_xfer *xfer, usb_error_t error) { struct umass_softc *sc =3D usbd_xfer_softc(xfer); if (error !=3D USB_ERR_CANCELLED) { DPRINTF(sc, UDMASS_GEN, "transfer error, %s -> " "reset\n", usbd_errstr(error)); } umass_cancel_ccb(sc); } /* * BBB protocol specific functions */ static void umass_t_bbb_reset1_callback(struct usb_xfer *xfer, usb_error_t error) { struct umass_softc *sc =3D usbd_xfer_softc(xfer); struct usb_device_request req; struct usb_page_cache *pc; switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: umass_transfer_start(sc, UMASS_T_BBB_RESET2); return; case USB_ST_SETUP: /* * Reset recovery (5.3.4 in Universal Serial Bus Mass Storage Class) * * For Reset Recovery the host shall issue in the following order: * a) a Bulk-Only Mass Storage Reset * b) a Clear Feature HALT to the Bulk-In endpoint * c) a Clear Feature HALT to the Bulk-Out endpoint * * This is done in 3 steps, using 3 transfers: * UMASS_T_BBB_RESET1 * UMASS_T_BBB_RESET2 * UMASS_T_BBB_RESET3 */ DPRINTF(sc, UDMASS_BBB, "BBB reset!\n"); req.bmRequestType =3D UT_WRITE_CLASS_INTERFACE; req.bRequest =3D UR_BBB_RESET; /* bulk only reset */ USETW(req.wValue, 0); req.wIndex[0] =3D sc->sc_iface_no; req.wIndex[1] =3D 0; USETW(req.wLength, 0); pc =3D usbd_xfer_get_frame(xfer, 0); usbd_copy_in(pc, 0, &req, sizeof(req)); usbd_xfer_set_frame_len(xfer, 0, sizeof(req)); usbd_xfer_set_frames(xfer, 1); usbd_transfer_submit(xfer); return; default: /* Error */ umass_tr_error(xfer, error); return; } } static void umass_t_bbb_reset2_callback(struct usb_xfer *xfer, usb_error_t error) { umass_t_bbb_data_clear_stall_callback(xfer, UMASS_T_BBB_RESET3, UMASS_T_BBB_DATA_READ, error); } static void umass_t_bbb_reset3_callback(struct usb_xfer *xfer, usb_error_t error) { umass_t_bbb_data_clear_stall_callback(xfer, UMASS_T_BBB_COMMAND, UMASS_T_BBB_DATA_WRITE, error); } static void umass_t_bbb_data_clear_stall_callback(struct usb_xfer *xfer, uint8_t next_xfer, uint8_t stall_xfer, usb_error_t error) { struct umass_softc *sc =3D usbd_xfer_softc(xfer); switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: tr_transferred: umass_transfer_start(sc, next_xfer); return; case USB_ST_SETUP: if (usbd_clear_stall_callback(xfer, sc->sc_xfer[stall_xfer])) { goto tr_transferred; } return; default: /* Error */ umass_tr_error(xfer, error); return; } } static void umass_t_bbb_command_callback(struct usb_xfer *xfer, usb_error_t error) { struct umass_softc *sc =3D usbd_xfer_softc(xfer); union ccb *ccb =3D sc->sc_transfer.ccb; struct usb_page_cache *pc; uint32_t tag; switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: umass_transfer_start (sc, ((sc->sc_transfer.dir =3D=3D DIR_IN) ? UMASS_T_BBB_DATA_READ : (sc->sc_transfer.dir =3D=3D DIR_OUT) ? UMASS_T_BBB_DATA_WRITE : UMASS_T_BBB_STATUS)); return; case USB_ST_SETUP: sc->sc_status_try =3D 0; if (ccb) { /* * the initial value is not important, * as long as the values are unique: */ tag =3D UGETDW(sc->cbw.dCBWTag) + 1; USETDW(sc->cbw.dCBWSignature, CBWSIGNATURE); USETDW(sc->cbw.dCBWTag, tag); /* * dCBWDataTransferLength: * This field indicates the number of bytes of data that the ho= st * intends to transfer on the IN or OUT Bulk endpoint(as indica= ted by * the Direction bit) during the execution of this command. If = this * field is set to 0, the device will expect that no data will = be * transferred IN or OUT during this command, regardless of the= value * of the Direction bit defined in dCBWFlags. */ USETDW(sc->cbw.dCBWDataTransferLength, sc->sc_transfer.data_len); /* * dCBWFlags: * The bits of the Flags field are defined as follows: * Bits 0-6 reserved * Bit 7 Direction - this bit shall be ignored if the * dCBWDataTransferLength field is zero= . * 0 =3D data Out from host to device * 1 =3D data In from device to host */ sc->cbw.bCBWFlags =3D ((sc->sc_transfer.dir =3D=3D DIR_IN) ? CBWFLAGS_IN : CBWFLAGS_OUT); sc->cbw.bCBWLUN =3D sc->sc_transfer.lun; if (sc->sc_transfer.cmd_len > sizeof(sc->cbw.CBWCDB)) { sc->sc_transfer.cmd_len =3D sizeof(sc->cbw.CBWCDB); DPRINTF(sc, UDMASS_BBB, "Truncating long command!\n"); } sc->cbw.bCDBLength =3D sc->sc_transfer.cmd_len; bcopy(sc->sc_transfer.cmd_data, sc->cbw.CBWCDB, sc->sc_transfer.cmd_len); bzero(sc->sc_transfer.cmd_data + sc->sc_transfer.cmd_len, sizeof(sc->cbw.CBWCDB) - sc->sc_transfer.cmd_len); DIF(UDMASS_BBB, umass_bbb_dump_cbw(sc, &sc->cbw)); pc =3D usbd_xfer_get_frame(xfer, 0); usbd_copy_in(pc, 0, &sc->cbw, sizeof(sc->cbw)); usbd_xfer_set_frame_len(xfer, 0, sizeof(sc->cbw)); usbd_transfer_submit(xfer); } return; default: /* Error */ umass_tr_error(xfer, error); return; } } static void umass_t_bbb_data_read_callback(struct usb_xfer *xfer, usb_error_t error) { struct umass_softc *sc =3D usbd_xfer_softc(xfer); uint32_t max_bulk =3D usbd_xfer_max_len(xfer); #ifndef UMASS_EXT_BUFFER struct usb_page_cache *pc; #endif int actlen, sumlen; usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: #ifndef UMASS_EXT_BUFFER pc =3D usbd_xfer_get_frame(xfer, 0); usbd_copy_out(pc, 0, sc->sc_transfer.data_ptr, actlen); #endif sc->sc_transfer.data_rem -=3D actlen; sc->sc_transfer.data_ptr +=3D actlen; sc->sc_transfer.actlen +=3D actlen; if (actlen < sumlen) { /* short transfer */ sc->sc_transfer.data_rem =3D 0; } case USB_ST_SETUP: DPRINTF(sc, UDMASS_BBB, "max_bulk=3D%d, data_rem=3D%d\n", max_bulk, sc->sc_transfer.data_rem); if (sc->sc_transfer.data_rem =3D=3D 0) { umass_transfer_start(sc, UMASS_T_BBB_STATUS); return; } if (max_bulk > sc->sc_transfer.data_rem) { max_bulk =3D sc->sc_transfer.data_rem; } usbd_xfer_set_timeout(xfer, sc->sc_transfer.data_timeout); #ifdef UMASS_EXT_BUFFER usbd_xfer_set_frame_data(xfer, 0, sc->sc_transfer.data_ptr, max_bulk); #else usbd_xfer_set_frame_len(xfer, 0, max_bulk); #endif usbd_transfer_submit(xfer); return; default: /* Error */ if (error =3D=3D USB_ERR_CANCELLED) { umass_tr_error(xfer, error); } else { umass_transfer_start(sc, UMASS_T_BBB_DATA_RD_CS); } return; } } static void umass_t_bbb_data_rd_cs_callback(struct usb_xfer *xfer, usb_error_t error) { umass_t_bbb_data_clear_stall_callback(xfer, UMASS_T_BBB_STATUS, UMASS_T_BBB_DATA_READ, error); } static void umass_t_bbb_data_write_callback(struct usb_xfer *xfer, usb_error_t error) { struct umass_softc *sc =3D usbd_xfer_softc(xfer); uint32_t max_bulk =3D usbd_xfer_max_len(xfer); #ifndef UMASS_EXT_BUFFER struct usb_page_cache *pc; #endif int actlen, sumlen; usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: sc->sc_transfer.data_rem -=3D actlen; sc->sc_transfer.data_ptr +=3D actlen; sc->sc_transfer.actlen +=3D actlen; if (actlen < sumlen) { /* short transfer */ sc->sc_transfer.data_rem =3D 0; } case USB_ST_SETUP: DPRINTF(sc, UDMASS_BBB, "max_bulk=3D%d, data_rem=3D%d\n", max_bulk, sc->sc_transfer.data_rem); if (sc->sc_transfer.data_rem =3D=3D 0) { umass_transfer_start(sc, UMASS_T_BBB_STATUS); return; } if (max_bulk > sc->sc_transfer.data_rem) { max_bulk =3D sc->sc_transfer.data_rem; } usbd_xfer_set_timeout(xfer, sc->sc_transfer.data_timeout); #ifdef UMASS_EXT_BUFFER usbd_xfer_set_frame_data(xfer, 0, sc->sc_transfer.data_ptr, max_bulk); #else pc =3D usbd_xfer_get_frame(xfer, 0); usbd_copy_in(pc, 0, sc->sc_transfer.data_ptr, max_bulk); usbd_xfer_set_frame_len(xfer, 0, max_bulk); #endif usbd_transfer_submit(xfer); return; default: /* Error */ if (error =3D=3D USB_ERR_CANCELLED) { umass_tr_error(xfer, error); } else { umass_transfer_start(sc, UMASS_T_BBB_DATA_WR_CS); } return; } } static void umass_t_bbb_data_wr_cs_callback(struct usb_xfer *xfer, usb_error_t error) { umass_t_bbb_data_clear_stall_callback(xfer, UMASS_T_BBB_STATUS, UMASS_T_BBB_DATA_WRITE, error); } static void umass_t_bbb_status_callback(struct usb_xfer *xfer, usb_error_t error) { struct umass_softc *sc =3D usbd_xfer_softc(xfer); union ccb *ccb =3D sc->sc_transfer.ccb; struct usb_page_cache *pc; uint32_t residue; int actlen; usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: /* * Do a full reset if there is something wrong with the CSW: */ sc->sc_status_try =3D 1; /* Zero missing parts of the CSW: */ if (actlen < sizeof(sc->csw)) { bzero(&sc->csw, sizeof(sc->csw)); } pc =3D usbd_xfer_get_frame(xfer, 0); usbd_copy_out(pc, 0, &sc->csw, actlen); DIF(UDMASS_BBB, umass_bbb_dump_csw(sc, &sc->csw)); residue =3D UGETDW(sc->csw.dCSWDataResidue); if ((!residue) || (sc->sc_quirks & IGNORE_RESIDUE)) { residue =3D (sc->sc_transfer.data_len - sc->sc_transfer.actlen); } if (residue > sc->sc_transfer.data_len) { DPRINTF(sc, UDMASS_BBB, "truncating residue from %d " "to %d bytes\n", residue, sc->sc_transfer.data_len); residue =3D sc->sc_transfer.data_len; } /* translate weird command-status signatures: */ if (sc->sc_quirks & WRONG_CSWSIG) { uint32_t temp =3D UGETDW(sc->csw.dCSWSignature); if ((temp =3D=3D CSWSIGNATURE_OLYMPUS_C1) || (temp =3D=3D CSWSIGNATURE_IMAGINATION_DBX1)) { USETDW(sc->csw.dCSWSignature, CSWSIGNATURE); } } /* check CSW and handle eventual error */ if (UGETDW(sc->csw.dCSWSignature) !=3D CSWSIGNATURE) { DPRINTF(sc, UDMASS_BBB, "bad CSW signature 0x%08x !=3D 0x%08x\n", UGETDW(sc->csw.dCSWSignature), CSWSIGNATURE); /* * Invalid CSW: Wrong signature or wrong tag might * indicate that we lost synchronization. Reset the * device. */ goto tr_error; } else if (UGETDW(sc->csw.dCSWTag) !=3D UGETDW(sc->cbw.dCBWTag)) { DPRINTF(sc, UDMASS_BBB, "Invalid CSW: tag 0x%08x should be " "0x%08x\n", UGETDW(sc->csw.dCSWTag), UGETDW(sc->cbw.dCBWTag)); goto tr_error; } else if (sc->csw.bCSWStatus > CSWSTATUS_PHASE) { DPRINTF(sc, UDMASS_BBB, "Invalid CSW: status %d > %d\n", sc->csw.bCSWStatus, CSWSTATUS_PHASE); goto tr_error; } else if (sc->csw.bCSWStatus =3D=3D CSWSTATUS_PHASE) { DPRINTF(sc, UDMASS_BBB, "Phase error, residue =3D " "%d\n", residue); goto tr_error; } else if (sc->sc_transfer.actlen > sc->sc_transfer.data_len) { DPRINTF(sc, UDMASS_BBB, "Buffer overrun %d > %d\n", sc->sc_transfer.actlen, sc->sc_transfer.data_len); goto tr_error; } else if (sc->csw.bCSWStatus =3D=3D CSWSTATUS_FAILED) { DPRINTF(sc, UDMASS_BBB, "Command failed, residue =3D " "%d\n", residue); sc->sc_transfer.ccb =3D NULL; sc->sc_last_xfer_index =3D UMASS_T_BBB_COMMAND; (sc->sc_transfer.callback) (sc, ccb, residue, STATUS_CMD_FAILED); } else { sc->sc_transfer.ccb =3D NULL; sc->sc_last_xfer_index =3D UMASS_T_BBB_COMMAND; (sc->sc_transfer.callback) (sc, ccb, residue, STATUS_CMD_OK); } return; case USB_ST_SETUP: usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); usbd_transfer_submit(xfer); return; default: tr_error: DPRINTF(sc, UDMASS_BBB, "Failed to read CSW: %s, try %d\n", usbd_errstr(error), sc->sc_status_try); if ((error =3D=3D USB_ERR_CANCELLED) || (sc->sc_status_try)) { umass_tr_error(xfer, error); } else { sc->sc_status_try =3D 1; umass_transfer_start(sc, UMASS_T_BBB_DATA_RD_CS); } return; } } static void umass_command_start(struct umass_softc *sc, uint8_t dir, void *data_ptr, uint32_t data_len, uint32_t data_timeout, umass_callback_t *callback, union ccb *ccb) { sc->sc_transfer.lun =3D ccb->ccb_h.target_lun; /* * NOTE: assumes that "sc->sc_transfer.cmd_data" and * "sc->sc_transfer.cmd_len" has been properly * initialized. */ sc->sc_transfer.dir =3D data_len ? dir : DIR_NONE; sc->sc_transfer.data_ptr =3D data_ptr; sc->sc_transfer.data_len =3D data_len; sc->sc_transfer.data_rem =3D data_len; sc->sc_transfer.data_timeout =3D (data_timeout + UMASS_TIMEOUT); sc->sc_transfer.actlen =3D 0; sc->sc_transfer.callback =3D callback; sc->sc_transfer.ccb =3D ccb; if (sc->sc_xfer[sc->sc_last_xfer_index]) { usbd_transfer_start(sc->sc_xfer[sc->sc_last_xfer_index]); } else { ccb->ccb_h.status =3D CAM_TID_INVALID; xpt_done(ccb); } } static uint8_t umass_bbb_get_max_lun(struct umass_softc *sc) { struct usb_device_request req; usb_error_t err; uint8_t buf =3D 0; /* The Get Max Lun command is a class-specific request. */ req.bmRequestType =3D UT_READ_CLASS_INTERFACE; req.bRequest =3D UR_BBB_GET_MAX_LUN; USETW(req.wValue, 0); req.wIndex[0] =3D sc->sc_iface_no; req.wIndex[1] =3D 0; USETW(req.wLength, 1); err =3D usbd_do_request(sc->sc_udev, NULL, &req, &buf); if (err) { buf =3D 0; /* Device doesn't support Get Max Lun request. */ printf("%s: Get Max Lun not supported (%s)\n", sc->sc_name, usbd_errstr(err)); } return (buf); } /* * Command/Bulk/Interrupt (CBI) specific functions */ static void umass_cbi_start_status(struct umass_softc *sc) { if (sc->sc_xfer[UMASS_T_CBI_STATUS]) { umass_transfer_start(sc, UMASS_T_CBI_STATUS); } else { union ccb *ccb =3D sc->sc_transfer.ccb; sc->sc_transfer.ccb =3D NULL; sc->sc_last_xfer_index =3D UMASS_T_CBI_COMMAND; (sc->sc_transfer.callback) (sc, ccb, (sc->sc_transfer.data_len - sc->sc_transfer.actlen), STATUS_CMD_UNKNOWN); } } static void umass_t_cbi_reset1_callback(struct usb_xfer *xfer, usb_error_t error) { struct umass_softc *sc =3D usbd_xfer_softc(xfer); struct usb_device_request req; struct usb_page_cache *pc; uint8_t buf[UMASS_CBI_DIAGNOSTIC_CMDLEN]; uint8_t i; switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: umass_transfer_start(sc, UMASS_T_CBI_RESET2); return; case USB_ST_SETUP: /* * Command Block Reset Protocol * * First send a reset request to the device. Then clear * any possibly stalled bulk endpoints. * * This is done in 3 steps, using 3 transfers: * UMASS_T_CBI_RESET1 * UMASS_T_CBI_RESET2 * UMASS_T_CBI_RESET3 * UMASS_T_CBI_RESET4 (only if there is an interrupt endpoint) */ DPRINTF(sc, UDMASS_CBI, "CBI reset!\n"); req.bmRequestType =3D UT_WRITE_CLASS_INTERFACE; req.bRequest =3D UR_CBI_ADSC; USETW(req.wValue, 0); req.wIndex[0] =3D sc->sc_iface_no; req.wIndex[1] =3D 0; USETW(req.wLength, UMASS_CBI_DIAGNOSTIC_CMDLEN); /* * The 0x1d code is the SEND DIAGNOSTIC command. To * distinguish between the two, the last 10 bytes of the CBL * is filled with 0xff (section 2.2 of the CBI * specification) */ buf[0] =3D 0x1d; /* Command Block Reset */ buf[1] =3D 0x04; for (i =3D 2; i < UMASS_CBI_DIAGNOSTIC_CMDLEN; i++) { buf[i] =3D 0xff; } pc =3D usbd_xfer_get_frame(xfer, 0); usbd_copy_in(pc, 0, &req, sizeof(req)); pc =3D usbd_xfer_get_frame(xfer, 1); usbd_copy_in(pc, 0, buf, sizeof(buf)); usbd_xfer_set_frame_len(xfer, 0, sizeof(req)); usbd_xfer_set_frame_len(xfer, 1, sizeof(buf)); usbd_xfer_set_frames(xfer, 2); usbd_transfer_submit(xfer); return; default: /* Error */ umass_tr_error(xfer, error); return; } } static void umass_t_cbi_reset2_callback(struct usb_xfer *xfer, usb_error_t error) { umass_t_cbi_data_clear_stall_callback(xfer, UMASS_T_CBI_RESET3, UMASS_T_CBI_DATA_READ, error); } static void umass_t_cbi_reset3_callback(struct usb_xfer *xfer, usb_error_t error) { struct umass_softc *sc =3D usbd_xfer_softc(xfer); umass_t_cbi_data_clear_stall_callback (xfer, (sc->sc_xfer[UMASS_T_CBI_RESET4] && sc->sc_xfer[UMASS_T_CBI_STATUS]) ? UMASS_T_CBI_RESET4 : UMASS_T_CBI_COMMAND, UMASS_T_CBI_DATA_WRITE, error); } static void umass_t_cbi_reset4_callback(struct usb_xfer *xfer, usb_error_t error) { umass_t_cbi_data_clear_stall_callback(xfer, UMASS_T_CBI_COMMAND, UMASS_T_CBI_STATUS, error); } static void umass_t_cbi_data_clear_stall_callback(struct usb_xfer *xfer, uint8_t next_xfer, uint8_t stall_xfer, usb_error_t error) { struct umass_softc *sc =3D usbd_xfer_softc(xfer); switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: tr_transferred: if (next_xfer =3D=3D UMASS_T_CBI_STATUS) { umass_cbi_start_status(sc); } else { umass_transfer_start(sc, next_xfer); } return; case USB_ST_SETUP: if (usbd_clear_stall_callback(xfer, sc->sc_xfer[stall_xfer])) { goto tr_transferred; /* should not happen */ } return; default: /* Error */ umass_tr_error(xfer, error); return; } } static void umass_t_cbi_command_callback(struct usb_xfer *xfer, usb_error_t error) { struct umass_softc *sc =3D usbd_xfer_softc(xfer); union ccb *ccb =3D sc->sc_transfer.ccb; struct usb_device_request req; struct usb_page_cache *pc; switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: if (sc->sc_transfer.dir =3D=3D DIR_NONE) { umass_cbi_start_status(sc); } else { umass_transfer_start (sc, (sc->sc_transfer.dir =3D=3D DIR_IN) ? UMASS_T_CBI_DATA_READ : UMASS_T_CBI_DATA_WRITE); } return; case USB_ST_SETUP: if (ccb) { /* * do a CBI transfer with cmd_len bytes from * cmd_data, possibly a data phase of data_len * bytes from/to the device and finally a status * read phase. */ req.bmRequestType =3D UT_WRITE_CLASS_INTERFACE; req.bRequest =3D UR_CBI_ADSC; USETW(req.wValue, 0); req.wIndex[0] =3D sc->sc_iface_no; req.wIndex[1] =3D 0; req.wLength[0] =3D sc->sc_transfer.cmd_len; req.wLength[1] =3D 0; pc =3D usbd_xfer_get_frame(xfer, 0); usbd_copy_in(pc, 0, &req, sizeof(req)); pc =3D usbd_xfer_get_frame(xfer, 1); usbd_copy_in(pc, 0, sc->sc_transfer.cmd_data, sc->sc_transfer.cmd_len); usbd_xfer_set_frame_len(xfer, 0, sizeof(req)); usbd_xfer_set_frame_len(xfer, 1, sc->sc_transfer.cmd_len); usbd_xfer_set_frames(xfer, sc->sc_transfer.cmd_len ? 2 : 1); DIF(UDMASS_CBI, umass_cbi_dump_cmd(sc, sc->sc_transfer.cmd_data, sc->sc_transfer.cmd_len)); usbd_transfer_submit(xfer); } return; default: /* Error */ umass_tr_error(xfer, error); return; } } static void umass_t_cbi_data_read_callback(struct usb_xfer *xfer, usb_error_t error) { struct umass_softc *sc =3D usbd_xfer_softc(xfer); uint32_t max_bulk =3D usbd_xfer_max_len(xfer); #ifndef UMASS_EXT_BUFFER struct usb_page_cache *pc; #endif int actlen, sumlen; usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: #ifndef UMASS_EXT_BUFFER pc =3D usbd_xfer_get_frame(xfer, 0); usbd_copy_out(pc, 0, sc->sc_transfer.data_ptr, actlen); #endif sc->sc_transfer.data_rem -=3D actlen; sc->sc_transfer.data_ptr +=3D actlen; sc->sc_transfer.actlen +=3D actlen; if (actlen < sumlen) { /* short transfer */ sc->sc_transfer.data_rem =3D 0; } case USB_ST_SETUP: DPRINTF(sc, UDMASS_CBI, "max_bulk=3D%d, data_rem=3D%d\n", max_bulk, sc->sc_transfer.data_rem); if (sc->sc_transfer.data_rem =3D=3D 0) { umass_cbi_start_status(sc); return; } if (max_bulk > sc->sc_transfer.data_rem) { max_bulk =3D sc->sc_transfer.data_rem; } usbd_xfer_set_timeout(xfer, sc->sc_transfer.data_timeout); #ifdef UMASS_EXT_BUFFER usbd_xfer_set_frame_data(xfer, 0, sc->sc_transfer.data_ptr, max_bulk); #else usbd_xfer_set_frame_len(xfer, 0, max_bulk); #endif usbd_transfer_submit(xfer); return; default: /* Error */ if ((error =3D=3D USB_ERR_CANCELLED) || (sc->sc_transfer.callback !=3D &umass_cam_cb)) { umass_tr_error(xfer, error); } else { umass_transfer_start(sc, UMASS_T_CBI_DATA_RD_CS); } return; } } static void umass_t_cbi_data_rd_cs_callback(struct usb_xfer *xfer, usb_error_t error) { umass_t_cbi_data_clear_stall_callback(xfer, UMASS_T_CBI_STATUS, UMASS_T_CBI_DATA_READ, error); } static void umass_t_cbi_data_write_callback(struct usb_xfer *xfer, usb_error_t error) { struct umass_softc *sc =3D usbd_xfer_softc(xfer); uint32_t max_bulk =3D usbd_xfer_max_len(xfer); #ifndef UMASS_EXT_BUFFER struct usb_page_cache *pc; #endif int actlen, sumlen; usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: sc->sc_transfer.data_rem -=3D actlen; sc->sc_transfer.data_ptr +=3D actlen; sc->sc_transfer.actlen +=3D actlen; if (actlen < sumlen) { /* short transfer */ sc->sc_transfer.data_rem =3D 0; } case USB_ST_SETUP: DPRINTF(sc, UDMASS_CBI, "max_bulk=3D%d, data_rem=3D%d\n", max_bulk, sc->sc_transfer.data_rem); if (sc->sc_transfer.data_rem =3D=3D 0) { umass_cbi_start_status(sc); return; } if (max_bulk > sc->sc_transfer.data_rem) { max_bulk =3D sc->sc_transfer.data_rem; } usbd_xfer_set_timeout(xfer, sc->sc_transfer.data_timeout); #ifdef UMASS_EXT_BUFFER usbd_xfer_set_frame_data(xfer, 0, sc->sc_transfer.data_ptr, max_bulk); #else pc =3D usbd_xfer_get_frame(xfer, 0); usbd_copy_in(pc, 0, sc->sc_transfer.data_ptr, max_bulk); usbd_xfer_set_frame_len(xfer, 0, max_bulk); #endif usbd_transfer_submit(xfer); return; default: /* Error */ if ((error =3D=3D USB_ERR_CANCELLED) || (sc->sc_transfer.callback !=3D &umass_cam_cb)) { umass_tr_error(xfer, error); } else { umass_transfer_start(sc, UMASS_T_CBI_DATA_WR_CS); } return; } } static void umass_t_cbi_data_wr_cs_callback(struct usb_xfer *xfer, usb_error_t error) { umass_t_cbi_data_clear_stall_callback(xfer, UMASS_T_CBI_STATUS, UMASS_T_CBI_DATA_WRITE, error); } static void umass_t_cbi_status_callback(struct usb_xfer *xfer, usb_error_t error) { struct umass_softc *sc =3D usbd_xfer_softc(xfer); union ccb *ccb =3D sc->sc_transfer.ccb; struct usb_page_cache *pc; uint32_t residue; uint8_t status; int actlen; usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: if (actlen < sizeof(sc->sbl)) { goto tr_setup; } pc =3D usbd_xfer_get_frame(xfer, 0); usbd_copy_out(pc, 0, &sc->sbl, sizeof(sc->sbl)); residue =3D (sc->sc_transfer.data_len - sc->sc_transfer.actlen); /* dissect the information in the buffer */ if (sc->sc_proto & UMASS_PROTO_UFI) { /* * Section 3.4.3.1.3 specifies that the UFI command * protocol returns an ASC and ASCQ in the interrupt * data block. */ DPRINTF(sc, UDMASS_CBI, "UFI CCI, ASC =3D 0x%02x, " "ASCQ =3D 0x%02x\n", sc->sbl.ufi.asc, sc->sbl.ufi.ascq); status =3D (((sc->sbl.ufi.asc =3D=3D 0) && (sc->sbl.ufi.ascq =3D=3D 0)) ? STATUS_CMD_OK : STATUS_CMD_FAILED); sc->sc_transfer.ccb =3D NULL; sc->sc_last_xfer_index =3D UMASS_T_CBI_COMMAND; (sc->sc_transfer.callback) (sc, ccb, residue, status); return; } else { /* Command Interrupt Data Block */ DPRINTF(sc, UDMASS_CBI, "type=3D0x%02x, value=3D0x%02x\n", sc->sbl.common.type, sc->sbl.common.value); if (sc->sbl.common.type =3D=3D IDB_TYPE_CCI) { status =3D (sc->sbl.common.value & IDB_VALUE_STATUS_MASK); status =3D ((status =3D=3D IDB_VALUE_PASS) ? STATUS_CMD_OK : (status =3D=3D IDB_VALUE_FAIL) ? STATUS_CMD_FAILED : (status =3D=3D IDB_VALUE_PERSISTENT) ? STATUS_CMD_FAILED : STATUS_WIRE_FAILED); sc->sc_transfer.ccb =3D NULL; sc->sc_last_xfer_index =3D UMASS_T_CBI_COMMAND; (sc->sc_transfer.callback) (sc, ccb, residue, status); return; } } /* fallthrough */ case USB_ST_SETUP: tr_setup: usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); usbd_transfer_submit(xfer); return; default: /* Error */ DPRINTF(sc, UDMASS_CBI, "Failed to read CSW: %s\n", usbd_errstr(error)); umass_tr_error(xfer, error); return; } } /* * CAM specific functions (used by SCSI, UFI, 8070i (ATAPI)) */ static int umass_cam_attach_sim(struct umass_softc *sc) { struct cam_devq *devq; /* Per device Queue */ /* * A HBA is attached to the CAM layer. * * The CAM layer will then after a while start probing for devices on * the bus. The number of SIMs is limited to one. */ devq =3D cam_simq_alloc(1 /* maximum openings */ ); if (devq =3D=3D NULL) { return (ENOMEM); } sc->sc_sim =3D cam_sim_alloc (&umass_cam_action, &umass_cam_poll, DEVNAME_SIM, sc /* priv */ , sc->sc_unit /* unit number */ , #if (__FreeBSD_version >=3D 700037) &sc->sc_mtx /* mutex */ , #endif 1 /* maximum device openings */ , 0 /* maximum tagged device openings */ , devq); if (sc->sc_sim =3D=3D NULL) { cam_simq_free(devq); return (ENOMEM); } #if (__FreeBSD_version >=3D 700037) mtx_lock(&sc->sc_mtx); #endif #if (__FreeBSD_version >=3D 700048) if (xpt_bus_register(sc->sc_sim, sc->sc_dev, sc->sc_unit) !=3D CAM_SUCCESS= ) { mtx_unlock(&sc->sc_mtx); return (ENOMEM); } #else if (xpt_bus_register(sc->sc_sim, sc->sc_unit) !=3D CAM_SUCCESS) { #if (__FreeBSD_version >=3D 700037) mtx_unlock(&sc->sc_mtx); #endif return (ENOMEM); } #endif #if (__FreeBSD_version >=3D 700037) mtx_unlock(&sc->sc_mtx); #endif return (0); } static void umass_cam_rescan_callback(struct cam_periph *periph, union ccb *ccb) { #if USB_DEBUG struct umass_softc *sc =3D NULL; if (ccb->ccb_h.status !=3D CAM_REQ_CMP) { DPRINTF(sc, UDMASS_SCSI, "%s:%d Rescan failed, 0x%04x\n", periph->periph_name, periph->unit_number, ccb->ccb_h.status); } else { DPRINTF(sc, UDMASS_SCSI, "%s%d: Rescan succeeded\n", periph->periph_name, periph->unit_number); } #endif xpt_free_path(ccb->ccb_h.path); free(ccb, M_USBDEV); } static void umass_cam_rescan(struct umass_softc *sc) { struct cam_path *path; union ccb *ccb; DPRINTF(sc, UDMASS_SCSI, "scbus%d: scanning for %d:%d:%d\n", cam_sim_path(sc->sc_sim), cam_sim_path(sc->sc_sim), sc->sc_unit, CAM_LUN_WILDCARD); ccb =3D malloc(sizeof(*ccb), M_USBDEV, M_WAITOK | M_ZERO); if (ccb =3D=3D NULL) { return; } #if (__FreeBSD_version >=3D 700037) mtx_lock(&sc->sc_mtx); #endif if (xpt_create_path(&path, xpt_periph, cam_sim_path(sc->sc_sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) !=3D CAM_REQ_CMP) { #if (__FreeBSD_version >=3D 700037) mtx_unlock(&sc->sc_mtx); #endif free(ccb, M_USBDEV); return; } xpt_setup_ccb(&ccb->ccb_h, path, 5 /* priority (low) */ ); ccb->ccb_h.func_code =3D XPT_SCAN_BUS; ccb->ccb_h.cbfcnp =3D &umass_cam_rescan_callback; ccb->crcn.flags =3D CAM_FLAG_NONE; xpt_action(ccb); #if (__FreeBSD_version >=3D 700037) mtx_unlock(&sc->sc_mtx); #endif /* The scan is in progress now. */ } static void umass_cam_attach(struct umass_softc *sc) { #ifndef USB_DEBUG if (bootverbose) #endif printf("%s:%d:%d:%d: Attached to scbus%d\n", sc->sc_name, cam_sim_path(sc->sc_sim), sc->sc_unit, CAM_LUN_WILDCARD, cam_sim_path(sc->sc_sim)); if (!cold) { /* * Notify CAM of the new device after a short delay. Any * failure is benign, as the user can still do it by hand * (camcontrol rescan ). Only do this if we are not * booting, because CAM does a scan after booting has * completed, when interrupts have been enabled. */ /* scan the new sim */ umass_cam_rescan(sc); } } /* umass_cam_detach * detach from the CAM layer */ static void umass_cam_detach_sim(struct umass_softc *sc) { if (sc->sc_sim !=3D NULL) { if (xpt_bus_deregister(cam_sim_path(sc->sc_sim))) { /* accessing the softc is not possible after this */ sc->sc_sim->softc =3D UMASS_GONE; cam_sim_free(sc->sc_sim, /* free_devq */ TRUE); } else { panic("%s: CAM layer is busy!\n", sc->sc_name); } sc->sc_sim =3D NULL; } } /* umass_cam_action * CAM requests for action come through here */ static void umass_cam_action(struct cam_sim *sim, union ccb *ccb) { struct umass_softc *sc =3D (struct umass_softc *)sim->softc; if (sc =3D=3D UMASS_GONE || (sc !=3D NULL && !usbd_device_attached(sc->sc_udev))) { ccb->ccb_h.status =3D CAM_SEL_TIMEOUT; xpt_done(ccb); return; } if (sc) { #if (__FreeBSD_version < 700037) mtx_lock(&sc->sc_mtx); #endif } /* * Verify, depending on the operation to perform, that we either got * a valid sc, because an existing target was referenced, or * otherwise the SIM is addressed. * * This avoids bombing out at a printf and does give the CAM layer some * sensible feedback on errors. */ switch (ccb->ccb_h.func_code) { case XPT_SCSI_IO: case XPT_RESET_DEV: case XPT_GET_TRAN_SETTINGS: case XPT_SET_TRAN_SETTINGS: case XPT_CALC_GEOMETRY: /* the opcodes requiring a target. These should never occur. */ if (sc =3D=3D NULL) { DPRINTF(sc, UDMASS_GEN, "%s:%d:%d:%d:func_code 0x%04x: " "Invalid target (target needed)\n", DEVNAME_SIM, cam_sim_path(sc->sc_sim), ccb->ccb_h.target_id, ccb->ccb_h.target_lun, ccb->ccb_h.func_code); ccb->ccb_h.status =3D CAM_TID_INVALID; xpt_done(ccb); goto done; } break; case XPT_PATH_INQ: case XPT_NOOP: /* * The opcodes sometimes aimed at a target (sc is valid), * sometimes aimed at the SIM (sc is invalid and target is * CAM_TARGET_WILDCARD) */ if ((sc =3D=3D NULL) && (ccb->ccb_h.target_id !=3D CAM_TARGET_WILDCARD)) { DPRINTF(sc, UDMASS_SCSI, "%s:%d:%d:%d:func_code 0x%04x: " "Invalid target (no wildcard)\n", DEVNAME_SIM, cam_sim_path(sc->sc_sim), ccb->ccb_h.target_id, ccb->ccb_h.target_lun, ccb->ccb_h.func_code); ccb->ccb_h.status =3D CAM_TID_INVALID; xpt_done(ccb); goto done; } break; default: /* XXX Hm, we should check the input parameters */ break; } /* Perform the requested action */ switch (ccb->ccb_h.func_code) { case XPT_SCSI_IO: { uint8_t *cmd; uint8_t dir; if (ccb->csio.ccb_h.flags & CAM_CDB_POINTER) { cmd =3D (uint8_t *)(ccb->csio.cdb_io.cdb_ptr); } else { cmd =3D (uint8_t *)(ccb->csio.cdb_io.cdb_bytes); } DPRINTF(sc, UDMASS_SCSI, "%d:%d:%d:XPT_SCSI_IO: " "cmd: 0x%02x, flags: 0x%02x, " "%db cmd/%db data/%db sense\n", cam_sim_path(sc->sc_sim), ccb->ccb_h.target_id, ccb->ccb_h.target_lun, cmd[0], ccb->ccb_h.flags & CAM_DIR_MASK, ccb->csio.cdb_len, ccb->csio.dxfer_len, ccb->csio.sense_len); if (sc->sc_transfer.ccb) { DPRINTF(sc, UDMASS_SCSI, "%d:%d:%d:XPT_SCSI_IO: " "I/O in progress, deferring\n", cam_sim_path(sc->sc_sim), ccb->ccb_h.target_id, ccb->ccb_h.target_lun); ccb->ccb_h.status =3D CAM_SCSI_BUSY; xpt_done(ccb); goto done; } switch (ccb->ccb_h.flags & CAM_DIR_MASK) { case CAM_DIR_IN: dir =3D DIR_IN; break; case CAM_DIR_OUT: dir =3D DIR_OUT; DIF(UDMASS_SCSI, umass_dump_buffer(sc, ccb->csio.data_ptr, ccb->csio.dxfer_len, 48)); break; default: dir =3D DIR_NONE; } ccb->ccb_h.status =3D CAM_REQ_INPROG | CAM_SIM_QUEUED; /* * sc->sc_transform will convert the command to the * command format needed by the specific command set * and return the converted command in * "sc->sc_transfer.cmd_data" */ if (umass_std_transform(sc, ccb, cmd, ccb->csio.cdb_len)) { if (sc->sc_transfer.cmd_data[0] =3D=3D INQUIRY) { /* * Handle EVPD inquiry for broken devices first * NO_INQUIRY also implies NO_INQUIRY_EVPD */ if ((sc->sc_quirks & (NO_INQUIRY_EVPD | NO_INQUIRY)) && (sc->sc_transfer.cmd_data[1] & SI_EVPD)) { struct scsi_sense_data *sense; sense =3D &ccb->csio.sense_data; bzero(sense, sizeof(*sense)); sense->error_code =3D SSD_CURRENT_ERROR; sense->flags =3D SSD_KEY_ILLEGAL_REQUEST; sense->add_sense_code =3D 0x24; sense->extra_len =3D 10; ccb->csio.scsi_status =3D SCSI_STATUS_CHECK_COND; ccb->ccb_h.status =3D CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID; xpt_done(ccb); goto done; } /* * Return fake inquiry data for * broken devices */ if (sc->sc_quirks & NO_INQUIRY) { memcpy(ccb->csio.data_ptr, &fake_inq_data, sizeof(fake_inq_data)); ccb->csio.scsi_status =3D SCSI_STATUS_OK; ccb->ccb_h.status =3D CAM_REQ_CMP; xpt_done(ccb); goto done; } if (sc->sc_quirks & FORCE_SHORT_INQUIRY) { ccb->csio.dxfer_len =3D SHORT_INQUIRY_LENGTH; } } else if (sc->sc_transfer.cmd_data[0] =3D=3D SYNCHRONIZE_CACHE) { if (sc->sc_quirks & NO_SYNCHRONIZE_CACHE) { ccb->csio.scsi_status =3D SCSI_STATUS_OK; ccb->ccb_h.status =3D CAM_REQ_CMP; xpt_done(ccb); goto done; } } umass_command_start(sc, dir, ccb->csio.data_ptr, ccb->csio.dxfer_len, ccb->ccb_h.timeout, &umass_cam_cb, ccb); } break; } case XPT_PATH_INQ: { struct ccb_pathinq *cpi =3D &ccb->cpi; DPRINTF(sc, UDMASS_SCSI, "%d:%d:%d:XPT_PATH_INQ:.\n", sc ? cam_sim_path(sc->sc_sim) : -1, ccb->ccb_h.target_id, ccb->ccb_h.target_lun); /* host specific information */ cpi->version_num =3D 1; cpi->hba_inquiry =3D 0; cpi->target_sprt =3D 0; cpi->hba_misc =3D PIM_NO_6_BYTE; cpi->hba_eng_cnt =3D 0; cpi->max_target =3D UMASS_SCSIID_MAX; /* one target */ cpi->initiator_id =3D UMASS_SCSIID_HOST; strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); strlcpy(cpi->hba_vid, "USB SCSI", HBA_IDLEN); strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number =3D cam_sim_unit(sim); cpi->bus_id =3D sc->sc_unit; #if (__FreeBSD_version >=3D 700025) cpi->protocol =3D PROTO_SCSI; cpi->protocol_version =3D SCSI_REV_2; cpi->transport =3D XPORT_USB; cpi->transport_version =3D 0; #endif if (sc =3D=3D NULL) { cpi->base_transfer_speed =3D 0; cpi->max_lun =3D 0; } else { if (sc->sc_quirks & FLOPPY_SPEED) { cpi->base_transfer_speed =3D UMASS_FLOPPY_TRANSFER_SPEED; } else if (usbd_get_speed(sc->sc_udev) =3D=3D USB_SPEED_HIGH) { cpi->base_transfer_speed =3D UMASS_HIGH_TRANSFER_SPEED; } else { cpi->base_transfer_speed =3D UMASS_FULL_TRANSFER_SPEED; } cpi->max_lun =3D sc->sc_maxlun; } cpi->ccb_h.status =3D CAM_REQ_CMP; xpt_done(ccb); break; } case XPT_RESET_DEV: { DPRINTF(sc, UDMASS_SCSI, "%d:%d:%d:XPT_RESET_DEV:.\n", cam_sim_path(sc->sc_sim), ccb->ccb_h.target_id, ccb->ccb_h.target_lun); umass_reset(sc); ccb->ccb_h.status =3D CAM_REQ_CMP; xpt_done(ccb); break; } case XPT_GET_TRAN_SETTINGS: { struct ccb_trans_settings *cts =3D &ccb->cts; DPRINTF(sc, UDMASS_SCSI, "%d:%d:%d:XPT_GET_TRAN_SETTINGS:.\n", cam_sim_path(sc->sc_sim), ccb->ccb_h.target_id, ccb->ccb_h.target_lun); #if (__FreeBSD_version >=3D 700025) cts->protocol =3D PROTO_SCSI; cts->protocol_version =3D SCSI_REV_2; cts->transport =3D XPORT_USB; cts->transport_version =3D 0; cts->xport_specific.valid =3D 0; #else cts->valid =3D 0; cts->flags =3D 0; /* no disconnection, tagging */ #endif ccb->ccb_h.status =3D CAM_REQ_CMP; xpt_done(ccb); break; } case XPT_SET_TRAN_SETTINGS: { DPRINTF(sc, UDMASS_SCSI, "%d:%d:%d:XPT_SET_TRAN_SETTINGS:.\n", cam_sim_path(sc->sc_sim), ccb->ccb_h.target_id, ccb->ccb_h.target_lun); ccb->ccb_h.status =3D CAM_FUNC_NOTAVAIL; xpt_done(ccb); break; } case XPT_CALC_GEOMETRY: { cam_calc_geometry(&ccb->ccg, /* extended */ 1); xpt_done(ccb); break; } case XPT_NOOP: { DPRINTF(sc, UDMASS_SCSI, "%d:%d:%d:XPT_NOOP:.\n", sc ? cam_sim_path(sc->sc_sim) : -1, ccb->ccb_h.target_id, ccb->ccb_h.target_lun); ccb->ccb_h.status =3D CAM_REQ_CMP; xpt_done(ccb); break; } default: DPRINTF(sc, UDMASS_SCSI, "%d:%d:%d:func_code 0x%04x: " "Not implemented\n", sc ? cam_sim_path(sc->sc_sim) : -1, ccb->ccb_h.target_id, ccb->ccb_h.target_lun, ccb->ccb_h.func_code); ccb->ccb_h.status =3D CAM_FUNC_NOTAVAIL; xpt_done(ccb); break; } done: #if (__FreeBSD_version < 700037) if (sc) { mtx_unlock(&sc->sc_mtx); } #endif return; } static void umass_cam_poll(struct cam_sim *sim) { struct umass_softc *sc =3D (struct umass_softc *)sim->softc; if (sc =3D=3D UMASS_GONE) return; DPRINTF(sc, UDMASS_SCSI, "CAM poll\n"); usbd_transfer_poll(sc->sc_xfer, UMASS_T_MAX); } /* umass_cam_cb * finalise a completed CAM command */ static void umass_cam_cb(struct umass_softc *sc, union ccb *ccb, uint32_t residue, uint8_t status) { ccb->csio.resid =3D residue; switch (status) { case STATUS_CMD_OK: ccb->ccb_h.status =3D CAM_REQ_CMP; if ((sc->sc_quirks & READ_CAPACITY_OFFBY1) && (ccb->ccb_h.func_code =3D=3D XPT_SCSI_IO) && (ccb->csio.cdb_io.cdb_bytes[0] =3D=3D READ_CAPACITY)) { struct scsi_read_capacity_data *rcap; uint32_t maxsector; rcap =3D (void *)(ccb->csio.data_ptr); maxsector =3D scsi_4btoul(rcap->addr) - 1; scsi_ulto4b(maxsector, rcap->addr); } xpt_done(ccb); break; case STATUS_CMD_UNKNOWN: case STATUS_CMD_FAILED: /* fetch sense data */ /* the rest of the command was filled in at attach */ sc->cam_scsi_sense.length =3D ccb->csio.sense_len; DPRINTF(sc, UDMASS_SCSI, "Fetching %d bytes of " "sense data\n", ccb->csio.sense_len); if (umass_std_transform(sc, ccb, &sc->cam_scsi_sense.opcode, sizeof(sc->cam_scsi_sense))) { if ((sc->sc_quirks & FORCE_SHORT_INQUIRY) && (sc->sc_transfer.cmd_data[0] =3D=3D INQUIRY)) { ccb->csio.sense_len =3D SHORT_INQUIRY_LENGTH; } umass_command_start(sc, DIR_IN, &ccb->csio.sense_data.error_code, ccb->csio.sense_len, ccb->ccb_h.timeout, &umass_cam_sense_cb, ccb); } break; default: /* * the wire protocol failed and will have recovered * (hopefully). We return an error to CAM and let CAM retry * the command if necessary. */ ccb->ccb_h.status =3D CAM_REQ_CMP_ERR; xpt_done(ccb); break; } } /* * Finalise a completed autosense operation */ static void umass_cam_sense_cb(struct umass_softc *sc, union ccb *ccb, uint32_t residue= , uint8_t status) { uint8_t *cmd; uint8_t key; switch (status) { case STATUS_CMD_OK: case STATUS_CMD_UNKNOWN: case STATUS_CMD_FAILED: if (ccb->csio.ccb_h.flags & CAM_CDB_POINTER) { cmd =3D (uint8_t *)(ccb->csio.cdb_io.cdb_ptr); } else { cmd =3D (uint8_t *)(ccb->csio.cdb_io.cdb_bytes); } key =3D (ccb->csio.sense_data.flags & SSD_KEY); /* * Getting sense data always succeeds (apart from wire * failures): */ if ((sc->sc_quirks & RS_NO_CLEAR_UA) && (cmd[0] =3D=3D INQUIRY) && (key =3D=3D SSD_KEY_UNIT_ATTENTION)) { /* * Ignore unit attention errors in the case where * the Unit Attention state is not cleared on * REQUEST SENSE. They will appear again at the next * command. */ ccb->ccb_h.status =3D CAM_REQ_CMP; } else if (key =3D=3D SSD_KEY_NO_SENSE) { /* * No problem after all (in the case of CBI without * CCI) */ ccb->ccb_h.status =3D CAM_REQ_CMP; } else if ((sc->sc_quirks & RS_NO_CLEAR_UA) && (cmd[0] =3D=3D READ_CAPACITY) && (key =3D=3D SSD_KEY_UNIT_ATTENTION)) { /* * Some devices do not clear the unit attention error * on request sense. We insert a test unit ready * command to make sure we clear the unit attention * condition, then allow the retry to proceed as * usual. */ ccb->ccb_h.status =3D CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID; ccb->csio.scsi_status =3D SCSI_STATUS_CHECK_COND; #if 0 DELAY(300000); #endif DPRINTF(sc, UDMASS_SCSI, "Doing a sneaky" "TEST_UNIT_READY\n"); /* the rest of the command was filled in at attach */ if (umass_std_transform(sc, ccb, &sc->cam_scsi_test_unit_ready.opcode, sizeof(sc->cam_scsi_test_unit_ready))) { umass_command_start(sc, DIR_NONE, NULL, 0, ccb->ccb_h.timeout, &umass_cam_quirk_cb, ccb); } break; } else { ccb->ccb_h.status =3D CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID; ccb->csio.scsi_status =3D SCSI_STATUS_CHECK_COND; } xpt_done(ccb); break; default: DPRINTF(sc, UDMASS_SCSI, "Autosense failed, " "status %d\n", status); ccb->ccb_h.status =3D CAM_AUTOSENSE_FAIL; xpt_done(ccb); } } /* * This completion code just handles the fact that we sent a test-unit-read= y * after having previously failed a READ CAPACITY with CHECK_COND. Even * though this command succeeded, we have to tell CAM to retry. */ static void umass_cam_quirk_cb(struct umass_softc *sc, union ccb *ccb, uint32_t residue= , uint8_t status) { DPRINTF(sc, UDMASS_SCSI, "Test unit ready " "returned status %d\n", status); ccb->ccb_h.status =3D CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID; ccb->csio.scsi_status =3D SCSI_STATUS_CHECK_COND; xpt_done(ccb); } /* * SCSI specific functions */ static uint8_t umass_scsi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, uint8_t cmd_len) { if ((cmd_len =3D=3D 0) || (cmd_len > sizeof(sc->sc_transfer.cmd_data))) { DPRINTF(sc, UDMASS_SCSI, "Invalid command " "length: %d bytes\n", cmd_len); return (0); /* failure */ } sc->sc_transfer.cmd_len =3D cmd_len; switch (cmd_ptr[0]) { case TEST_UNIT_READY: if (sc->sc_quirks & NO_TEST_UNIT_READY) { DPRINTF(sc, UDMASS_SCSI, "Converted TEST_UNIT_READY " "to START_UNIT\n"); bzero(sc->sc_transfer.cmd_data, cmd_len); sc->sc_transfer.cmd_data[0] =3D START_STOP_UNIT; sc->sc_transfer.cmd_data[4] =3D SSS_START; return (1); } break; case INQUIRY: /* * some drives wedge when asked for full inquiry * information. */ if (sc->sc_quirks & FORCE_SHORT_INQUIRY) { bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); sc->sc_transfer.cmd_data[4] =3D SHORT_INQUIRY_LENGTH; return (1); } break; } bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); return (1); } static uint8_t umass_rbc_transform(struct umass_softc *sc, uint8_t *cmd_ptr, uint8_t cmd_l= en) { if ((cmd_len =3D=3D 0) || (cmd_len > sizeof(sc->sc_transfer.cmd_data))) { DPRINTF(sc, UDMASS_SCSI, "Invalid command " "length: %d bytes\n", cmd_len); return (0); /* failure */ } switch (cmd_ptr[0]) { /* these commands are defined in RBC: */ case READ_10: case READ_CAPACITY: case START_STOP_UNIT: case SYNCHRONIZE_CACHE: case WRITE_10: case 0x2f: /* VERIFY_10 is absent from * scsi_all.h??? */ case INQUIRY: case MODE_SELECT_10: case MODE_SENSE_10: case TEST_UNIT_READY: case WRITE_BUFFER: /* * The following commands are not listed in my copy of the * RBC specs. CAM however seems to want those, and at least * the Sony DSC device appears to support those as well */ case REQUEST_SENSE: case PREVENT_ALLOW: bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); if ((sc->sc_quirks & RBC_PAD_TO_12) && (cmd_len < 12)) { bzero(sc->sc_transfer.cmd_data + cmd_len, 12 - cmd_len); cmd_len =3D 12; } sc->sc_transfer.cmd_len =3D cmd_len; return (1); /* sucess */ /* All other commands are not legal in RBC */ default: DPRINTF(sc, UDMASS_SCSI, "Unsupported RBC " "command 0x%02x\n", cmd_ptr[0]); return (0); /* failure */ } } static uint8_t umass_ufi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, uint8_t cmd_len) { if ((cmd_len =3D=3D 0) || (cmd_len > sizeof(sc->sc_transfer.cmd_data))) { DPRINTF(sc, UDMASS_SCSI, "Invalid command " "length: %d bytes\n", cmd_len); return (0); /* failure */ } /* An UFI command is always 12 bytes in length */ sc->sc_transfer.cmd_len =3D UFI_COMMAND_LENGTH; /* Zero the command data */ bzero(sc->sc_transfer.cmd_data, UFI_COMMAND_LENGTH); switch (cmd_ptr[0]) { /* * Commands of which the format has been verified. They * should work. Copy the command into the (zeroed out) * destination buffer. */ case TEST_UNIT_READY: if (sc->sc_quirks & NO_TEST_UNIT_READY) { /* * Some devices do not support this command. Start * Stop Unit should give the same results */ DPRINTF(sc, UDMASS_UFI, "Converted TEST_UNIT_READY " "to START_UNIT\n"); sc->sc_transfer.cmd_data[0] =3D START_STOP_UNIT; sc->sc_transfer.cmd_data[4] =3D SSS_START; return (1); } break; case REZERO_UNIT: case REQUEST_SENSE: case FORMAT_UNIT: case INQUIRY: case START_STOP_UNIT: case SEND_DIAGNOSTIC: case PREVENT_ALLOW: case READ_CAPACITY: case READ_10: case WRITE_10: case POSITION_TO_ELEMENT: /* SEEK_10 */ case WRITE_AND_VERIFY: case VERIFY: case MODE_SELECT_10: case MODE_SENSE_10: case READ_12: case WRITE_12: case READ_FORMAT_CAPACITIES: break; /* * SYNCHRONIZE_CACHE isn't supported by UFI, nor should it be * required for UFI devices, so it is appropriate to fake * success. */ case SYNCHRONIZE_CACHE: return (2); default: DPRINTF(sc, UDMASS_SCSI, "Unsupported UFI " "command 0x%02x\n", cmd_ptr[0]); return (0); /* failure */ } bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); return (1); /* success */ } /* * 8070i (ATAPI) specific functions */ static uint8_t umass_atapi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, uint8_t cmd_len) { if ((cmd_len =3D=3D 0) || (cmd_len > sizeof(sc->sc_transfer.cmd_data))) { DPRINTF(sc, UDMASS_SCSI, "Invalid command " "length: %d bytes\n", cmd_len); return (0); /* failure */ } /* An ATAPI command is always 12 bytes in length. */ sc->sc_transfer.cmd_len =3D ATAPI_COMMAND_LENGTH; /* Zero the command data */ bzero(sc->sc_transfer.cmd_data, ATAPI_COMMAND_LENGTH); switch (cmd_ptr[0]) { /* * Commands of which the format has been verified. They * should work. Copy the command into the destination * buffer. */ case INQUIRY: /* * some drives wedge when asked for full inquiry * information. */ if (sc->sc_quirks & FORCE_SHORT_INQUIRY) { bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); sc->sc_transfer.cmd_data[4] =3D SHORT_INQUIRY_LENGTH; return (1); } break; case TEST_UNIT_READY: if (sc->sc_quirks & NO_TEST_UNIT_READY) { DPRINTF(sc, UDMASS_SCSI, "Converted TEST_UNIT_READY " "to START_UNIT\n"); sc->sc_transfer.cmd_data[0] =3D START_STOP_UNIT; sc->sc_transfer.cmd_data[4] =3D SSS_START; return (1); } break; case REZERO_UNIT: case REQUEST_SENSE: case START_STOP_UNIT: case SEND_DIAGNOSTIC: case PREVENT_ALLOW: case READ_CAPACITY: case READ_10: case WRITE_10: case POSITION_TO_ELEMENT: /* SEEK_10 */ case SYNCHRONIZE_CACHE: case MODE_SELECT_10: case MODE_SENSE_10: case READ_BUFFER: case 0x42: /* READ_SUBCHANNEL */ case 0x43: /* READ_TOC */ case 0x44: /* READ_HEADER */ case 0x47: /* PLAY_MSF (Play Minute/Second/Frame) */ case 0x48: /* PLAY_TRACK */ case 0x49: /* PLAY_TRACK_REL */ case 0x4b: /* PAUSE */ case 0x51: /* READ_DISK_INFO */ case 0x52: /* READ_TRACK_INFO */ case 0x54: /* SEND_OPC */ case 0x59: /* READ_MASTER_CUE */ case 0x5b: /* CLOSE_TR_SESSION */ case 0x5c: /* READ_BUFFER_CAP */ case 0x5d: /* SEND_CUE_SHEET */ case 0xa1: /* BLANK */ case 0xa5: /* PLAY_12 */ case 0xa6: /* EXCHANGE_MEDIUM */ case 0xad: /* READ_DVD_STRUCTURE */ case 0xbb: /* SET_CD_SPEED */ case 0xe5: /* READ_TRACK_INFO_PHILIPS */ break;; case READ_12: case WRITE_12: default: DPRINTF(sc, UDMASS_SCSI, "Unsupported ATAPI " "command 0x%02x - trying anyway\n", cmd_ptr[0]); break;; } bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); return (1); /* success */ } static uint8_t umass_no_transform(struct umass_softc *sc, uint8_t *cmd, uint8_t cmdlen) { return (0); /* failure */ } static uint8_t umass_std_transform(struct umass_softc *sc, union ccb *ccb, uint8_t *cmd, uint8_t cmdlen) { uint8_t retval; retval =3D (sc->sc_transform) (sc, cmd, cmdlen); if (retval =3D=3D 2) { ccb->ccb_h.status =3D CAM_REQ_CMP; xpt_done(ccb); return (0); } else if (retval =3D=3D 0) { ccb->ccb_h.status =3D CAM_REQ_INVALID; xpt_done(ccb); return (0); } /* Command should be executed */ return (1); } #if USB_DEBUG static void umass_bbb_dump_cbw(struct umass_softc *sc, umass_bbb_cbw_t *cbw) { uint8_t *c =3D cbw->CBWCDB; uint32_t dlen =3D UGETDW(cbw->dCBWDataTransferLength); uint32_t tag =3D UGETDW(cbw->dCBWTag); uint8_t clen =3D cbw->bCDBLength; uint8_t flags =3D cbw->bCBWFlags; uint8_t lun =3D cbw->bCBWLUN; DPRINTF(sc, UDMASS_BBB, "CBW %d: cmd =3D %db " "(0x%02x%02x%02x%02x%02x%02x%s), " "data =3D %db, lun =3D %d, dir =3D %s\n", tag, clen, c[0], c[1], c[2], c[3], c[4], c[5], (clen > 6 ? "..." : ""), dlen, lun, (flags =3D=3D CBWFLAGS_IN ? "in" : (flags =3D=3D CBWFLAGS_OUT ? "out" : ""))); } static void umass_bbb_dump_csw(struct umass_softc *sc, umass_bbb_csw_t *csw) { uint32_t sig =3D UGETDW(csw->dCSWSignature); uint32_t tag =3D UGETDW(csw->dCSWTag); uint32_t res =3D UGETDW(csw->dCSWDataResidue); uint8_t status =3D csw->bCSWStatus; DPRINTF(sc, UDMASS_BBB, "CSW %d: sig =3D 0x%08x (%s), tag =3D 0x%08x, " "res =3D %d, status =3D 0x%02x (%s)\n", tag, sig, (sig =3D=3D CSWSIGNATURE ? "valid" : "invalid"), tag, res, status, (status =3D=3D CSWSTATUS_GOOD ? "good" : (status =3D=3D CSWSTATUS_FAILED ? "failed" : (status =3D=3D CSWSTATUS_PHASE ? "phase" : "")))); } static void umass_cbi_dump_cmd(struct umass_softc *sc, void *cmd, uint8_t cmdlen) { uint8_t *c =3D cmd; uint8_t dir =3D sc->sc_transfer.dir; DPRINTF(sc, UDMASS_BBB, "cmd =3D %db " "(0x%02x%02x%02x%02x%02x%02x%s), " "data =3D %db, dir =3D %s\n", cmdlen, c[0], c[1], c[2], c[3], c[4], c[5], (cmdlen > 6 ? "..." : ""), sc->sc_transfer.data_len, (dir =3D=3D DIR_IN ? "in" : (dir =3D=3D DIR_OUT ? "out" : (dir =3D=3D DIR_NONE ? "no data phase" : "")))); } static void umass_dump_buffer(struct umass_softc *sc, uint8_t *buffer, uint32_t buflen, uint32_t printlen) { uint32_t i, j; char s1[40]; char s2[40]; char s3[5]; s1[0] =3D '\0'; s3[0] =3D '\0'; sprintf(s2, " buffer=3D%p, buflen=3D%d", buffer, buflen); for (i =3D 0; (i < buflen) && (i < printlen); i++) { j =3D i % 16; if (j =3D=3D 0 && i !=3D 0) { DPRINTF(sc, UDMASS_GEN, "0x %s%s\n", s1, s2); s2[0] =3D '\0'; } sprintf(&s1[j * 2], "%02x", buffer[i] & 0xff); } if (buflen > printlen) sprintf(s3, " ..."); DPRINTF(sc, UDMASS_GEN, "0x %s%s%s\n", s1, s2, s3); } #endif --=20 caveat utilitor, Indi From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 15:19:05 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 C780D10656A9 for ; Sat, 21 Aug 2010 15:19:05 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id 594888FC0A for ; Sat, 21 Aug 2010 15:19:04 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=p0DJaE8zavVXm5tqcSh7H4n2mR2d5Wi7j6pzZ51DRjI= c=1 sm=1 a=H72ThNcfaIcA:10 a=8nJEP1OIZ-IA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=a4FWvl3ZTBXTrqre8q4A:9 a=_yDbp-m4_aVg7OTRLSZ3WZVygqkA:4 a=wPNLvfGTeEIA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:117 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 9141265; Sat, 21 Aug 2010 17:18:09 +0200 From: Hans Petter Selasky To: indulekha Date: Sat, 21 Aug 2010 17:15:12 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <20100821120316.GA3352@satcidananda.16x108.merseine.nu> <201008211652.28344.hselasky@c2i.net> <1282403324.2030.10.camel@satcidananda> In-Reply-To: <1282403324.2030.10.camel@satcidananda> 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: <201008211715.12721.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 15:19:05 -0000 On Saturday 21 August 2010 17:08:44 indulekha wrote: > > --HPS > > Well, see for yourself then: Hi, Ok, I see. I'm using a newer version of the same file :-) Try to enable some of the quirks listed in my previous email using usbconfig. Also check dmesg for errors. --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 15:20:06 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 52FD51065670 for ; Sat, 21 Aug 2010 15:20:06 +0000 (UTC) (envelope-from thebeelzebubtrigger@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 083D98FC14 for ; Sat, 21 Aug 2010 15:20:05 +0000 (UTC) Received: by yxe42 with SMTP id 42so1909931yxe.13 for ; Sat, 21 Aug 2010 08:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:content-transfer-encoding :organization:date:message-id:mime-version:x-mailer; bh=fL0UHCKbSUzgjQEGVZI5gjHtbXy3j/8pGHsD8Mfu0Nk=; b=QPGZkcwfptHQYQiz24DW/uB9tZrdvZs5CzecRWlHrc12bIaO19QtkRyhKowwlTRUDA 4BgDXgWpQg8EC8JGgK0JT3ba42JR/dF6hRWBolp8iZCxSfX9CZVqpMJotVjJS6rFQMK/ u26c2YGYMNj0i5ljBT0bx8f2CMSiN3ysy6YFs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type :content-transfer-encoding:organization:date:message-id:mime-version :x-mailer; b=kEAANallGCrj4QnRZV8kcyAmUbYxAC1r3XkbHhilwjQjtqmi4jr+J6n1nLndvY0v9E 0TiaY/km6wxexz62OGv3Uag6U6eb0AC4Z0WJjYrTG9H3xPMhIjd20eKhGxozc/P7ObuC ZDzGueq/1rlKbVk3Cko6Q9Ze/fJlV9SYBirXM= Received: by 10.151.130.15 with SMTP id h15mr3023118ybn.378.1282404005276; Sat, 21 Aug 2010 08:20:05 -0700 (PDT) Received: from satcidananda.16x108.merseine.nu (adsl-152-64-246.asm.bellsouth.net [72.152.64.246]) by mx.google.com with ESMTPS id q3sm5099997ybe.14.2010.08.21.08.20.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 08:20:04 -0700 (PDT) From: indulekha To: Hans Petter Selasky In-Reply-To: <201008211654.03995.hselasky@c2i.net> References: <20100821120316.GA3352@satcidananda.16x108.merseine.nu> <1282402472.2030.2.camel@satcidananda> <201008211652.28344.hselasky@c2i.net> <201008211654.03995.hselasky@c2i.net> Content-Type: text/plain; charset="ASCII" Content-Transfer-Encoding: quoted-printable Organization: what, me organize? Date: Sat, 21 Aug 2010 11:20:03 -0400 Message-ID: <1282404003.2297.3.camel@satcidananda> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 FreeBSD GNOME Team Port Cc: freebsd-usb@freebsd.org Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 15:20:06 -0000 On Sat, 2010-08-21 at 16:54 +0200, Hans Petter Selasky wrote: > On Saturday 21 August 2010 16:52:28 Hans Petter Selasky wrote: > > On Saturday 21 August 2010 16:54:32 indulekha wrote: > > > On Sat, 2010-08-21 at 16:37 +0200, Hans Petter Selasky wrote: > > > > There is a command to add quirks. Look at the source code: > > > >=20 > > > > grep UQ_ /sys/dev/usb/storage/umass.c > > > >=20 > > > > and look for UQ_ > > >=20 > > > Thanks for the suggestion. Unfortunately the string "UQ_" > > > (or even "UQ") does not appear in umass.c. > >=20 > > Then you typed something wrong: > >=20 > > grep UQ_ /sys/dev/usb/storage/umass.c > > if (usb_test_quirk(uaa, UQ_MSC_FORCE_WIRE_BBB)) { > > } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_WIRE_CBI)) { > > } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_WIRE_CBI_I)) { > > if (usb_test_quirk(uaa, UQ_MSC_FORCE_PROTO_SCSI)) { > > } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_PROTO_ATAPI)) { > > } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_PROTO_UFI)) { > > } else if (usb_test_quirk(uaa, UQ_MSC_FORCE_PROTO_RBC)) { > > if (usb_test_quirk(uaa, UQ_MSC_NO_TEST_UNIT_READY)) > > if (usb_test_quirk(uaa, UQ_MSC_NO_RS_CLEAR_UA)) > > if (usb_test_quirk(uaa, UQ_MSC_NO_START_STOP)) > > if (usb_test_quirk(uaa, UQ_MSC_NO_GETMAXLUN)) > > if (usb_test_quirk(uaa, UQ_MSC_NO_INQUIRY)) > > if (usb_test_quirk(uaa, UQ_MSC_NO_INQUIRY_EVPD)) > > if (usb_test_quirk(uaa, UQ_MSC_NO_SYNC_CACHE)) > > if (usb_test_quirk(uaa, UQ_MSC_SHUTTLE_INIT)) > > if (usb_test_quirk(uaa, UQ_MSC_ALT_IFACE_1)) > > if (usb_test_quirk(uaa, UQ_MSC_FLOPPY_SPEED)) > > if (usb_test_quirk(uaa, UQ_MSC_IGNORE_RESIDUE)) > > if (usb_test_quirk(uaa, UQ_MSC_WRONG_CSWSIG)) > > if (usb_test_quirk(uaa, UQ_MSC_RBC_PAD_TO_12)) > > if (usb_test_quirk(uaa, UQ_MSC_READ_CAP_OFFBY1)) > > if (usb_test_quirk(uaa, UQ_MSC_FORCE_SHORT_INQ)) > >=20 > > --HPS >=20 > Hi, >=20 > Another suggestion: >=20 > Look in the dmesg and see if there are any errors. >=20 > --HPS Yes, there is a dmesg error: ugen4.5: <(null)> at usbus4 (disconnected) uhub_reattach_port:435: could not allocate new device! But then just a few lines later, dmesg says: ugen4.5: at usbus4 umass1: on usbus4 umass1: SCSI over Bulk-Only; quirks =3D 0x0000 umass1:3:1:-1: Attached to scbus3 da1 at umass-sim1 bus 1 target 0 lun 0 da1: Fixed Direct Access SCSI-4 device=20 da1: 40.000MB/s transfers da1: 305245MB (625142448 512 byte sectors: 255H 63S/T 38913C) I'm thinking there's some sort of power management scheme in the=20 Seagate that umass has trouble accommodating. --=20 caveat utilitor, Indi From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 15:22:08 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 9EC5910656A4 for ; Sat, 21 Aug 2010 15:22:08 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 2F2778FC13 for ; Sat, 21 Aug 2010 15:22:07 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=6KUfmzbym87FxoMGRWTr46e60yW4QTEOPMCHQyBOt0U= c=1 sm=1 a=H72ThNcfaIcA:10 a=8nJEP1OIZ-IA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=An1oCUQ1fVeNEJwPu9QA:9 a=x-eH1q-Je5FL8PLNNR0LiVSdY00A:4 a=wPNLvfGTeEIA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:117 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 9157636; Sat, 21 Aug 2010 17:21:58 +0200 From: Hans Petter Selasky To: indulekha Date: Sat, 21 Aug 2010 17:18:21 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <20100821120316.GA3352@satcidananda.16x108.merseine.nu> <201008211654.03995.hselasky@c2i.net> <1282404003.2297.3.camel@satcidananda> In-Reply-To: <1282404003.2297.3.camel@satcidananda> 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: <201008211718.21378.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 15:22:08 -0000 > > Yes, there is a dmesg error: > > ugen4.5: <(null)> at usbus4 (disconnected) > uhub_reattach_port:435: could not allocate new device! > > But then just a few lines later, dmesg says: > > ugen4.5: at usbus4 > umass1: on usbus4 > umass1: SCSI over Bulk-Only; quirks = 0x0000 > umass1:3:1:-1: Attached to scbus3 > da1 at umass-sim1 bus 1 target 0 lun 0 > da1: Fixed Direct Access SCSI-4 device > da1: 40.000MB/s transfers > da1: 305245MB (625142448 512 byte sectors: 255H 63S/T 38913C) > > I'm thinking there's some sort of power management scheme in the > Seagate that umass has trouble accommodating. Does your USB device have a separate power supply? --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 15:37:21 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 E433A106564A for ; Sat, 21 Aug 2010 15:37:21 +0000 (UTC) (envelope-from thebeelzebubtrigger@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9A0CB8FC19 for ; Sat, 21 Aug 2010 15:37:21 +0000 (UTC) Received: by gyg4 with SMTP id 4so1928233gyg.13 for ; Sat, 21 Aug 2010 08:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:content-transfer-encoding :organization:date:message-id:mime-version:x-mailer; bh=BYdVgqdcHogAdjHZgCqR6PFnKHrja8JNmgzkbHsfRVw=; b=f0f1OPzrg1d5k4vOFuw7aOYO2mKiklL9HBewo2zZbYC2fVu6A5ZbnyuNR+pkQrxd58 eialiELjk8qIQHriKElQL8Bj/huDRPxCu2U1GB/E9zgFKHMf+04D1aXFgbH7RuNAWjDV RgVW0D4dRj8tROMS1YQJMUMe0qVtj/y990GRQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type :content-transfer-encoding:organization:date:message-id:mime-version :x-mailer; b=Sp99JDgzmD9AB/SyWee0TM3GPoGMoWcL0G93Zi7BpwNpiRUPkxKjBdiUsyYY9ZMW6G 672jDrStxKxJBCKf3jMrnZpx3AaDyoi/v9hGK4Wn6748x++51CIzbe5Q4bjjhPDh7g4I CwHCx0WExa6AcLE1yfFWi48/WNA/+JQ+ohMHo= Received: by 10.150.2.8 with SMTP id 8mr3048090ybb.394.1282405040754; Sat, 21 Aug 2010 08:37:20 -0700 (PDT) Received: from satcidananda.16x108.merseine.nu (adsl-152-64-246.asm.bellsouth.net [72.152.64.246]) by mx.google.com with ESMTPS id q21sm5124525ybk.23.2010.08.21.08.37.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 08:37:20 -0700 (PDT) From: indulekha To: Hans Petter Selasky In-Reply-To: <201008211718.21378.hselasky@c2i.net> References: <20100821120316.GA3352@satcidananda.16x108.merseine.nu> <201008211654.03995.hselasky@c2i.net> <1282404003.2297.3.camel@satcidananda> <201008211718.21378.hselasky@c2i.net> Content-Type: text/plain; charset="ASCII" Content-Transfer-Encoding: quoted-printable Organization: what, me organize? Date: Sat, 21 Aug 2010 11:37:18 -0400 Message-ID: <1282405038.2000.2.camel@satcidananda> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 FreeBSD GNOME Team Port Cc: freebsd-usb@freebsd.org Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 15:37:22 -0000 On Sat, 2010-08-21 at 17:18 +0200, Hans Petter Selasky wrote: > >=20 > > Yes, there is a dmesg error: > >=20 > > ugen4.5: <(null)> at usbus4 (disconnected) > > uhub_reattach_port:435: could not allocate new device! > >=20 > > But then just a few lines later, dmesg says: > >=20 > > ugen4.5: at usbus4 > > umass1: on usbus4 > > umass1: SCSI over Bulk-Only; quirks =3D 0x0000 > > umass1:3:1:-1: Attached to scbus3 > > da1 at umass-sim1 bus 1 target 0 lun 0 > > da1: Fixed Direct Access SCSI-4 device > > da1: 40.000MB/s transfers > > da1: 305245MB (625142448 512 byte sectors: 255H 63S/T 38913C) > >=20 > > I'm thinking there's some sort of power management scheme in the > > Seagate that umass has trouble accommodating. >=20 >=20 > Does your USB device have a separate power supply? >=20 > --HPS No, it's one of those pocket-sized HDDs. This one, actually: http://www.amazon.com/gp/product/B001SJZV10/ref=3Doss_product --=20 caveat utilitor, Indi From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 16:00:14 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 6F0511065674 for ; Sat, 21 Aug 2010 16:00:14 +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 00C8D8FC1A for ; Sat, 21 Aug 2010 16:00:13 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=uQlts9P3TFIiE3mXDKsOajf6rXzGvPXEyWzE93HpGms= c=1 sm=1 a=H72ThNcfaIcA:10 a=8nJEP1OIZ-IA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=vggBfdFIAAAA:8 a=kZGz_aAmi81TgAWmz_kA:9 a=7Alyyp-UNZtUsJrexVv_g1arjtEA: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 9943123; Sat, 21 Aug 2010 17:59:14 +0200 From: Hans Petter Selasky To: indulekha Date: Sat, 21 Aug 2010 17:56:26 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <20100821120316.GA3352@satcidananda.16x108.merseine.nu> <201008211718.21378.hselasky@c2i.net> <1282405038.2000.2.camel@satcidananda> In-Reply-To: <1282405038.2000.2.camel@satcidananda> 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: <201008211756.26486.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 16:00:14 -0000 On Saturday 21 August 2010 17:37:18 indulekha wrote: > On Sat, 2010-08-21 at 17:18 +0200, Hans Petter Selasky wrote: > > > Yes, there is a dmesg error: > > > > > > ugen4.5: <(null)> at usbus4 (disconnected) > > > uhub_reattach_port:435: could not allocate new device! > > > > > > But then just a few lines later, dmesg says: > > > > > > ugen4.5: at usbus4 > > > umass1: on usbus4 > > > umass1: SCSI over Bulk-Only; quirks = 0x0000 > > > umass1:3:1:-1: Attached to scbus3 > > > da1 at umass-sim1 bus 1 target 0 lun 0 > > > da1: Fixed Direct Access SCSI-4 device > > > da1: 40.000MB/s transfers > > > da1: 305245MB (625142448 512 byte sectors: 255H 63S/T 38913C) > > > > > > I'm thinking there's some sort of power management scheme in the > > > Seagate that umass has trouble accommodating. > > > > Does your USB device have a separate power supply? > > > > --HPS > > No, it's one of those pocket-sized HDDs. > This one, actually: > http://www.amazon.com/gp/product/B001SJZV10/ref=oss_product Hi, Try to use an external self-powered USB HUB and see if the problem is the same. --PS From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 16:03:13 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 E38AE1065753 for ; Sat, 21 Aug 2010 16:03:13 +0000 (UTC) (envelope-from chungyeol.lee@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id B0C128FC16 for ; Sat, 21 Aug 2010 16:03:13 +0000 (UTC) Received: by pzk7 with SMTP id 7so1880102pzk.13 for ; Sat, 21 Aug 2010 09:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:organazation:user-agent; bh=3tJ3fhOhRe81pvFDXL84DHNDcHroMYahHX9j54+hBOA=; b=x5aBigd9ASahFfTUrCH3MwmvmoAbf+bu77jZ4hpfLFHrluFEn5/Y1jSDbtnmek2T9x zlXvG7UuTvqxcR2CVIjL1EDWoyDk12n7yGcioj2MrKWQazbhAsapAFKHqDLopHOALM/f cNXgCKQTeWClX4DYL6QNnAY/RBtR1+6k2wb80= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:organazation :user-agent; b=xSa1FJwYToNZG0Iue2Vg24Vh0wtB3Z7ddQ7fbVCth9PfHJhxN6IHnvSTsd364MmiOX BllxCo0RsdFigqscfrz8WZW6AbWPGjogZtOuDASZJgdh595SEyzi5CQgQVJow1ia5w/J jOeGlQdxfzhxHrLhJr+GXoIm+vtXKdPK36p8s= Received: by 10.114.110.2 with SMTP id i2mr3170853wac.142.1282406593127; Sat, 21 Aug 2010 09:03:13 -0700 (PDT) Received: from genie.honey.home ([124.57.9.45]) by mx.google.com with ESMTPS id n32sm7569405wag.11.2010.08.21.09.03.10 (version=SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 09:03:12 -0700 (PDT) Date: Sun, 22 Aug 2010 01:02:56 +0900 From: "Lee, Chung-Yeol" To: Hans Petter Selasky Message-ID: <20100821160256.GA3058@genie.honey.home> References: <20100821082306.GA2204@genie.honey.home> <201008211716.31156.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline In-Reply-To: <201008211716.31156.hselasky@c2i.net> Organazation: KAIST User-Agent: Mutt/1.5.20 (2009-06-14) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-usb@freebsd.org Subject: Re: Use extra buttons of Kensington Slimblade Trackball X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Lee, Chung-Yeol" List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Aug 2010 16:03:14 -0000 --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Aug 21, 2010 at 05:16:31PM +0200, Hans Petter Selasky wrote: > On Saturday 21 August 2010 10:23:06 Lee, Chung-Yeol wrote: > > Hi, > > > > While I'm searching how to use the extra buttons in Kensington Slimblade > > Trackball, I made a patch for myself based on the linux driver. > > > > I confirmed it works as intended. However, I have no experience with the > > FreeBSD kernel and I'm not sure that I modified it in a correct way. -- > > especially, I don't know should I use usb_quirks? > > > > Can somebody check the attached diff file so that I can send problem > > report? > > > > Thanks. > > Hi, > > Can you re-send your patch to me. The listware stripped it off. I think there > is also a similar patch in 9-current. Please check the version history of: > > /sys/dev/usb/input/ums.c > > --HPS diff file is against 8-STABLE. I just looked ums.c in HEAD from Web CVS repository and can't find similar code. C.-Y. Lee --+QahgC5+KEYLbs62-- From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 16:22:33 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 0D9E610656A7 for ; Sat, 21 Aug 2010 16:22:33 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id 94C0E8FC17 for ; Sat, 21 Aug 2010 16:22:32 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=AloUlVQQLuutPgH7MSFGD/V8MYI3aUCj623mET0KTys= c=1 sm=1 a=QUPKdYJc--0A:10 a=Q9fys5e9bTEA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=6I5d2MoRAAAA:8 a=_PScVVYaL0m7yLg0XGQA:9 a=waOsWVqBGH9o5MwbdkVenMeMx94A:4 a=PUjeQqilurYA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:117 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 8865871; Sat, 21 Aug 2010 18:21:46 +0200 From: Hans Petter Selasky To: "Lee, Chung-Yeol" Date: Sat, 21 Aug 2010 18:18:45 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <20100821082306.GA2204@genie.honey.home> <201008211716.31156.hselasky@c2i.net> <20100821160256.GA3058@genie.honey.home> In-Reply-To: <20100821160256.GA3058@genie.honey.home> 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-15" Content-Transfer-Encoding: 7bit Message-Id: <201008211818.45479.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: Use extra buttons of Kensington Slimblade Trackball 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, 21 Aug 2010 16:22:33 -0000 On Saturday 21 August 2010 18:02:56 Lee, Chung-Yeol wrote: > On Sat, Aug 21, 2010 at 05:16:31PM +0200, Hans Petter Selasky wrote: > > On Saturday 21 August 2010 10:23:06 Lee, Chung-Yeol wrote: > > > Hi, > > > > > > While I'm searching how to use the extra buttons in Kensington > > > Slimblade > > > > > > Trackball, I made a patch for myself based on the linux driver. > > > > > > I confirmed it works as intended. However, I have no experience with > > > the FreeBSD kernel and I'm not sure that I modified it in a correct > > > way. -- especially, I don't know should I use usb_quirks? > > > > > > Can somebody check the attached diff file so that I can send problem > > > > > > report? > > > > > > Thanks. > > > > Hi, > > > > Can you re-send your patch to me. The listware stripped it off. I think > > there is also a similar patch in 9-current. Please check the version > > history of: > > > > /sys/dev/usb/input/ums.c > > > > --HPS > > diff file is against 8-STABLE. > I just looked ums.c in HEAD from Web CVS repository and can't find similar > code. > > C.-Y. Lee Hi, Please check and verify this patch: http://p4web.freebsd.org/@@182688?ac=10 Also, could you dump the device, config and HID descriptors of your mouse. See man usbconfig on how to do that. --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 16:26:24 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 A9A88106567A for ; Sat, 21 Aug 2010 16:26:24 +0000 (UTC) (envelope-from thebeelzebubtrigger@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5E6B08FC1D for ; Sat, 21 Aug 2010 16:26:24 +0000 (UTC) Received: by gyg4 with SMTP id 4so1939888gyg.13 for ; Sat, 21 Aug 2010 09:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:content-transfer-encoding :organization:date:message-id:mime-version:x-mailer; bh=OJblS5kYhrI2u3iN5cqp3V8J/paLQEds77QTe3nKzVM=; b=mZk5+fTjGICzm1qqjnJjQ28wN+6G9qImH3BNH0v2dyIrO1HNvX6syDhQXWGPI3B9pe xGIc2d3+b3O4VQscVJBEK9+wvfGlH1BXYugkPdZGVgVL+CJ7mQlbtunKp11mqrNEi67F o/d6n+GrMC9Cq8guIgyL9rUSsJg58TlWFjDvI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type :content-transfer-encoding:organization:date:message-id:mime-version :x-mailer; b=WrB9ysjKffeNNE0fkQVuaT5uy8Ywse53mU2b4b5+KpUE7UXpz/9lWEK+oHd7pMlhbS 9K8Omz0U7bkoqpgWbAUcPeAmk5GZwzMZWUp6CirfMcjiNxZa4OBaSUNUGaLwvsAEwCqf E70NmKuWIHmzv2oFPxAkbiQyes+57sdt/cZsw= Received: by 10.101.84.18 with SMTP id m18mr3302199anl.60.1282407983647; Sat, 21 Aug 2010 09:26:23 -0700 (PDT) Received: from satcidananda.16x108.merseine.nu (adsl-152-64-246.asm.bellsouth.net [72.152.64.246]) by mx.google.com with ESMTPS id c38sm6856593anc.39.2010.08.21.09.26.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 09:26:23 -0700 (PDT) From: indulekha To: Hans Petter Selasky In-Reply-To: <201008211756.26486.hselasky@c2i.net> References: <20100821120316.GA3352@satcidananda.16x108.merseine.nu> <201008211718.21378.hselasky@c2i.net> <1282405038.2000.2.camel@satcidananda> <201008211756.26486.hselasky@c2i.net> Content-Type: text/plain; charset="ASCII" Content-Transfer-Encoding: quoted-printable Organization: what, me organize? Date: Sat, 21 Aug 2010 12:26:21 -0400 Message-ID: <1282407981.2000.26.camel@satcidananda> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 FreeBSD GNOME Team Port Cc: freebsd-usb@freebsd.org Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 16:26:24 -0000 On Sat, 2010-08-21 at 17:56 +0200, Hans Petter Selasky wrote: > On Saturday 21 August 2010 17:37:18 indulekha wrote: > > On Sat, 2010-08-21 at 17:18 +0200, Hans Petter Selasky wrote: > > > > Yes, there is a dmesg error: > > > >=20 > > > > ugen4.5: <(null)> at usbus4 (disconnected) > > > > uhub_reattach_port:435: could not allocate new device! > > > >=20 > > > > But then just a few lines later, dmesg says: > > > >=20 > > > > ugen4.5: at usbus4 > > > > umass1: on usb= us4 > > > > umass1: SCSI over Bulk-Only; quirks =3D 0x0000 > > > > umass1:3:1:-1: Attached to scbus3 > > > > da1 at umass-sim1 bus 1 target 0 lun 0 > > > > da1: Fixed Direct Access SCSI-4 device > > > > da1: 40.000MB/s transfers > > > > da1: 305245MB (625142448 512 byte sectors: 255H 63S/T 38913C) > > > >=20 > > > > I'm thinking there's some sort of power management scheme in the > > > > Seagate that umass has trouble accommodating. > > >=20 > > > Does your USB device have a separate power supply? > > >=20 > > > --HPS > >=20 > > No, it's one of those pocket-sized HDDs. > > This one, actually: > > http://www.amazon.com/gp/product/B001SJZV10/ref=3Doss_product >=20 > Hi, >=20 > Try to use an external self-powered USB HUB and see if the problem is the= =20 > same. >=20 > --PS Sorry, don't have one of those.=20 Also, I really haven't been able to find much online about how to enable quirks, whether the quirks listed in the ouput of usbconfig are already in effect or just available for implementation, if there's some formula for creating them, whether any should be avoided, what is the exact command to enable or disable quirks, etc.=20 It's surprising how terribly scarce this knowledge seems to be. =20 All I know is spending Saturday morning screwing around with this was=20 not my plan. :) I'm not trying to become an expert on USB, just thought someone somewhere would see my post and say "oh yeah, just modify line n of file foo to *this* and off you go". Instead this is looking more like an adventure requiring hours and hours of reading I just don't have time for right now. But thanks for taking the time to try to help, I'm just not knowledgeable enough to make use of it yet. :)=20 --=20 caveat utilitor, Indi From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 16:33:01 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 8B13C10656BE for ; Sat, 21 Aug 2010 16:33:01 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.freebsd.org (Postfix) with ESMTP id 17AFA8FC1A for ; Sat, 21 Aug 2010 16:33:00 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=9IIj2yEt9mCpiLyep4f0BnD2ZC7rS3PjQbiokY3Mrg0= c=1 sm=1 a=H72ThNcfaIcA:10 a=8nJEP1OIZ-IA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=qRLFkcTO7qyJixKAxfkA:9 a=lk0c7TkX8kYsNtzuI3QA:7 a=jD2aLOpn9dVifjWkySrpXQvfGPAA:4 a=wPNLvfGTeEIA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:117 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 9753346; Sat, 21 Aug 2010 18:32:27 +0200 From: Hans Petter Selasky To: indulekha Date: Sat, 21 Aug 2010 18:29:13 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <20100821120316.GA3352@satcidananda.16x108.merseine.nu> <201008211756.26486.hselasky@c2i.net> <1282407981.2000.26.camel@satcidananda> In-Reply-To: <1282407981.2000.26.camel@satcidananda> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'( =?iso-8859-1?q?=3B=5FIjlA=3A=0A=09hGE=2E=2EEw?=, =?iso-8859-1?q?XAQ*o=23=5C/M=7ESC=3DS1-f9=7BEzRfT=27=7CHhll5Q=5Dha5Bt-s=7Co?= =?iso-8859-1?q?TlKMusi=3A1e=5BwJl=7Dkd=7DGR=0A=09Z0adGx-x=5F0zGbZj=27e?=(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: <201008211829.13658.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 16:33:01 -0000 On Saturday 21 August 2010 18:26:21 indulekha wrote: > what is the exact > command to enable or disable quirks, etc. Hi, The format is: usbconfig add_dev_quirk_vplh vid: VendorID pid: ProductID lo_rev: 0 Hi_rev 0xffff quirk: your quirk UQ_XXX If the driver shows a disconnect message or attach failure, then I think quirks won't help. Instead of replugging your device, it is sometimes possible to make the device available using: usbconfig -u X -a Y reset Where X and Y are the ugenX.Y for your root HUB or your device. You need to be root to execute these commands. --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 16:49:14 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 4775D1065697 for ; Sat, 21 Aug 2010 16:49:14 +0000 (UTC) (envelope-from thebeelzebubtrigger@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id F107F8FC15 for ; Sat, 21 Aug 2010 16:49:13 +0000 (UTC) Received: by gxk24 with SMTP id 24so1946538gxk.13 for ; Sat, 21 Aug 2010 09:49:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:content-transfer-encoding :organization:date:message-id:mime-version:x-mailer; bh=zkYEcz+jV2aLO8mvkgTsNM7SFD7bLXPDlnKd1tG2kIM=; b=vRrS6jhCzvjvTEam6yzmvLyTRcXOG8PMrqK2U3G+SD2fnenOA7G6ax4nIpGp2VW8vi KipKkY5pt70QZl3bU1PqbvrzoUmMXf/QvfBa1rSwrLrD1GHD0Oao6wBEkEzs2n0cjo+i U43xnbnG34c9Ib5/IFyRkJVqARRtnt4FPV2xA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type :content-transfer-encoding:organization:date:message-id:mime-version :x-mailer; b=KNerFb/jDPDTXp0EkQ+scZcbj6q/Azs12iBLeEym9miavsfOhxGCMlw80M/DA9KEzl l2R5JH/d+e9QEnAWhCMybZN9sPfa3EjlbHyAR+OXm+VQ4ZHjp07dEMDXynC+0/PtEBR4 z/c8bA71B2in72BHEVuH1d7R9TMyStRr1dB4s= Received: by 10.100.199.12 with SMTP id w12mr3285198anf.85.1282409353218; Sat, 21 Aug 2010 09:49:13 -0700 (PDT) Received: from satcidananda.16x108.merseine.nu (adsl-152-64-246.asm.bellsouth.net [72.152.64.246]) by mx.google.com with ESMTPS id f22sm6891846anh.24.2010.08.21.09.49.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 09:49:12 -0700 (PDT) From: indulekha To: Hans Petter Selasky In-Reply-To: <201008211829.13658.hselasky@c2i.net> References: <20100821120316.GA3352@satcidananda.16x108.merseine.nu> <201008211756.26486.hselasky@c2i.net> <1282407981.2000.26.camel@satcidananda> <201008211829.13658.hselasky@c2i.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Organization: what, me organize? Date: Sat, 21 Aug 2010 12:49:11 -0400 Message-ID: <1282409351.2584.5.camel@satcidananda> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 FreeBSD GNOME Team Port Cc: freebsd-usb@freebsd.org Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 16:49:14 -0000 On Sat, 2010-08-21 at 18:29 +0200, Hans Petter Selasky wrote: > On Saturday 21 August 2010 18:26:21 indulekha wrote: > > what is the exact > > command to enable or disable quirks, etc.=20 >=20 > Hi, >=20 > The format is: >=20 > usbconfig add_dev_quirk_vplh >=20 > vid: VendorID > pid: ProductID >=20 > lo_rev: 0 > Hi_rev 0xffff >=20 > quirk: your quirk UQ_XXX >=20 > If the driver shows a disconnect message or attach failure, then I think= =20 > quirks won't help. >=20 > Instead of replugging your device, it is sometimes possible to make the d= evice=20 > available using: >=20 > usbconfig -u X -a Y reset >=20 > Where X and Y are the ugenX.Y for your root HUB or your device. >=20 > You need to be root to execute these commands. >=20 > --HPS Thanks very much for that. I'll try the usbconfig reset next time I reboot -- it drops me into single user mode every time due to the=20 unavailable fstab filesystem (my home directory is on that disk, didn't realize there'd be a problem til I rebooted). Fortunately I don't reboot this machine often... --=20 caveat utilitor, Indi From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 16:53:59 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 732FF1065696 for ; Sat, 21 Aug 2010 16:53:59 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id 9DA8C8FC0C for ; Sat, 21 Aug 2010 16:53:58 +0000 (UTC) Received: from park.js.berklix.net (p549A76F5.dip.t-dialin.net [84.154.118.245]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id o7LGa5Tk048379; Sat, 21 Aug 2010 16:36:06 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.13.8/8.13.8) with ESMTP id o7LGZmdq006430; Sat, 21 Aug 2010 18:35:49 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.3/8.14.3) with ESMTP id o7LGZan3008193; Sat, 21 Aug 2010 18:35:38 +0200 (CEST) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201008211635.o7LGZan3008193@fire.js.berklix.net> To: Hans Petter Selasky From: "Julian H. Stacey" Organization: http://www.berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Sat, 21 Aug 2010 17:56:26 +0200." <201008211756.26486.hselasky@c2i.net> Date: Sat, 21 Aug 2010 18:35:36 +0200 Sender: jhs@berklix.com Cc: freebsd-usb@freebsd.org Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 16:53:59 -0000 Hans Petter Selasky wrote: > On Saturday 21 August 2010 17:37:18 indulekha wrote: > > On Sat, 2010-08-21 at 17:18 +0200, Hans Petter Selasky wrote: > > > > Yes, there is a dmesg error: > > > > > > > > ugen4.5: <(null)> at usbus4 (disconnected) > > > > uhub_reattach_port:435: could not allocate new device! > > > > > > > > But then just a few lines later, dmesg says: > > > > > > > > ugen4.5: at usbus4 > > > > umass1: on usbus4 > > > > umass1: SCSI over Bulk-Only; quirks = 0x0000 > > > > umass1:3:1:-1: Attached to scbus3 > > > > da1 at umass-sim1 bus 1 target 0 lun 0 > > > > da1: Fixed Direct Access SCSI-4 device > > > > da1: 40.000MB/s transfers > > > > da1: 305245MB (625142448 512 byte sectors: 255H 63S/T 38913C) > > > > > > > > I'm thinking there's some sort of power management scheme in the > > > > Seagate that umass has trouble accommodating. > > > > > > Does your USB device have a separate power supply? > > > > > > --HPS Joining late, sorry > > No, it's one of those pocket-sized HDDs. > > This one, actually: > > http://www.amazon.com/gp/product/B001SJZV10/ref=oss_product No current rating at http://www.seagate.com/ww/v/index.jsp?name=ST903204EXM101-RK-apac-expansion-portable-usb-320gb-hd&vgnextoid=16816583b2561210VgnVCM1000001a48090aRCRD&locale=en-US#TabContentSpecifications > Hi, > > Try to use an external self-powered USB HUB and see if the problem is the > same. Yes, PS Ive had so much grief with USB over the years, I cut out some USB sockets off a dead mboard, so I can intercept & meausure voltage & current on USB devices. USB 1 & 2 is spec'd at <= 0.5 Amp, (more on USB3 later) As well as the hub, A power doubler USB Y leads into 2 sockets of the hub may help, also plug both of those in before the disc in the other end. (else voltage droop while disc spins may confuse disc internal logic). PPS HPS Re that suspicion above, I also have a device that used to confuse usbd & prob. still confuses devd, (I guess it was turning itself off after listening to cable, anyway it's free if you or another USB developer wants to play with it, contact me. http://berklix.com/~jhs/txt/clipman/ Cheers, Julian -- Julian Stacey: BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Mail plain text, Not HTML, quoted-printable & base 64 dumped with spam. Avoid top posting, It cripples itemised cumulative responses. From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 17:21:00 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 D75AE10656AC for ; Sat, 21 Aug 2010 17:21:00 +0000 (UTC) (envelope-from thebeelzebubtrigger@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 841E08FC1D for ; Sat, 21 Aug 2010 17:21:00 +0000 (UTC) Received: by gwj23 with SMTP id 23so1944078gwj.13 for ; Sat, 21 Aug 2010 10:20:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:content-transfer-encoding :organization:date:message-id:mime-version:x-mailer; bh=OnZhjLLEpBTQBiNXvvxF91FMtNhgkWZ2AfLjCc6DaGk=; b=e7yIMj5Em6ZIdy3+WVDnWPLcw8gJldpVjIapkITAJ/VdW7crLHP7EDnOINUiEyvA0e 8+U5nq4UMSsyyxV3ZQa4MKGqkIhYvBhFWDSSwBAFvm3heVluV43ZSYE2p5ZsO07S/IBa ymyeWZX60cS0ToMN8iYP8QH+8WaZpxZeXplME= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type :content-transfer-encoding:organization:date:message-id:mime-version :x-mailer; b=LYCU0gMClnAhdXASKxXbjVJyh59+D4c47gK9prVJbBfeFoTvOgWWFv8GGLuL1Bx2hI 3lDF9mrTPWqJRk/gMkAt8kFd/vJskT658R6TMkVSU3dH7AZZdKAirCD8pUW3/9rIAgQA hCIOjlmaJslNhmSaX9Aza85/d+DWi3nwSAofs= Received: by 10.151.47.4 with SMTP id z4mr3243614ybj.357.1282411259631; Sat, 21 Aug 2010 10:20:59 -0700 (PDT) Received: from satcidananda.16x108.merseine.nu (adsl-152-64-246.asm.bellsouth.net [72.152.64.246]) by mx.google.com with ESMTPS id q7sm78666yba.3.2010.08.21.10.20.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 10:20:59 -0700 (PDT) From: indulekha To: "Julian H. Stacey" In-Reply-To: <201008211635.o7LGZan3008193@fire.js.berklix.net> References: <201008211635.o7LGZan3008193@fire.js.berklix.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Organization: what, me organize? Date: Sat, 21 Aug 2010 13:20:57 -0400 Message-ID: <1282411257.2584.36.camel@satcidananda> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 FreeBSD GNOME Team Port Cc: freebsd-usb@freebsd.org Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 17:21:01 -0000 On Sat, 2010-08-21 at 18:35 +0200, Julian H. Stacey wrote: > Hans Petter Selasky wrote: > > On Saturday 21 August 2010 17:37:18 indulekha wrote: > > > On Sat, 2010-08-21 at 17:18 +0200, Hans Petter Selasky wrote: > > > > > Yes, there is a dmesg error: > > > > >=20 > > > > > ugen4.5: <(null)> at usbus4 (disconnected) > > > > > uhub_reattach_port:435: could not allocate new device! > > > > >=20 > > > > > But then just a few lines later, dmesg says: > > > > >=20 > > > > > ugen4.5: at usbus4 > > > > > umass1: on u= sbus4 > > > > > umass1: SCSI over Bulk-Only; quirks =3D 0x0000 > > > > > umass1:3:1:-1: Attached to scbus3 > > > > > da1 at umass-sim1 bus 1 target 0 lun 0 > > > > > da1: Fixed Direct Access SCSI-4 device > > > > > da1: 40.000MB/s transfers > > > > > da1: 305245MB (625142448 512 byte sectors: 255H 63S/T 38913C) > > > > >=20 > > > > > I'm thinking there's some sort of power management scheme in the > > > > > Seagate that umass has trouble accommodating. > > > >=20 > > > > Does your USB device have a separate power supply? > > > >=20 > > > > --HPS >=20 >=20 > Joining late, sorry >=20 > > > No, it's one of those pocket-sized HDDs. > > > This one, actually: > > > http://www.amazon.com/gp/product/B001SJZV10/ref=3Doss_product >=20 > No current rating at=20 > http://www.seagate.com/ww/v/index.jsp?name=3DST903204EXM101-RK-apac-expa= nsion-portable-usb-320gb-hd&vgnextoid=3D16816583b2561210VgnVCM1000001a48090= aRCRD&locale=3Den-US#TabContentSpecifications >=20 > > Hi, > >=20 > > Try to use an external self-powered USB HUB and see if the problem is t= he=20 > > same. >=20 > Yes, > PS Ive had so much grief with USB over the years, I cut out some > USB sockets off a dead mboard, so I can intercept & meausure voltage > & current on USB devices. >=20 > USB 1 & 2 is spec'd at <=3D 0.5 Amp, (more on USB3 later) >=20 > As well as the hub, > A power doubler USB Y leads into 2 sockets of the hub may help, > also plug both of those in before the disc in the other end. (else > voltage droop while disc spins may confuse disc internal logic). >=20 > PPS HPS Re that suspicion above, I also have a device that used to > confuse usbd & prob. still confuses devd, (I guess it was turning > itself off after listening to cable, anyway it's free if you or > another USB developer wants to play with it, contact me. > http://berklix.com/~jhs/txt/clipman/ >=20 > Cheers, > Julian Actually, I haven't had any trouble with USB for a long time now but=20 maybe that's just luck. :) Had to jump through some minor hoops to get=20 my Blackberry to mount, otherwise USB has pretty much "just worked" for me the last two years or so.=20 Well, there was one other purchase of a portable USB HDD before this one; it wasn't recognized at all so I just returned it. I'd have returned this one too had I known...=20 --=20 caveat utilitor, Indi =20 From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 17:25:11 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 793C910656F1 for ; Sat, 21 Aug 2010 17:25:11 +0000 (UTC) (envelope-from chungyeol.lee@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id 485118FC1F for ; Sat, 21 Aug 2010 17:25:11 +0000 (UTC) Received: by pvg4 with SMTP id 4so1878219pvg.13 for ; Sat, 21 Aug 2010 10:25:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:organazation:user-agent; bh=KsGXOcP/h1USr+M0Wvqbg9EoS9LL3euOpFUxdCfO3iY=; b=dR9ftzD0ctxrl4hOB3/FIoMF4fDTM2+pB98A34y6s0pUZwMYGBme6j2xLnPX1DZIIw pE5Y1INW20AxprZuh+5fbXlZgcJ4lDsD56w2mWJTyIiRdpa79ZNA39Yg5h2flYSk1za7 YmygLNfVAbirLgMTNVK0dJQa4CyXhtbYBUV5Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:organazation :user-agent; b=I970qrwEImiUpF+S8/r/nVEwj/KnUVDwulR3N328a/iBp4Hd/GkNxqjPRaO04YnPGl Yzl/5R3lMCkINehE3FkGdioDKk0X2/5fraLCeuHrYg7wyZk10/WECCGXlgSNcrdj/3jb iBrCKsziuQOUxHt7Ous5yNXPh7M7L3hjXo4R8= Received: by 10.114.75.17 with SMTP id x17mr3291624waa.86.1282411510794; Sat, 21 Aug 2010 10:25:10 -0700 (PDT) Received: from genie.honey.home ([124.57.9.45]) by mx.google.com with ESMTPS id d39sm7726625wam.4.2010.08.21.10.25.08 (version=SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 10:25:10 -0700 (PDT) Date: Sun, 22 Aug 2010 02:25:00 +0900 From: "Lee, Chung-Yeol" To: Hans Petter Selasky Message-ID: <20100821172500.GA3403@genie.honey.home> References: <20100821082306.GA2204@genie.honey.home> <201008211716.31156.hselasky@c2i.net> <20100821160256.GA3058@genie.honey.home> <201008211818.45479.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201008211818.45479.hselasky@c2i.net> Organazation: KAIST User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-usb@freebsd.org Subject: Re: Use extra buttons of Kensington Slimblade Trackball X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Lee, Chung-Yeol" List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Aug 2010 17:25:11 -0000 On Sat, Aug 21, 2010 at 06:18:45PM +0200, Hans Petter Selasky wrote: > On Saturday 21 August 2010 18:02:56 Lee, Chung-Yeol wrote: > > On Sat, Aug 21, 2010 at 05:16:31PM +0200, Hans Petter Selasky wrote: > > > On Saturday 21 August 2010 10:23:06 Lee, Chung-Yeol wrote: > > > > Hi, > > > > > > > > While I'm searching how to use the extra buttons in Kensington > > > > Slimblade > > > > > > > > Trackball, I made a patch for myself based on the linux driver. > > > > > > > > I confirmed it works as intended. However, I have no experience with > > > > the FreeBSD kernel and I'm not sure that I modified it in a correct > > > > way. -- especially, I don't know should I use usb_quirks? > > > > > > > > Can somebody check the attached diff file so that I can send problem > > > > > > > > report? > > > > > > > > Thanks. > > > > > > Hi, > > > > > > Can you re-send your patch to me. The listware stripped it off. I think > > > there is also a similar patch in 9-current. Please check the version > > > history of: > > > > > > /sys/dev/usb/input/ums.c > > > > > > --HPS > > > > diff file is against 8-STABLE. > > I just looked ums.c in HEAD from Web CVS repository and can't find similar > > code. > > > > C.-Y. Lee > > Hi, > > Please check and verify this patch: > > http://p4web.freebsd.org/@@182688?ac=10 > > Also, could you dump the device, config and HID descriptors of your mouse. See > man usbconfig on how to do that. > > --HPS It seems alright. Here's dump.. # usbconfig -u 0 -a 3 dump_device_desc ugen0.3: at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0110 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0008 idVendor = 0x047d idProduct = 0x2041 bcdDevice = 0x0105 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0000 bNumConfigurations = 0x0001 # usbconfig -u 0 -a 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 = 0x0022 bNumInterfaces = 0x0001 bConfigurationValue = 0x0001 iConfiguration = 0x0000 bmAttributes = 0x00a0 bMaxPower = 0x0032 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0001 bInterfaceClass = 0x0003 bInterfaceSubClass = 0x0001 bInterfaceProtocol = 0x0002 iInterface = 0x0000 Additional Descriptor bLength = 0x09 bDescriptorType = 0x21 bDescriptorSubType = 0x10 RAW dump: 0x00 | 0x09, 0x21, 0x10, 0x01, 0x00, 0x01, 0x22, 0x4b, 0x08 | 0x00 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 bmAttributes = 0x0003 wMaxPacketSize = 0x0005 bInterval = 0x000a bRefresh = 0x0000 bSynchAddress = 0x0000 # usbconfig -u 0 -a 3 do_request 0x81 0x06 0x2200 0 0x100 REQUEST = <0x05 0x01 0x09 0x02 0xa1 0x01 0x09 0x01 0xa1 0x00 0x05 0x09 0x19 0x01 0x29 0x02 0x15 0x00 0x25 0x01 0x95 0x02 0x75 0x01 0x81 0x02 0x95 0x01 0x75 0x06 0x81 0x03 0x05 0x01 0x09 0x30 0x09 0x31 0x09 0x38 0x15 0x81 0x25 0x7f 0x75 0x08 0x95 0x03 0x81 0x06 0x06 0x00 0xff 0x19 0x01 0x29 0x02 0x15 0x00 0x25 0x01 0x95 0x02 0x75 0x01 0x81 0x02 0x95 0x01 0x75 0x06 0x81 0x03 0xc0 0xc0><)%uu018%u)%uu> Thanks. C.-Y. Lee. From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 18:33:47 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 5516C1065672 for ; Sat, 21 Aug 2010 18:33:47 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe10.swipnet.se [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id DFF208FC08 for ; Sat, 21 Aug 2010 18:33:46 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=IkcTkHD0fZMA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=ver41ibYiVvOurB8HFEA:9 a=kGW2u7CAy5mCnVPphtWtO5bkzPIA:4 a=QEXdDO2ut3YA:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe10.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 1219556428; Sat, 21 Aug 2010 20:33:45 +0200 From: Hans Petter Selasky To: Volodymyr Kostyrko Date: Sat, 21 Aug 2010 20:29:59 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <201008192338.37828.hselasky@c2i.net> <4C701AE7.8030805@gmail.com> In-Reply-To: <4C701AE7.8030805@gmail.com> 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201008212029.59291.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: Transcend JetFlash V85 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, 21 Aug 2010 18:33:47 -0000 On Saturday 21 August 2010 20:28:55 Volodymyr Kostyrko wrote: > 20.08.2010 00:38, Hans Petter Selasky wrote: > > You can use usbconfig to add quirks on the fly. See: > > > > usbconfig -h > > > > And: > > > > man usbconfig > > Tried that, but it doesn't work for me or I'm messing things up... > > usbconfig -d 3.3 add_quirk UQ_MSC_NO_SYNC_CACHE > > And errors continue to show up. The man page also is kinda short on data. After setting the quirk, you need to reset or re-attach the USB device. --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 18:59:30 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 334E1106566C for ; Sat, 21 Aug 2010 18:59:30 +0000 (UTC) (envelope-from c.kworr@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id B7D148FC0C for ; Sat, 21 Aug 2010 18:59:29 +0000 (UTC) Received: by fxm4 with SMTP id 4so2712665fxm.13 for ; Sat, 21 Aug 2010 11:59:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=U8+p4mHRGGHBrTWIPDBGPs9pS+Lvv60vXonz590xrGk=; b=VvfXm/vnkTs/EkuyhujfBDeU/ZjwcJNvve1W/qgPuF7v6raXatXUPI9NX1yP+JSgSa T9ZSNi63CkJFkc11h4VSzr6uA1E+805md+txF0U0b7U1B7HLRCy36RDJ7IUzsgjBbEre eCnhUfGfd3JuqO6EbNtMc1hIY7rf7ToscRHK0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=WItTYsVrK0rwKtxrlSfRihQDw5w+AIZfBhvkbTbbyZuV+D5gzprNWi7VD30nj6wU1k sGjokuu4vBcHuHqcNIuy0Lr75y7ndG9gdD500PHYtVxK1xgA97s/ni19ZeL6uNyd3z9B zc8rLvAi540MsHkExgPZhDrwCikPnYnLXMTbI= Received: by 10.223.109.140 with SMTP id j12mr2486132fap.22.1282415339081; Sat, 21 Aug 2010 11:28:59 -0700 (PDT) Received: from limbo.lan ([193.33.173.33]) by mx.google.com with ESMTPS id p2sm1702220fak.46.2010.08.21.11.28.57 (version=SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 11:28:58 -0700 (PDT) Message-ID: <4C701AE7.8030805@gmail.com> Date: Sat, 21 Aug 2010 21:28:55 +0300 From: Volodymyr Kostyrko User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; uk-UA; rv:1.9.2.8) Gecko/20100807 Thunderbird/3.1.2 MIME-Version: 1.0 To: Hans Petter Selasky References: <201008192338.37828.hselasky@c2i.net> In-Reply-To: <201008192338.37828.hselasky@c2i.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: Transcend JetFlash V85 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, 21 Aug 2010 18:59:30 -0000 20.08.2010 00:38, Hans Petter Selasky wrote: > You can use usbconfig to add quirks on the fly. See: > > usbconfig -h > > And: > > man usbconfig Tried that, but it doesn't work for me or I'm messing things up... usbconfig -d 3.3 add_quirk UQ_MSC_NO_SYNC_CACHE And errors continue to show up. The man page also is kinda short on data. -- Sphinx of black quartz judge my vow. From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 19:59:26 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 CF0B41065694 for ; Sat, 21 Aug 2010 19:59:26 +0000 (UTC) (envelope-from c.kworr@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5D9488FC0C for ; Sat, 21 Aug 2010 19:59:26 +0000 (UTC) Received: by fxm4 with SMTP id 4so2727131fxm.13 for ; Sat, 21 Aug 2010 12:59:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=5IGQ+lHbuei5WRoJTShdxUq46Vr+31ZEIL3YSQ++rVI=; b=L773oAKr+DAdONhbq4EqL1a1xenq3FCXuk0y9ujo9rLotIDlMZ18JlScwxU0fbDIkv N9QPdf8mI4+9F6pjDQMNCLD3ADFl9TR8jvtEHKFp54Yvgnzen6vOV0yeg/hJTE44dTPm rpxelPW8WD77ZOmxzrqIqaKxdQZQUcadggAMM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=LWgrUiMb6s/TnQ2AHoG7/ajYqdwoLBj32Hi14OW7ZVDKyb/tymANJGFEzi0DM3enhO V2JRTN7lJau1/gRM2A4Sj2cMEExAXh1G0PfkT0G6jvoTENIYNezXLrlyzlq3T9islF5D bS3V883suvzv6/il4vucu1cS+uV+Ono4tV3oU= Received: by 10.223.107.137 with SMTP id b9mr2546832fap.17.1282420764972; Sat, 21 Aug 2010 12:59:24 -0700 (PDT) Received: from limbo.lan ([193.33.173.33]) by mx.google.com with ESMTPS id 5sm1728340fat.47.2010.08.21.12.59.22 (version=SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 12:59:24 -0700 (PDT) Message-ID: <4C703019.8070600@gmail.com> Date: Sat, 21 Aug 2010 22:59:21 +0300 From: Volodymyr Kostyrko User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; uk-UA; rv:1.9.2.8) Gecko/20100807 Thunderbird/3.1.2 MIME-Version: 1.0 To: Hans Petter Selasky References: <201008192338.37828.hselasky@c2i.net> <4C701AE7.8030805@gmail.com> <201008212029.59291.hselasky@c2i.net> In-Reply-To: <201008212029.59291.hselasky@c2i.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: Transcend JetFlash V85 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, 21 Aug 2010 19:59:27 -0000 21.08.2010 21:29, Hans Petter Selasky wrote: >>> You can use usbconfig to add quirks on the fly. See: >>> >>> usbconfig -h >>> >>> And: >>> >>> man usbconfig >> >> Tried that, but it doesn't work for me or I'm messing things up... >> >> usbconfig -d 3.3 add_quirk UQ_MSC_NO_SYNC_CACHE >> >> And errors continue to show up. The man page also is kinda short on data. > > After setting the quirk, you need to reset or re-attach the USB device. Not a good behavior for me. What if I need to boot from one? Most FS don't like been pushed off device. But this doesn't work too. usbconfig -d 3.3 add_quirk UQ_MSC_NO_TEST_UNIT_READY usbconfig -d 3.3 reset Gives me: Aug 21 22:46:14 limbo kernel: umass1: at uhub3, port 5, addr 3 (disconnected) Aug 21 22:46:14 limbo kernel: (da4:umass-sim1:1:0:0): lost device Aug 21 22:46:14 limbo kernel: (da4:umass-sim1:1:0:0): removing device entry Aug 21 22:46:15 limbo root: Unknown USB device: vendor 0x058f product 0x6387 bus uhub3 Aug 21 22:46:15 limbo kernel: umass1: on usbus3 Aug 21 22:46:15 limbo kernel: umass1: SCSI over Bulk-Only; quirks = 0x0100 Here, quirks field doesn't change when I add more quirks. Aug 21 22:46:16 limbo kernel: umass1:2:1:-1: Attached to scbus2 Aug 21 22:46:16 limbo kernel: (probe0:umass-sim1:1:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 Aug 21 22:46:16 limbo kernel: (probe0:umass-sim1:1:0:0): CAM status: SCSI Status Error Aug 21 22:46:16 limbo kernel: (probe0:umass-sim1:1:0:0): SCSI status: Check Condition Aug 21 22:46:16 limbo kernel: (probe0:umass-sim1:1:0:0): SCSI sense: UNIT ATTENTION asc:28,0 (Not ready to ready change, medium may have changed) Aug 21 22:46:16 limbo kernel: da4 at umass-sim1 bus 1 scbus2 target 0 lun 0 Aug 21 22:46:16 limbo kernel: da4: Removable Direct Access SCSI-2 device Aug 21 22:46:16 limbo kernel: da4: 40.000MB/s transfers Aug 21 22:46:16 limbo kernel: da4: 3900MB (7987200 512 byte sectors: 255H 63S/T 497C) Aug 21 22:46:24 limbo kernel: (da4:umass-sim1:1:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0 Aug 21 22:46:24 limbo kernel: (da4:umass-sim1:1:0:0): CAM status: SCSI Status Error Aug 21 22:46:24 limbo kernel: (da4:umass-sim1:1:0:0): SCSI status: Check Condition Aug 21 22:46:24 limbo kernel: (da4:umass-sim1:1:0:0): SCSI sense: ILLEGAL REQUEST asc:26,0 (Invalid field in parameter list) Mentioned patch was looking like: USB_QUIRK(ALCOR, TRANSCEND, 0x0142, 0x0142, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_SYNC_CACHE), But I don't understand what should be set for my flash at 3-4 places... They are covering some range but inspecting my flash I don't see something close to the 0x142. -- Sphinx of black quartz judge my vow. From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 20:07:48 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 6192A1065698 for ; Sat, 21 Aug 2010 20:07:47 +0000 (UTC) (envelope-from gofdu-freebsd-usb@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 188718FC13 for ; Sat, 21 Aug 2010 20:07:46 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OmuLv-0000C3-AU for freebsd-usb@freebsd.org; Sat, 21 Aug 2010 22:07:43 +0200 Received: from 193.33.173.33 ([193.33.173.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 21 Aug 2010 22:07:43 +0200 Received: from c.kworr by 193.33.173.33 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 21 Aug 2010 22:07:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-usb@freebsd.org From: Volodymyr Kostyrko Date: Sat, 21 Aug 2010 23:07:34 +0300 Lines: 35 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 193.33.173.33 User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; uk-UA; rv:1.9.2.8) Gecko/20100807 Thunderbird/3.1.2 Subject: software atmel arm serial USB 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, 21 Aug 2010 20:07:48 -0000 Hi people. Our technical staff are working with some device that can do serial over USB but they have no controller. This devices implements USB in software (at least they told me so) at atmel arm. usbconfig -d x.x dump_device_desc gives me: ugen4.2: at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0110 bDeviceClass = 0x00ef bDeviceSubClass = 0x0002 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0040 idVendor = 0xffff idProduct = 0x0017 bcdDevice = 0x0000 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 <0000023> bNumConfigurations = 0x0001 I have pointed them on idVendor field but they think this value is ok for custom devices. In windows they are using usbser.sys to get access to the device. What can be done one FreeBSD? Can I specify which device driver should be used with this physical device? -- Sphinx of black quartz judge my vow. From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 20:55:29 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 76021106566C for ; Sat, 21 Aug 2010 20:55:29 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 2F2E88FC18 for ; Sat, 21 Aug 2010 20:55:28 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.4/8.14.4) with ESMTP id o7LKtPpn079437; Sat, 21 Aug 2010 14:55:25 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.4/8.14.4/Submit) with ESMTP id o7LKtP7q079434; Sat, 21 Aug 2010 14:55:25 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Sat, 21 Aug 2010 14:55:25 -0600 (MDT) From: Warren Block To: Hans Petter Selasky In-Reply-To: <201008211829.13658.hselasky@c2i.net> Message-ID: References: <20100821120316.GA3352@satcidananda.16x108.merseine.nu> <201008211756.26486.hselasky@c2i.net> <1282407981.2000.26.camel@satcidananda> <201008211829.13658.hselasky@c2i.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (wonkity.com [127.0.0.1]); Sat, 21 Aug 2010 14:55:25 -0600 (MDT) Cc: freebsd-usb@freebsd.org Subject: Re: USB HDD needs replugging? 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, 21 Aug 2010 20:55:29 -0000 On Sat, 21 Aug 2010, Hans Petter Selasky wrote: > On Saturday 21 August 2010 18:26:21 indulekha wrote: >> what is the exact >> command to enable or disable quirks, etc. > > Hi, > > The format is: > > usbconfig add_dev_quirk_vplh > > vid: VendorID > pid: ProductID > > lo_rev: 0 > Hi_rev 0xffff > > quirk: your quirk UQ_XXX > > If the driver shows a disconnect message or attach failure, then I think > quirks won't help. > > Instead of replugging your device, it is sometimes possible to make the device > available using: > > usbconfig -u X -a Y reset > > Where X and Y are the ugenX.Y for your root HUB or your device. > > You need to be root to execute these commands. A real, working example of this would be an excellent addition to usbconfig(8). If you provide one, and explain what it does, I'll create a patch. From owner-freebsd-usb@FreeBSD.ORG Sat Aug 21 21:27:14 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 C87D21065673 for ; Sat, 21 Aug 2010 21:27:14 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.tele2.se [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id 5C64D8FC08 for ; Sat, 21 Aug 2010 21:27:14 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=64zCe8PmiW4A:10 a=IkcTkHD0fZMA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=Ad7O5ECopkloM_q5UmkA:9 a=ka78XJIJM0Auv7n0bNhfMXBLi6oA:4 a=QEXdDO2ut3YA:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe12.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 1218558903; Sat, 21 Aug 2010 23:27:12 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sat, 21 Aug 2010 23:23:26 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: In-Reply-To: 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201008212323.26858.hselasky@c2i.net> Cc: Volodymyr Kostyrko Subject: Re: software atmel arm serial USB 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, 21 Aug 2010 21:27:14 -0000 On Saturday 21 August 2010 22:07:34 Volodymyr Kostyrko wrote: > Hi people. > > Our technical staff are working with some device that can do serial over > USB but they have no controller. This devices implements USB in software > (at least they told me so) at atmel arm. > > usbconfig -d x.x dump_device_desc gives me: > > ugen4.2: at usbus4, cfg=0 > md=HOST spd=FULL (12Mbps) pwr=ON > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0110 > bDeviceClass = 0x00ef > bDeviceSubClass = 0x0002 > bDeviceProtocol = 0x0001 > bMaxPacketSize0 = 0x0040 > idVendor = 0xffff > idProduct = 0x0017 > bcdDevice = 0x0000 > iManufacturer = 0x0001 > iProduct = 0x0002 > iSerialNumber = 0x0003 <0000023> > bNumConfigurations = 0x0001 > > I have pointed them on idVendor field but they think this value is ok > for custom devices. > > In windows they are using usbser.sys to get access to the device. What > can be done one FreeBSD? Can I specify which device driver should be > used with this physical device? You can try adding the VID + PID pair to serial/umodem.c . Try loading: kldload umodem.ko First. --HPS