From owner-freebsd-usb@FreeBSD.ORG Sun Jan 13 13:17:28 2008 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 34F5016A417 for ; Sun, 13 Jan 2008 13:17:28 +0000 (UTC) (envelope-from zyxmaw@gmail.com) Received: from mail48.e.nsc.no (mail48.e.nsc.no [193.213.115.48]) by mx1.freebsd.org (Postfix) with ESMTP id D66E013C442 for ; Sun, 13 Jan 2008 13:17:27 +0000 (UTC) (envelope-from zyxmaw@gmail.com) Received: from [10.0.0.2] (ti132110a080-7756.bb.online.no [85.165.158.78]) by mail48.nsc.no (8.13.8/8.13.5) with ESMTP id m0DDHG5p026880; Sun, 13 Jan 2008 14:17:16 +0100 (MET) Message-Id: <2185C762-FAF8-453A-A3A7-7159CD54C6F1@gmail.com> From: =?ISO-8859-1?Q?=D8ystein_Andreassen?= To: Hans Petter Selasky In-Reply-To: <200801121626.54803.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v915) Date: Sun, 13 Jan 2008 14:17:16 +0100 References: <683E901E-8564-49FF-B177-754EF48232A4@gmail.com> <20080112115132.GI79270@cicely12.cicely.de> <200801121626.54803.hselasky@c2i.net> X-Mailer: Apple Mail (2.915) Cc: ticso@cicely.de, freebsd-usb@freebsd.org Subject: Re: USB Slave mode - FreeBSD emulate a CDROM device? 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, 13 Jan 2008 13:17:28 -0000 On Jan 12, 2008, at 4:26 PM, Hans Petter Selasky wrote: > On Saturday 12 January 2008, Bernd Walter wrote: >> On Tue, Jan 08, 2008 at 11:26:26PM +0100, =D8ystein Andreassen wrote: >>> Hello, >>> >>> I would like to make my FreeBSD pc a USB CD/DVD-ROM for a server. >>> I have a lot of bootable ISO images and I dont like to waste time =20= >>> and >>> CD=B4s >>> on burning this images each time I need to use them (I usally damage >>> or loose >>> them between each time or they have been updated). So instead I =20 >>> would >>> like >>> to know if it is possible to make the FreeBSD USB stack behave as a >>> USB slave >>> and present an ISO image to another machine via a usb host-to-host >>> cable. >>> (I need to boot from the CD=B4s). >> >> A PC has not the required hardware to do so. >> There are USB devices and USB hosts. >> You can only connect a single USB host to many devices, but not two >> hosts together. >> There are interlink cables on the market, but those present an USB >> device to both sides and are not generic to do anything else than the >> profile they are build for. >> >> Hans Petter however did implement USB device software support to =20 >> allow >> FreeBSD beeing used as a device. >> It at least supports the AT91RM9200 internal USB device controller, =20= >> but >> I don't know if it supports anything else. > > Hi, > > The current implementation of USB device support only implements CDC =20= > ethernet. > Adding support for a mass storage device is not a big deal. Though =20 > you need > to define an interface for how you will provide your disk or file to =20= > the > interface. Probably handling this from userland will solve your =20 > problem. > > Does your box have PCI slots? There are some PCI boards available =20 > for a cheap > price that supports USB device functionality. > > I plan to add support for more chips during the spring, but I =20 > haven't decided > which yet. > >> And I think he just did implement a CDC ethernet device and not =20 >> umass, >> so software needs to be written anyway. >> I've CC'ed him, since he can answer about other hardware that he >> possibly supports. > > That is correct. > >> >> I would have liked to offer the AT91RM9200 based board we produce >> ourself, but it wasn't designed for this purpose so our current board >> has no device ports. >> But we are planning an extended version, so this might change in the >> near future. > > I have a KB92002B board which I bought > from "http://www.kwikbyte.com/KB9202.html". It is full speed USB only. > >> >> There a USB device controllers that can be added to PCs, but most of >> them are more designed for teaching purpose. >> For example I'd seen PDIUSBD11 chips hooked up to printer ports, but >> this chip is not being manufactured anymore and this type of =20 >> interfacing >> is very slow. >> >> The situation is much better if you use SCSI. >> You can interconnect two SCSI controller together - given that the >> addresses on both controller are not configured to be the same. >> FreeBSD has code for emulation disk drives with target capable SCSI >> controllers, which at least is supported by the ahc(4) driver. >> The controller on the other box can just be of any kind. > > --HPS Thank you both very much! I use a laptop, so both a PCI card with deviceports and scsi are not =20 possible. I might have better luck with an iPod or something simmular? My plan was to do a proof of concept on a PC and then move to a =20 smaller device anyways. :) Or maybe I should just drop it. But it would be great to get rid of my =20= CD case. Again, Thank you for clarifying. Regards, =D8ystein Andreassen=20= From owner-freebsd-usb@FreeBSD.ORG Sun Jan 13 15:17:38 2008 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 BEC7316A481 for ; Sun, 13 Jan 2008 15:17:38 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) Received: from bgo1smout1.broadpark.no (bgo1smout1.broadpark.no [217.13.4.94]) by mx1.freebsd.org (Postfix) with ESMTP id 890CC13C4F8 for ; Sun, 13 Jan 2008 15:17:38 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII Received: from bgo1sminn1.broadpark.no ([217.13.4.93]) by bgo1smout1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with ESMTP id <0JUL003J294R4XD0@bgo1smout1.broadpark.no> for freebsd-usb@freebsd.org; Sun, 13 Jan 2008 16:17:15 +0100 (CET) Received: from kg-work.kg4.no ([80.202.173.59]) by bgo1sminn1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with SMTP id <0JUL00AZ994PGY93@bgo1sminn1.broadpark.no> for freebsd-usb@freebsd.org; Sun, 13 Jan 2008 16:17:15 +0100 (CET) Date: Sun, 13 Jan 2008 16:17:13 +0100 From: Torfinn Ingolfsen To: freebsd-usb@freebsd.org Message-id: <20080113161713.4632c32e.torfinn.ingolfsen@broadpark.no> In-reply-to: <20080112115132.GI79270@cicely12.cicely.de> References: <683E901E-8564-49FF-B177-754EF48232A4@gmail.com> <20080112115132.GI79270@cicely12.cicely.de> X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.3; i386-portbld-freebsd6.3) X-Face: "t9w2,-X@O^I`jVW\sonI3.,36KBLZE*AL[y9lL[PyFD*r_S:dIL9c[8Y>V42R0"!"yb_zN,f#%.[PYYNq; m"_0v; ~rUM2Yy!zmkh)3&U|u!=T(zyv,MHJv"nDH>OJ`t(@mil461d_B'Uo|'nMwlKe0Mv=kvV?Nh@>Hb<3s_z2jYgZhPb@?Wi^x1a~Hplz1.zH Subject: Re: USB Slave mode - FreeBSD emulate a CDROM device? 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, 13 Jan 2008 15:17:38 -0000 On Sat, 12 Jan 2008 12:51:32 +0100 Bernd Walter wrote: > A PC has not the required hardware to do so. > There are USB devices and USB hosts. Out of interest, what you are saying here is that there is no way via software to make a usb port on a PC to act as a usb device? -- Regards, Torfinn Ingolfsen From owner-freebsd-usb@FreeBSD.ORG Sun Jan 13 15:50:01 2008 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 489AE16A418 for ; Sun, 13 Jan 2008 15:50: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 303A713C46A for ; Sun, 13 Jan 2008 15:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m0DFo1Se007056 for ; Sun, 13 Jan 2008 15:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m0DFo1ri007055; Sun, 13 Jan 2008 15:50:01 GMT (envelope-from gnats) Resent-Date: Sun, 13 Jan 2008 15:50:01 GMT Resent-Message-Id: <200801131550.m0DFo1ri007055@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, Alex Keda Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F247A16A417 for ; Sun, 13 Jan 2008 15:48:50 +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 E98BC13C44B for ; Sun, 13 Jan 2008 15:48:50 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m0DFlbhW093985 for ; Sun, 13 Jan 2008 15:47:37 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m0DFlbZg093984; Sun, 13 Jan 2008 15:47:37 GMT (envelope-from nobody) Message-Id: <200801131547.m0DFlbZg093984@www.freebsd.org> Date: Sun, 13 Jan 2008 15:47:37 GMT From: Alex Keda To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/119633: umass0: BBB reset failed, IOERROR 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, 13 Jan 2008 15:50:01 -0000 >Number: 119633 >Category: usb >Synopsis: umass0: BBB reset failed, IOERROR >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jan 13 15:50:00 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Alex Keda >Release: 6.3 >Organization: USSR >Environment: FreeBSD ussr.lissyara.int.otradno.ru 6.3-RC2 FreeBSD 6.3-RC2 #0: Mon Jan 7 20:20:40 MSK 2008 lissyara@ussr.lissyara.int.otradno.ru:/usr/obj/usr/src/sys/color-console i386 >Description: when I attach digital photo camera Olympus C-370 to USB I see in message log: ========================================= Jan 13 18:37:23 ussr kernel: umass0: OLYMPUS X450/D535Z/C370Z, rev 1.10/0.00, addr 3 Jan 13 18:37:23 ussr kernel: umass0: BBB reset failed, IOERROR Jan 13 18:37:23 ussr kernel: umass0: BBB bulk-in clear stall failed, IOERROR Jan 13 18:37:23 ussr kernel: umass0: BBB bulk-out clear stall failed, IOERROR Jan 13 18:38:28 ussr kernel: umass0: BBB reset failed, IOERROR Jan 13 18:38:28 ussr kernel: umass0: BBB bulk-in clear stall failed, IOERROR Jan 13 18:38:28 ussr kernel: umass0: BBB bulk-out clear stall failed, IOERROR Jan 13 18:39:33 ussr kernel: umass0: BBB reset failed, IOERROR Jan 13 18:39:33 ussr kernel: umass0: BBB bulk-in clear stall failed, IOERROR Jan 13 18:39:33 ussr kernel: umass0: BBB bulk-out clear stall failed, IOERROR Jan 13 18:40:38 ussr kernel: umass0: BBB reset failed, IOERROR Jan 13 18:40:38 ussr kernel: umass0: BBB bulk-in clear stall failed, IOERROR Jan 13 18:40:38 ussr kernel: umass0: BBB bulk-out clear stall failed, IOERROR Jan 13 18:41:43 ussr kernel: umass0: BBB reset failed, IOERROR Jan 13 18:41:43 ussr kernel: umass0: BBB bulk-in clear stall failed, IOERROR Jan 13 18:41:43 ussr kernel: umass0: BBB bulk-out clear stall failed, IOERROR Jan 13 18:42:48 ussr kernel: umass0: BBB reset failed, IOERROR Jan 13 18:42:48 ussr kernel: umass0: BBB bulk-in clear stall failed, IOERROR Jan 13 18:42:48 ussr kernel: umass0: BBB bulk-out clear stall failed, IOERROR Jan 13 18:42:58 ussr kernel: umass0: BBB reset failed, IOERROR Jan 13 18:42:58 ussr kernel: umass0: BBB bulk-in clear stall failed, IOERROR Jan 13 18:42:58 ussr kernel: umass0: BBB bulk-out clear stall failed, IOERROR Jan 13 18:43:08 ussr kernel: umass0: BBB reset failed, IOERROR Jan 13 18:43:08 ussr kernel: umass0: BBB bulk-in clear stall failed, IOERROR Jan 13 18:43:08 ussr kernel: umass0: BBB bulk-out clear stall failed, IOERROR Jan 13 18:43:18 ussr kernel: umass0: BBB reset failed, IOERROR Jan 13 18:43:18 ussr kernel: umass0: BBB bulk-in clear stall failed, IOERROR Jan 13 18:43:18 ussr kernel: umass0: BBB bulk-out clear stall failed, IOERROR Jan 13 18:43:28 ussr kernel: umass0: BBB reset failed, IOERROR Jan 13 18:43:28 ussr kernel: umass0: BBB bulk-in clear stall failed, IOERROR Jan 13 18:43:28 ussr kernel: umass0: BBB bulk-out clear stall failed, IOERROR Jan 13 18:43:38 ussr kernel: umass0: BBB reset failed, IOERROR Jan 13 18:43:38 ussr kernel: umass0: BBB bulk-in clear stall failed, IOERROR Jan 13 18:43:38 ussr kernel: umass0: BBB bulk-out clear stall failed, IOERROR Jan 13 18:43:38 ussr kernel: (da0:umass-sim0:0:0:0): got CAM status 0x4 Jan 13 18:43:38 ussr kernel: (da0:umass-sim0:0:0:0): fatal error, failed to attach to device Jan 13 18:43:38 ussr kernel: (da0:umass-sim0:0:0:0): lost device Jan 13 18:44:43 ussr kernel: umass0: BBB reset failed, IOERROR Jan 13 18:44:43 ussr kernel: umass0: BBB bulk-in clear stall failed, IOERROR Jan 13 18:44:43 ussr kernel: umass0: BBB bulk-out clear stall failed, IOERROR Jan 13 18:45:48 ussr kernel: umass0: BBB reset failed, IOERROR Jan 13 18:45:48 ussr kernel: umass0: BBB bulk-in clear stall failed, IOERROR Jan 13 18:45:48 ussr kernel: umass0: BBB bulk-out clear stall failed, IOERROR ========================================= when detach: ================== Jan 13 18:46:16 ussr kernel: umass0: at uhub0 port 4 (addr 3) disconnected Jan 13 18:46:16 ussr kernel: (da0:dead_sim0:0:0:0): removing device entry Jan 13 18:46:16 ussr kernel: umass0: detached =================== This behavior I see on 6.2; 6.3 and 8-CURRENT Some month ago, on 7-CURRENT (summer 2007) this device detect and work correct... >How-To-Repeat: always >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Sun Jan 13 15:54:24 2008 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 0D72816A41A for ; Sun, 13 Jan 2008 15:54:24 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 7583113C447 for ; Sun, 13 Jan 2008 15:54:23 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id m0DFsINs038825; Sun, 13 Jan 2008 16:54:18 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id m0DFs67S047444 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 13 Jan 2008 16:54:07 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id m0DFs6x6098348; Sun, 13 Jan 2008 16:54:06 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id m0DFs5q1098347; Sun, 13 Jan 2008 16:54:06 +0100 (CET) (envelope-from ticso) Date: Sun, 13 Jan 2008 16:54:05 +0100 From: Bernd Walter To: =?iso-8859-1?Q?=D8ystein?= Andreassen Message-ID: <20080113155405.GS79270@cicely12.cicely.de> References: <683E901E-8564-49FF-B177-754EF48232A4@gmail.com> <20080112115132.GI79270@cicely12.cicely.de> <200801121626.54803.hselasky@c2i.net> <2185C762-FAF8-453A-A3A7-7159CD54C6F1@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2185C762-FAF8-453A-A3A7-7159CD54C6F1@gmail.com> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on cicely12.cicely.de Cc: ticso@cicely.de, freebsd-usb@freebsd.org Subject: Re: USB Slave mode - FreeBSD emulate a CDROM device? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2008 15:54:24 -0000 On Sun, Jan 13, 2008 at 02:17:16PM +0100, Øystein Andreassen wrote: > Thank you both very much! > I use a laptop, so both a PCI card with deviceports and scsi are not > possible. > I might have better luck with an iPod or something simmular? > My plan was to do a proof of concept on a PC and then move to a > smaller device anyways. :) > Or maybe I should just drop it. But it would be great to get rid of my > CD case. If you don't want to use a PC in the end then it's better to start with specialized hardware. Many chip vendors have high-speed USB devices for mass storage. There are ready build but most of them are freely programmable through an integrated microcontroller, such as the TUSB6250 or connectable to an external microcontroller such as the ISP1582/3. Most of the vendors have development boards with ATA and or SD-slots and supply source code examples for mass storage. You just need to change it in the way that it offers a CD device instead of a harddisk and add an interface to change the logical media stored on a bigger flash card. Or you just swap the flash card itself. Micro-SD are very small and cheap to get 1G sized. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de From owner-freebsd-usb@FreeBSD.ORG Sun Jan 13 16:02:21 2008 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 E527416A41B for ; Sun, 13 Jan 2008 16:02:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id AC2B113C457 for ; Sun, 13 Jan 2008 16:02:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.1/8.14.1) with ESMTP id m0DG0ap0024250; Sun, 13 Jan 2008 09:00:37 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 13 Jan 2008 09:01:55 -0700 (MST) Message-Id: <20080113.090155.199374899.imp@bsdimp.com> To: torfinn.ingolfsen@broadpark.no From: "M. Warner Losh" In-Reply-To: <20080113161713.4632c32e.torfinn.ingolfsen@broadpark.no> References: <683E901E-8564-49FF-B177-754EF48232A4@gmail.com> <20080112115132.GI79270@cicely12.cicely.de> <20080113161713.4632c32e.torfinn.ingolfsen@broadpark.no> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: USB Slave mode - FreeBSD emulate a CDROM device? 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, 13 Jan 2008 16:02:22 -0000 In message: <20080113161713.4632c32e.torfinn.ingolfsen@broadpark.no> Torfinn Ingolfsen writes: : On Sat, 12 Jan 2008 12:51:32 +0100 : Bernd Walter wrote: : : > A PC has not the required hardware to do so. : > There are USB devices and USB hosts. : : Out of interest, what you are saying here is that there is no way via : software to make a usb port on a PC to act as a usb device? Because the usb hardware doesn't support it. USB is a unidirectional tree. PC Hardware is the top end of the tree. It can't be downstream in the tree. Warner From owner-freebsd-usb@FreeBSD.ORG Sun Jan 13 16:10:53 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC2E616A420 for ; Sun, 13 Jan 2008 16:10:53 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id A1F5D13C461 for ; Sun, 13 Jan 2008 16:10:53 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.1/8.14.1) with ESMTP id m0DG747Q024346 for ; Sun, 13 Jan 2008 09:07:04 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 13 Jan 2008 09:08:22 -0700 (MST) Message-Id: <20080113.090822.-108809829.imp@bsdimp.com> To: usb@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: umass troubleshooting FAQ 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, 13 Jan 2008 16:10:54 -0000 I think it would be useful to mine the PR database for common umass problems that are solved by hints. There's a bunch of 'my umass is broken' with no patch, but a few that have fixes that could be used. Or a few that can be looked up in the code that have been fixed. Any takers? Warner From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 09:30:03 2008 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 B1E3916A421 for ; Mon, 14 Jan 2008 09:30: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 9E5AB13C448 for ; Mon, 14 Jan 2008 09:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m0E9U3gl082260 for ; Mon, 14 Jan 2008 09:30:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m0E9U3cs082255; Mon, 14 Jan 2008 09:30:03 GMT (envelope-from gnats) Resent-Date: Mon, 14 Jan 2008 09:30:03 GMT Resent-Message-Id: <200801140930.m0E9U3cs082255@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, lazyklimm Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64B1816A418 for ; Mon, 14 Jan 2008 09:26:10 +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 6130413C461 for ; Mon, 14 Jan 2008 09:26:10 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m0E9OtjQ079969 for ; Mon, 14 Jan 2008 09:24:55 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m0E9Otuq079968; Mon, 14 Jan 2008 09:24:55 GMT (envelope-from nobody) Message-Id: <200801140924.m0E9Otuq079968@www.freebsd.org> Date: Mon, 14 Jan 2008 09:24:55 GMT From: lazyklimm To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/119653: iriver s7 player sync cache error patch 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, 14 Jan 2008 09:30:03 -0000 >Number: 119653 >Category: usb >Synopsis: iriver s7 player sync cache error patch >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: Mon Jan 14 09:30:03 UTC 2008 >Closed-Date: >Last-Modified: >Originator: lazyklimm >Release: RELENG_7 >Organization: >Environment: FreeBSD 7.0-PRERELEASE #1 >Description: Sync cache error when iRriver S7 flash player connected umass0: on uhub3 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-2 device da0: 40.000MB/s transfers da0: 973MB (1992704 512 byte sectors: 64H 32S/T 973C) umass0: Phase Error, residue = 0 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 umass0: Phase Error, residue = 0 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 umass0: Phase Error, residue = 0 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 umass0: Phase Error, residue = 0 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 >How-To-Repeat: >Fix: patch included below I think that we need to do something like that {T_DIRECT, SIP_MEDIA_REMOVABLE, "iriver", "*","*"},DA_Q_NO_SYNC_CACHE because it seems to be common iRivers' error Patch attached with submission follows: --- sys/cam/scsi/scsi_da.c.orig 2008-01-14 10:30:42.000000000 +0300 +++ sys/cam/scsi/scsi_da.c 2008-01-14 10:32:46.000000000 +0300 @@ -449,6 +449,13 @@ }, { /* + * iRiver S7 MP3 player + */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "iriver", "S7*", + "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE + }, + { + /* * iRiver H10 MP3 player * PR: usb/102547 */ >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 10:10:06 2008 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 3996B16A419 for ; Mon, 14 Jan 2008 10:10: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 3623413C467 for ; Mon, 14 Jan 2008 10:10:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m0EAA6mD010449 for ; Mon, 14 Jan 2008 10:10:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m0EAA5x6010448; Mon, 14 Jan 2008 10:10:05 GMT (envelope-from gnats) Date: Mon, 14 Jan 2008 10:10:05 GMT Message-Id: <200801141010.m0EAA5x6010448@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: DK Cc: Subject: Re: usb/119653: iriver s7 player sync cache error patch X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: DK List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2008 10:10:06 -0000 The following reply was made to PR usb/119653; it has been noted by GNATS. From: DK To: FreeBSD-gnats-submit@freebsd.org, freebsd-usb@freebsd.org Cc: Subject: Re: usb/119653: iriver s7 player sync cache error patch Date: Mon, 14 Jan 2008 12:43:19 +0300 --Boundary-00=_36yiHBLDzYfmCGG Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline another variant (for all iRivers) --Boundary-00=_36yiHBLDzYfmCGG Content-Type: text/plain; charset="utf-8"; name="patch2-scsi_da.c.diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch2-scsi_da.c.diff.txt" --- scsi_da.c.orig 2008-01-14 12:39:46.000000000 +0300 +++ scsi_da.c 2008-01-14 12:40:50.000000000 +0300 @@ -449,18 +449,9 @@ }, { /* - * iRiver H10 MP3 player - * PR: usb/102547 + * iRiver flash players */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "iriver", "H10*", - "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE - }, - { - /* - * iRiver U10 MP3 player - * PR: usb/92306 - */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "iriver", "U10*", + {T_DIRECT, SIP_MEDIA_REMOVABLE, "iriver", "*", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, { --Boundary-00=_36yiHBLDzYfmCGG-- From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 10:14:24 2008 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 8037B16A41B for ; Mon, 14 Jan 2008 10:14:24 +0000 (UTC) (envelope-from lazyklimm@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.186]) by mx1.freebsd.org (Postfix) with ESMTP id 13F4913C4DD for ; Mon, 14 Jan 2008 10:14:23 +0000 (UTC) (envelope-from lazyklimm@gmail.com) Received: by fk-out-0910.google.com with SMTP id b27so1402048fka.11 for ; Mon, 14 Jan 2008 02:14:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:message-id; bh=0/4qJMBFpKjRMR6xQ+j8+50a+tau0ew6TA1BeLKcgkE=; b=Dt86bqO9ZWNQ+1IM02p6KUJ+FbMUfZMBWRCElA/+KlDX84d6EOzkKwKfstZ0XMPnn2KII2GLUG3mMxXS9f8HTPnK/9AnN48puiR+/gDKJTYWxPBHVc0PoO53k35/euKxIdeaVdN1G4Y2MaUmsKjHQYUYWiNSGIsrlV2ML6zGRuw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:message-id; b=JfmiVWjlBiaUlLGGlVZAI53RluL4F+fGMowPOLt74cwPIcDTKRPwNR0K87J2g3+QWLPS/wgtrMYVI/yxwp/AmbfsWoo6s+XmyfRJLIJefIjdcyW8qAhuPTGRuZhihe3q5/v8MugAKafhxnWwxCAWrm/ZWDKHvacoOlKCl58odUk= Received: by 10.78.149.13 with SMTP id w13mr6877231hud.64.1200303938609; Mon, 14 Jan 2008 01:45:38 -0800 (PST) Received: from ?192.168.10.13? ( [83.239.144.95]) by mx.google.com with ESMTPS id 2sm1508742nfv.1.2008.01.14.01.45.34 (version=SSLv3 cipher=OTHER); Mon, 14 Jan 2008 01:45:36 -0800 (PST) From: DK To: FreeBSD-gnats-submit@freebsd.org, freebsd-usb@freebsd.org Date: Mon, 14 Jan 2008 12:43:19 +0300 User-Agent: KMail/1.9.7 References: <200801140930.m0E9U3ZO082223@freefall.freebsd.org> In-Reply-To: <200801140930.m0E9U3ZO082223@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_36yiHBLDzYfmCGG" Message-Id: <200801141243.19831.lazyklimm@gmail.com> Cc: Subject: Re: usb/119653: iriver s7 player sync cache error patch 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, 14 Jan 2008 10:14:24 -0000 --Boundary-00=_36yiHBLDzYfmCGG Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline another variant (for all iRivers) --Boundary-00=_36yiHBLDzYfmCGG Content-Type: text/plain; charset="utf-8"; name="patch2-scsi_da.c.diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch2-scsi_da.c.diff.txt" --- scsi_da.c.orig 2008-01-14 12:39:46.000000000 +0300 +++ scsi_da.c 2008-01-14 12:40:50.000000000 +0300 @@ -449,18 +449,9 @@ }, { /* - * iRiver H10 MP3 player - * PR: usb/102547 + * iRiver flash players */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "iriver", "H10*", - "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE - }, - { - /* - * iRiver U10 MP3 player - * PR: usb/92306 - */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "iriver", "U10*", + {T_DIRECT, SIP_MEDIA_REMOVABLE, "iriver", "*", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, { --Boundary-00=_36yiHBLDzYfmCGG-- From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 11:07:10 2008 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 C8BA116A4E6 for ; Mon, 14 Jan 2008 11:07:09 +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 C3A5B13C45B for ; Mon, 14 Jan 2008 11:07:09 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m0EB79NC052724 for ; Mon, 14 Jan 2008 11:07:09 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m0EB79Mh052720 for freebsd-usb@FreeBSD.org; Mon, 14 Jan 2008 11:07:09 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 14 Jan 2008 11:07:09 GMT Message-Id: <200801141107.m0EB79Mh052720@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, 14 Jan 2008 11:07:10 -0000 Current FreeBSD problem reports Critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o usb/84750 usb [hang] 6-BETA2 reboot/shutdown with root_fs on externa o usb/91629 usb usbd_abort_pipe() may result in infinite loop 2 problems total. Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o usb/46176 usb [panic] umass causes kernel panic if device removed be o i386/46371 usb USB controller cannot be initialized on IBM Netfinity o bin/57255 usb usbd and multi-function devices o usb/63621 usb [usb] USB MemoryStick Reader stalls/crashes system o usb/69006 usb [patch] Apple Cinema Display hangs USB ports o usb/71155 usb [usb] misbehaving usb-printer hangs processes, causes o usb/73307 usb [panic] Kernel panics on USB disconnect o usb/74771 usb [umass] mounting write-protected umass device as read/ o usb/75705 usb [panic] da0 attach / Optio S4 (with backtrace) o usb/75797 usb 5.3-STABLE(2005 1/4) detect USB headset, But can not f o usb/76395 usb USB printer does not work, usbdevs says "addr 0 should o usb/77184 usb [panic] kernel panic on USB device disconnect o usb/77294 usb [ulpcom] [panic] ucom + ulpcom panic o usb/79269 usb USB ohci da0 plug/unplug causes crashes and lockups. o usb/79287 usb [uhci] UHCI hang after interrupt transfer o usb/79524 usb printing to Minolta PagePro 1[23]xxW via USB fails wit a usb/79656 usb [usb] RHSC interrupts lost o usb/79722 usb [usb] wrong alignments in ehci.h o usb/80040 usb [hang] Use of sound mixer causes system freeze with ua o usb/80361 usb [patch] mounting of usb-stick fails o usb/80829 usb possible panic when loading USB-modules o usb/80862 usb [patch] USB locking issues: missing some Giant calls o usb/82350 usb [usb] null pointer dereference in USB stack o usb/82520 usb Reboot when USL101 connected s usb/82569 usb [usb] USB mass storage plug/unplug causes system panic o usb/82660 usb [umass] [panic] EHCI: I/O stuck in state 'physrd'/pani o usb/83563 usb [panic] Page Fault while detaching Mpman Usb device o usb/83677 usb [usb] usb controller often not detected (Sun W2100z) o usb/83756 usb [ums] [patch] Microsoft Intellimouse Explorer 4.0A doe o usb/83977 usb [ucom] [panic] ucom1: open bulk out error (addr 2): IN o usb/84326 usb [umass] Panic trying to connect SCSI tape drive via US o usb/84336 usb [usb] [reboot] instant system reboot when unmounting a o usb/86767 usb [usb] [patch] bogus "slice starts beyond end of the di o usb/88743 usb [hang] USB makes kernel hang at boot (regression in 6. o usb/88966 usb [modules] kldunload ucom.ko returns "Device busy" erro o usb/89003 usb LaCie Firewire drive not properly supported under 6.0 o usb/89954 usb [usb] USB Disk driver race condition? o usb/90700 usb [umass] [panic] Kernel panic on connect/mount/use umas o usb/91238 usb [umass] USB tape unit fails to write a second tape fil o usb/91283 usb booting very slow with usb devices connection (regress o usb/91538 usb [ulpt] [patch] Unable to print to EPSON CX3500 o usb/91906 usb [hang] FreeBSD hangs while booting with USB legacy sup o usb/92052 usb [unlpt] usbd causes defunct process with busy file-han o usb/92083 usb [ural] [panic] panic using WPA on ural NIC in 6.0-RELE o usb/92142 usb SET_ADDR_FAILED and SHORT_XFER errors from usb drivers o usb/92171 usb [panic] panic unplugging Vodafone Mobile Connect (UMTS o usb/93155 usb [ulpt] /dev/ulpt0: device busy, USB printer does not w o usb/93408 usb [mouse] hw.acpi.cpu.cx_lowest=C3 on AMD Turion causes o usb/93640 usb [irq] device ehci causes interrupt storm on this MSI a o usb/93828 usb [panic] ohci causes panic on boot (HP Pavillion d4100e o usb/94166 usb btx halted with a flashcard plugged o usb/94384 usb [panic] kernel panic with usb2 hardware o usb/94717 usb [ulpt] Reading from /dev/ulpt can break work of a UHCI o usb/94813 usb [umass] mounting write-protected umass device freezes o usb/94897 usb [panic] Kernel Panic when cleanly unmounting USB disk o usb/95131 usb [install] Boot/setup process does not accept key strok o usb/95348 usb [kbd] USB keyboard unplug causes noise on screen o usb/95562 usb [umass] Write Stress in USB Mass drive causes "vinvalb o usb/95636 usb [boot] 5 minute delay at boot when using VT6205 based o usb/96120 usb [mouse] USB mouse not always detected o usb/96224 usb [usb] mount_msdosfs cause page fault in syncer process o usb/96457 usb [panic] fatback on umass = reboot o usb/97286 usb [mouse] MS Wireless Intellimouse Explorer 2.0 doesn't o usb/99431 usb [kbd] FreeBSD on MSI 6566E (Intel 845E motherboards) d o usb/101096 usb [if_ural] [panic] USB WLAN occasionally causes kernel- o usb/101448 usb [ohci] FBSD 6.1-STABLE/AMD64 crashes under heavy USB/O o usb/101752 usb [umass] [panic] 6.1-RELEASE kernel panic on usb device o usb/102066 usb [ukbd] usb keyboard and multimedia keys don't work o usb/102096 usb [patch] /usr/sbin/usbd does not handle multiple device o usb/103025 usb [usb] wrong detection of USB device for FreeBSD 6.1 an o usb/104292 usb [hang] system lockup on forced umount of usb-storage d o usb/104830 usb [umass] system crashes when copying data to umass devi o usb/105186 usb USB 2.0/ehci on FreeBSD 6.2-PRE/AMD64 crashes box o usb/106615 usb [uftdi] uftdi module does not automatically load with o usb/106648 usb [hang] USB Floppy on D1950 10 min Hang on Insert w/o F o usb/106832 usb USB HP printer is not detected by kernel when ACPI ena o usb/107248 usb [umass] [patch] scsi_da.c quirk for Cowon iAUDIO X5 MP o usb/107446 usb [umass] umass problems (usb and fw disks) o usb/107827 usb [panic] ohci_add_done addr not found o usb/107848 usb [umass] cannot access Samsung flash disk o usb/107924 usb [patch] usbd(8) does not call detach o usb/108513 usb [umass] Creative MuVo TX FM fails in 6.2-RELEASE (regr o usb/109274 usb [usb] MCP55 USB Controller fails to attach in AMD64 Cu o usb/109397 usb [panic] on boot from USB flash o usb/110856 usb [ugen] [patch] interrupt in msgs are truncated when bu o usb/110988 usb [umass] [patch] Handling of quirk IGNORE_RESIDUE is um o usb/111753 usb [uhid] [panic] Replicable system panic involving UHID o usb/112568 usb USB mode may wrong when mounting Playstation Pro o usb/112631 usb [panic] Problem with SONY DSC-S80 camera o usb/112640 usb [usb] [hang] Kernel freezes when writing a file to an o usb/113478 usb [boot] FreeBSD could not start on Core2Duo notebook fr o usb/113629 usb [ukbd] Dropped USB keyboard events on Dell Latitude D6 o usb/113672 usb [ehci] [panic] Kernel panic with AEWIN CB6971 o usb/113851 usb [boot] Unable to boot install cd from USB-CDROM o usb/113977 usb [feature request] Need a way to set mode of USB disk's o usb/114310 usb [panic] USB hub attachment panics kernel during libusb o usb/114682 usb USB media-card reader unusable o kern/114780 usb [uplcom] [panic] Panics while stress testing the uplco o usb/115298 usb Turning off USB printer panics kernel o usb/116561 usb RELENG_6 umodem panic "trying to sleep while sleeping o usb/116947 usb [patch] enable boot protocol on the USB keyboards o usb/117200 usb [ugen] ugen0 prints strange string on attach if detach o usb/117313 usb [panic] panic on usb camera attachment o usb/117613 usb uhci interrupt storm & USB leaked memory on destroy o usb/117719 usb umass plugging with hald running causes kernel panics o usb/117946 usb D-Link DUB-E100 rev. B1 crashes FreeBSD 7.0-BETA2 o usb/117955 usb plugging minolta dimage a2 crashes os o usb/118140 usb [ucom] [patch] quick hack for ucom to get it behave wi o usb/118141 usb usb serial and nokia phones ucomreadcb ucomreadcb: IOE o usb/118353 usb [panic] [ppp] repeatable kernel panic during ppp(4) se o usb/118391 usb Add uscanner ID for Epson CX4800 o usb/118480 usb Timeout in USB mass storage freezes vfs layer or crash o usb/119018 usb HP ScanJet 4300C found as knowndev but not recognized o usb/119201 usb [patch] Quirksfor Olympus FE-210 camera, LG and Laser o usb/119481 usb [hang] FreeBSD not responding after connecting USB-Mas o usb/119509 usb USB flaky on Dell Optiplex 755 o usb/119513 usb [irq] inserting dlink dwl-g630 wireless card results i 117 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/30929 usb [usb] [patch] use usbd to initialize USB ADSL modem o usb/40948 usb [usb] USB HP CDW8200 does not work o usb/48342 usb [PATCH] usbd dynamic device list. f usb/51958 usb [urio] [patch] update for urio driver o usb/52026 usb [usb] feature request: umass driver support for InSyst o usb/56095 usb [usb] [patch] QUIRK: Apacer Pen Drive fails to work o usb/59698 usb [kbd] [patch] Rework of ukbd HID to AT code translatio o usb/62257 usb [umass] card reader UCR-61S2B is only half-supported o usb/63837 usb [uhid] [patch] USB: hid_is_collection() only looks for o usb/65769 usb [usb] Call to tcflush(x, TCIFLUSH) stops input on usb- o usb/66547 usb [usb] Palm Tungsten T USB does not initialize correctl o usb/68232 usb [ugen] [patch] ugen(4) isochronous handling correction o usb/70523 usb [usb] [patch] umct sending/receiving wrong characters o usb/71280 usb [aue] aue0 device (linksys usb100tx) doesn't work in 1 o usb/71416 usb [ugen] Cryptoflex e-gate USB token (ugen0) detach is n o usb/71417 usb [ugen] Cryptoflex e-gate USB token (ugen0) communicati o usb/71455 usb [usb] Slow USB umass performance of 5.3 o usb/72380 usb [usb] USB does not work [dual Celeron Abit] o usb/72733 usb Kyocera 7135 Palm OS connection problem. o usb/73056 usb [usb] Sun Microsystems Type 6 USB mouse not working in o usb/74211 usb [umass] USB flash drive causes CAM status 0x4 on 4.10R f usb/74453 usb [patch] Q-lity CD-RW USB ECW-043 (ScanLogic SL11R chip o usb/74557 usb imation 500mb usb key can only be written halfway on f o usb/75764 usb [umass] [patch] "umass0: Phase Error" - no device for o usb/75800 usb [ucom] ucom1: init failed STALLED error in time of syn o usb/75928 usb Cytronix SmartMedia card (SMC) reader has problems whe o usb/76461 usb [umass] disklabel of umass(4)-CAM(4)-da(4) not used by o usb/76653 usb [umass] [patch] Problem with Asahi Optical usb device o usb/76732 usb Mouse problems with USB KVM Switch f usb/78984 usb [patch] Creative MUVO umass failure o usb/79723 usb [usb] prepare for high speed isochronous transfers o usb/80774 usb [patch] have "usbd_find_desc" in line with the other " o usb/80776 usb [udav] UDAV device driver shouldn't use usb_add_task o usb/80777 usb usb_rem_task() should wait for callback to complete? o usb/80854 usb suggestion for new iface-no-probe mechanism o usb/80935 usb [uvisor] [patch] uvisor.c is not work with CLIE TH55. f usb/81621 usb external hd hangs under load on ehci o usb/83863 usb [ugen] Communication problem between opensc/openct via o usb/85067 usb Cannot attach ScanJet 4300C to usb device o usb/85257 usb [boot] BTX boot loader fails on USB CDROM (HP DL145 Op o usb/86298 usb [mouse] Known good USB mouse won't work with correct s o usb/87224 usb Cannot mount USB Zip750 o usb/87648 usb [mouse] Logitech USB-optical mouse problem. o usb/88408 usb [axe] axe0 read PHY failed o usb/91546 usb [umodem] [patch] Nokia 6630 mobile phone does not work o usb/91811 usb Compact Flash in HP Photosmart 2610 return " Medium n o usb/91896 usb Serial Number of USB Memory Sticks is not passed throu o usb/92852 usb [mouse] [patch] Vertical scroll not working properly o o usb/93389 usb [umass] [patch] Digital Camera Pentax S60 don't work o usb/93872 usb [patch] SCSI quirk required for ELTA 8061 OL USB memor o usb/95037 usb [umass] USB disk not recognized on hot-plug. o usb/95173 usb [umass] [patch] cannot mount external usb harddisk VIA o usb/96381 usb [patch] add a quirk table entry for a flash ram usb st o usb/97175 usb [hang] USB cardreader hangs system o usb/97472 usb [patch] add support for Olympus C150,D390 o usb/98343 usb [boot] BBB reset failed errors with Creative Muvo MP3 o usb/99538 usb [kbd] while using USB keyboard default params of atkbd o usb/100746 usb [kbd] system does not boot due to USB keyboard problem o usb/101761 usb [patch] usb.h: increase maximal size of report descrip o usb/101775 usb [libusbhid] [patch] possible error in report descripto o usb/102678 usb [kbd] Dell PowerEdge DRAC5 USB Keyboard does not work o usb/102976 usb [panic] Casio Exilim Digital Camera cause panic o usb/103046 usb [ulpt] [patch] ulpt event driven I/O with select(2) an o usb/103289 usb USB 2.0 problems on AMD LX-800 CPU and CS-5536 chipset o usb/103418 usb [usb] [patch] usbhidctl: add ability to write output a o usb/103917 usb USB driver reports "Addr 0 should never happen" o usb/104290 usb [umass] [patch] quirk: TOSHIBA DVD-RAM drive (libretto o usb/104352 usb [ural] [patch] ural driver doesnt work o usb/104645 usb Rave C-201 MP3 player does not communicate o usb/105065 usb [sata] SATA - USB Bridge f usb/105361 usb [panic] Kernel panic during unmounting mass storage (C o usb/106041 usb FreeBSD does not recognise Mustek BearPaw 2400TA usb s o usb/106621 usb [axe] [patch] DLINK DUB-E100 support broken o usb/106861 usb [usbdevs] [patch]: usbdevs update: Add product ACER Ze o usb/107243 usb [patch] Apacer USB Flash Drive quirk o usb/107388 usb [PATCH] Add utoppy device from NetBSD o usb/107496 usb USB device problem on RELENG_6_2 (SHORT_XFER) (regress o usb/107665 usb [usb] [patch] uscanner support for epson stylus DX5050 o usb/107701 usb [usbd] usbd ignores "detach" o usb/107935 usb [uplcom] [panic] panic while accessing /dev/cuaU0 o usb/108056 usb [ohci] Mouse gets powered off during device probe when o usb/108344 usb [panic] kernel with atausb panics when unplugging USB o usb/108509 usb [hang] FreeBSD hang at startup after ehci0 detected (C o usb/110197 usb [umass] Sony PSP umass device does not detach from EHC s usb/110991 usb [patch] QUIRK: Super Top IDE DEVICE (depends on usb/11 o usb/112461 usb [ehci] ehci USB 2.0 doesn't work on nforce4 o usb/112463 usb problem with Samsung USB DVD writer, libscg and FreeBS o usb/112944 usb [patch] Bi-directional access to HP LaserJet 1010 prin o usb/113060 usb [usbdevs] [patch] Samsung printer not working in bidir o usb/113432 usb WARNING: attempt to net_add_domain(netgraph) after dom o conf/114013 usb [patch] WITHOUT_USB allow to compil a lot of USB stuff o usb/114068 usb [umass] [patch] Problems with connection of the umass p usb/114860 usb if_udav / ShanTou ST268 USB NIC o usb/114916 usb USB Maxtor drive (L300RO) requires quirk. o usb/115080 usb using a Hercules HWGUSB2-54-V2 wifi usb adapter o usb/115197 usb can not install from USB stick drive o usb/115400 usb [ehci] Problem with EHCI on ASUS M2N4-SLI o usb/115737 usb uplcom doesn't identify my Prolific 2303 any more o usb/115933 usb RATOC REX-USB60F (usb serial converter) is working o usb/115935 usb [patch] kernel counterproductively attaches to Cyber P o usb/116282 usb Cannot print on USB HP LJ1018 or LJ1300 o usb/116574 usb [patch] Add device ids for ICH8 USB chipsets o usb/116898 usb panic: sleeping thread while using USB hard drive o usb/117075 usb [scsi_da] [patch] quirk: USB Samsung YP-U3 MP3 o usb/117183 usb USB/fusefs -- Fatal trap 12: page fault while in kerne o usb/117185 usb [patch] [umodem] Add support for UNION interface descr o usb/117205 usb [uscanner] [patch] uscanner support for HP ScanJet 447 o usb/117366 usb USB keyboard status lights not working properly o usb/117546 usb [usbdevs] [patch] Add MaxStream ZigBee product ID to u o usb/117598 usb [uaudio] [patch] Not possible to record with Plantroni o usb/117893 usb Lacie USB DVD writing failing o usb/117911 usb Mouse Gembird MUSWC not work o usb/117938 usb [Patch] Adding support for MS WL Natural and MS WL Opt o usb/118098 usb 6th gen iPod causes problems when disconnecting. o usb/118374 usb Patch to support Option GlobeTrotter Max 3.6 wireless o usb/118479 usb ubsa driver does not recognize AnyDATA ADU-500A o usb/118485 usb Logitech Headset Workaround o usb/118571 usb BTX issues when booting FreeBSD 7 from a USB CD-ROM o usb/118670 usb Razer Copperhead Laser Mouse shows up as keyboard o usb/118686 usb [usbdevs] [patch] teach usbdevs / ubsa(4) about Huawei o usb/118741 usb [PATCH] Support for Nikon D300 digital camera (as USB p usb/118915 usb usbhidctl appears to not report features and write siz o usb/119002 usb add "ucp" driver support o usb/119150 usb [usbdevs] [patch] new usbdevs for CDMA 1xEVDO devices o usb/119227 usb ubsa buffer o usb/119389 usb Sony DSC-W1 CBI reset failed, STALLED o usb/119633 usb umass0: BBB reset failed, IOERROR o usb/119653 usb iriver s7 player sync cache error patch 128 problems total. From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 16:48:40 2008 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 E999916A419 for ; Mon, 14 Jan 2008 16:48:40 +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 3BDB413C447 for ; Mon, 14 Jan 2008 16:48:40 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [85.19.218.45] (account mc467741@c2i.net [85.19.218.45] verified) by mailfe12.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 595149053; Mon, 14 Jan 2008 17:48:38 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Mon, 14 Jan 2008 17:47:36 +0100 User-Agent: KMail/1.9.7 References: <20080113.090822.-108809829.imp@bsdimp.com> In-Reply-To: <20080113.090822.-108809829.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801141747.37052.hselasky@c2i.net> Cc: usb@freebsd.org Subject: Re: umass troubleshooting FAQ 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, 14 Jan 2008 16:48:41 -0000 On Sunday 13 January 2008, M. Warner Losh wrote: > I think it would be useful to mine the PR database for common umass > problems that are solved by hints. There's a bunch of 'my umass is > broken' with no patch, but a few that have fixes that could be used. > Or a few that can be looked up in the code that have been fixed. > > Any takers? Should we have a separate bugathon on IRC/SIP/AIM/ICQ ... for USB ? --HPS From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 17:48:42 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6582716A418 for ; Mon, 14 Jan 2008 17:48:42 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.swip.net [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id D2EB013C457 for ; Mon, 14 Jan 2008 17:48:41 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [85.19.218.45] (account mc467741@c2i.net [85.19.218.45] verified) by mailfe12.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 595149053; Mon, 14 Jan 2008 17:48:38 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Mon, 14 Jan 2008 17:47:36 +0100 User-Agent: KMail/1.9.7 References: <20080113.090822.-108809829.imp@bsdimp.com> In-Reply-To: <20080113.090822.-108809829.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801141747.37052.hselasky@c2i.net> Cc: usb@freebsd.org Subject: Re: umass troubleshooting FAQ 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, 14 Jan 2008 17:48:42 -0000 On Sunday 13 January 2008, M. Warner Losh wrote: > I think it would be useful to mine the PR database for common umass > problems that are solved by hints. There's a bunch of 'my umass is > broken' with no patch, but a few that have fixes that could be used. > Or a few that can be looked up in the code that have been fixed. > > Any takers? Should we have a separate bugathon on IRC/SIP/AIM/ICQ ... for USB ? --HPS From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 17:58:13 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3780F16A41A; Mon, 14 Jan 2008 17:58:13 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.82]) by mx1.freebsd.org (Postfix) with ESMTP id F2CA613C45A; Mon, 14 Jan 2008 17:58:12 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp009-s [10.150.69.72]) by smtpoutm.mac.com (Xserve/smtpout019/MantshX 4.0) with ESMTP id m0EHgEle022676; Mon, 14 Jan 2008 09:42:14 -0800 (PST) Received: from [192.168.1.103] (209-128-86-226.bayarea.net [209.128.86.226]) (authenticated bits=0) by mac.com (Xserve/asmtp009/MantshX 4.0) with ESMTP id m0EHgB8e003008 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 14 Jan 2008 09:42:11 -0800 (PST) Message-Id: From: Marcel Moolenaar To: Hans Petter Selasky In-Reply-To: <200801141747.37052.hselasky@c2i.net> Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Date: Mon, 14 Jan 2008 09:42:10 -0800 References: <20080113.090822.-108809829.imp@bsdimp.com> <200801141747.37052.hselasky@c2i.net> X-Mailer: Apple Mail (2.915) Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: umass troubleshooting FAQ 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, 14 Jan 2008 17:58:13 -0000 On Jan 14, 2008, at 8:47 AM, Hans Petter Selasky wrote: > On Sunday 13 January 2008, M. Warner Losh wrote: >> I think it would be useful to mine the PR database for common umass >> problems that are solved by hints. There's a bunch of 'my umass is >> broken' with no patch, but a few that have fixes that could be used. >> Or a few that can be looked up in the code that have been fixed. >> >> Any takers? > > Should we have a separate bugathon on IRC/SIP/AIM/ICQ ... for USB ? That may be too short-lived. I expect that resolving all or most problems can take up to a couple of weeks, so maybe something less fluid and volatile would work better. What may be good to have is a list of USB devices that work as well as a list that don't. This translates nicely into release notes. We could maintain these lists on the wiki so that it's easy enough to maintain. On the wiki we can collect all kinds of information related to the problem analysis, such as which SCSI command is causing what problem/sense data. it can take a while before we know what exactly needs to be done. On top of that, a fix for one device may be so fundamental that we may want to test all the known-working devices again to see that we didn't break anything. Keeping track of what we know is working is important in that respect. just a thought, -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 17:58:13 2008 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 3780F16A41A; Mon, 14 Jan 2008 17:58:13 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.82]) by mx1.freebsd.org (Postfix) with ESMTP id F2CA613C45A; Mon, 14 Jan 2008 17:58:12 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp009-s [10.150.69.72]) by smtpoutm.mac.com (Xserve/smtpout019/MantshX 4.0) with ESMTP id m0EHgEle022676; Mon, 14 Jan 2008 09:42:14 -0800 (PST) Received: from [192.168.1.103] (209-128-86-226.bayarea.net [209.128.86.226]) (authenticated bits=0) by mac.com (Xserve/asmtp009/MantshX 4.0) with ESMTP id m0EHgB8e003008 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 14 Jan 2008 09:42:11 -0800 (PST) Message-Id: From: Marcel Moolenaar To: Hans Petter Selasky In-Reply-To: <200801141747.37052.hselasky@c2i.net> Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Date: Mon, 14 Jan 2008 09:42:10 -0800 References: <20080113.090822.-108809829.imp@bsdimp.com> <200801141747.37052.hselasky@c2i.net> X-Mailer: Apple Mail (2.915) Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: umass troubleshooting FAQ 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, 14 Jan 2008 17:58:13 -0000 On Jan 14, 2008, at 8:47 AM, Hans Petter Selasky wrote: > On Sunday 13 January 2008, M. Warner Losh wrote: >> I think it would be useful to mine the PR database for common umass >> problems that are solved by hints. There's a bunch of 'my umass is >> broken' with no patch, but a few that have fixes that could be used. >> Or a few that can be looked up in the code that have been fixed. >> >> Any takers? > > Should we have a separate bugathon on IRC/SIP/AIM/ICQ ... for USB ? That may be too short-lived. I expect that resolving all or most problems can take up to a couple of weeks, so maybe something less fluid and volatile would work better. What may be good to have is a list of USB devices that work as well as a list that don't. This translates nicely into release notes. We could maintain these lists on the wiki so that it's easy enough to maintain. On the wiki we can collect all kinds of information related to the problem analysis, such as which SCSI command is causing what problem/sense data. it can take a while before we know what exactly needs to be done. On top of that, a fix for one device may be so fundamental that we may want to test all the known-working devices again to see that we didn't break anything. Keeping track of what we know is working is important in that respect. just a thought, -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 18:26:52 2008 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 C496316A421 for ; Mon, 14 Jan 2008 18:26:52 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) Received: from bgo1smout1.broadpark.no (bgo1smout1.broadpark.no [217.13.4.94]) by mx1.freebsd.org (Postfix) with ESMTP id 7B3CC13C457 for ; Mon, 14 Jan 2008 18:26:52 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII Received: from bgo1sminn1.broadpark.no ([217.13.4.93]) by bgo1smout1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with ESMTP id <0JUN00LU8CKCUD40@bgo1smout1.broadpark.no> for freebsd-usb@freebsd.org; Mon, 14 Jan 2008 19:26:36 +0100 (CET) Received: from kg-work.kg4.no ([80.202.173.59]) by bgo1sminn1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with SMTP id <0JUN00KS3CKBRL84@bgo1sminn1.broadpark.no> for freebsd-usb@freebsd.org; Mon, 14 Jan 2008 19:26:36 +0100 (CET) Date: Mon, 14 Jan 2008 19:26:34 +0100 From: Torfinn Ingolfsen To: freebsd-usb@freebsd.org Message-id: <20080114192634.a46ca603.torfinn.ingolfsen@broadpark.no> In-reply-to: <20080113.090155.199374899.imp@bsdimp.com> References: <683E901E-8564-49FF-B177-754EF48232A4@gmail.com> <20080112115132.GI79270@cicely12.cicely.de> <20080113161713.4632c32e.torfinn.ingolfsen@broadpark.no> <20080113.090155.199374899.imp@bsdimp.com> X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.3; i386-portbld-freebsd6.3) X-Face: "t9w2,-X@O^I`jVW\sonI3.,36KBLZE*AL[y9lL[PyFD*r_S:dIL9c[8Y>V42R0"!"yb_zN,f#%.[PYYNq; m"_0v; ~rUM2Yy!zmkh)3&U|u!=T(zyv,MHJv"nDH>OJ`t(@mil461d_B'Uo|'nMwlKe0Mv=kvV?Nh@>Hb<3s_z2jYgZhPb@?Wi^x1a~Hplz1.zH Subject: Re: USB Slave mode - FreeBSD emulate a CDROM device? 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, 14 Jan 2008 18:26:52 -0000 On Sun, 13 Jan 2008 09:01:55 -0700 (MST) "M. Warner Losh" wrote: > Because the usb hardware doesn't support it. USB is a unidirectional > tree. PC Hardware is the top end of the tree. It can't be downstream > in the tree. It is good to have this infoformation confirmed. That way we avoid theses questions in the future. Thanks! -- Regards, Torfinn Ingolfsen From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 19:05:41 2008 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 5D6EC16A417; Mon, 14 Jan 2008 19:05:41 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9E78C13C461; Mon, 14 Jan 2008 19:05:40 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.1/8.14.1) with ESMTP id m0EJ0wZE045502; Mon, 14 Jan 2008 12:00:59 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 14 Jan 2008 12:00:58 -0700 (MST) Message-Id: <20080114.120058.74704237.imp@bsdimp.com> To: hselasky@c2i.net From: Warner Losh In-Reply-To: <200801141747.37052.hselasky@c2i.net> References: <20080113.090822.-108809829.imp@bsdimp.com> <200801141747.37052.hselasky@c2i.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: umass troubleshooting FAQ 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, 14 Jan 2008 19:05:41 -0000 From: Hans Petter Selasky Subject: Re: umass troubleshooting FAQ Date: Mon, 14 Jan 2008 17:47:36 +0100 > On Sunday 13 January 2008, M. Warner Losh wrote: > > I think it would be useful to mine the PR database for common umass > > problems that are solved by hints. There's a bunch of 'my umass is > > broken' with no patch, but a few that have fixes that could be used. > > Or a few that can be looked up in the code that have been fixed. > > > > Any takers? > > Should we have a separate bugathon on IRC/SIP/AIM/ICQ ... for USB ? No. This item isn't about fixing bugs at all. This item is about telling people how to fix N well known problems with devices that need quirks. Eg, if your new device sees a 'No Sync Supported' message, then do XYZ. If you see stalls in with these messages, do ABC. If you see a stall with those messages, do DEF. While it might be useful to have a bug-a-thon, without having this sort of cheat sheet many of the bugs in gnats won't be resolvable. Warner From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 19:05:41 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D6EC16A417; Mon, 14 Jan 2008 19:05:41 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9E78C13C461; Mon, 14 Jan 2008 19:05:40 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.1/8.14.1) with ESMTP id m0EJ0wZE045502; Mon, 14 Jan 2008 12:00:59 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 14 Jan 2008 12:00:58 -0700 (MST) Message-Id: <20080114.120058.74704237.imp@bsdimp.com> To: hselasky@c2i.net From: Warner Losh In-Reply-To: <200801141747.37052.hselasky@c2i.net> References: <20080113.090822.-108809829.imp@bsdimp.com> <200801141747.37052.hselasky@c2i.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: umass troubleshooting FAQ 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, 14 Jan 2008 19:05:41 -0000 From: Hans Petter Selasky Subject: Re: umass troubleshooting FAQ Date: Mon, 14 Jan 2008 17:47:36 +0100 > On Sunday 13 January 2008, M. Warner Losh wrote: > > I think it would be useful to mine the PR database for common umass > > problems that are solved by hints. There's a bunch of 'my umass is > > broken' with no patch, but a few that have fixes that could be used. > > Or a few that can be looked up in the code that have been fixed. > > > > Any takers? > > Should we have a separate bugathon on IRC/SIP/AIM/ICQ ... for USB ? No. This item isn't about fixing bugs at all. This item is about telling people how to fix N well known problems with devices that need quirks. Eg, if your new device sees a 'No Sync Supported' message, then do XYZ. If you see stalls in with these messages, do ABC. If you see a stall with those messages, do DEF. While it might be useful to have a bug-a-thon, without having this sort of cheat sheet many of the bugs in gnats won't be resolvable. Warner From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 20:50:19 2008 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 3D57916A418 for ; Mon, 14 Jan 2008 20:50:19 +0000 (UTC) (envelope-from kirk.davis@epsb.ca) Received: from Exchange22.EDU.epsb.ca (exchange22.edu.epsb.ca [198.161.119.187]) by mx1.freebsd.org (Postfix) with ESMTP id 0E3C913C4F5 for ; Mon, 14 Jan 2008 20:50:18 +0000 (UTC) (envelope-from kirk.davis@epsb.ca) Received: from Exchange24.EDU.epsb.ca ([10.0.5.121]) by Exchange22.EDU.epsb.ca with Microsoft SMTPSVC(6.0.3790.3959); Mon, 14 Jan 2008 13:38:16 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Date: Mon, 14 Jan 2008 13:38:16 -0700 Message-ID: In-Reply-To: <200801091015.17730@aldan> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: BlackBerry (Re: using libusb) Thread-Index: AchS1Ecszy0wQ8HzQDycfHgQgXQATAEF1CBA References: <200801090114.56195@aldan> <200801091015.17730@aldan> From: "Kirk Davis" To: "Mikhail Teterin" X-OriginalArrivalTime: 14 Jan 2008 20:38:16.0632 (UTC) FILETIME=[6413DB80:01C856ED] Cc: freebsd-usb@freebsd.org Subject: RE: BlackBerry (Re: using libusb) 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, 14 Jan 2008 20:50:19 -0000 =20 >-----Original Message----- >From: owner-freebsd-usb@freebsd.org [mailto:owner-freebsd-usb@freebsd.org] On Behalf Of Mikhail Teterin > > I'm trying to port a suit called "barry", which provides a library and some =3D utilities to work with RIM's BlackBerry devices. > I have ported the uberry driver from OpenBSD over to FreeBSD. I have done a lot of changed and support for the new devices and am just working on some final changed before submitting it. I abandoned the linux uberry driver as I didn't like the inteaction with libusb and running it from userspace. Right now the code is at home or I would send it to you.=20 ---- Kirk From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 22:20:33 2008 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 9DB8716A41A for ; Mon, 14 Jan 2008 22:20:33 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id 4BB7813C457 for ; Mon, 14 Jan 2008 22:20:33 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id 52AA81B10F09; Mon, 14 Jan 2008 23:20:29 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on blah.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, J_CHICKENPOX_33 autolearn=no version=3.2.3 Received: from hater.haters.org (unknown [192.168.25.10]) by blah.sun-fish.com (Postfix) with ESMTP id CBE891B10F00; Mon, 14 Jan 2008 23:20:26 +0100 (CET) Message-ID: <478BE02A.7050100@moneybookers.com> Date: Tue, 15 Jan 2008 00:20:26 +0200 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.9 (X11/20071120) MIME-Version: 1.0 To: freebsd-usb@freebsd.org References: <477BC1A3.5080406@moneybookers.com> <200801021837.51376.hselasky@c2i.net> <477CD474.6080302@moneybookers.com> <200801032154.32107.hselasky@c2i.net> In-Reply-To: <200801032154.32107.hselasky@c2i.net> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/5483/Mon Jan 14 15:45:01 2008 on blah.cmotd.com X-Virus-Status: Clean Cc: Subject: Problem with usb4bsd rev566 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, 14 Jan 2008 22:20:33 -0000 Greetings, Any idea why I get this error when trying go build kernel with latest usb4bsd? cc -c -O2 -pipe -fno-strict-aliasing -march=prescott -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Werror /usr/src/sys/dev/usb/usb.c cc1: warnings being treated as errors /usr/src/sys/dev/usb/usb.c: In function 'usb_event_thread': /usr/src/sys/dev/usb/usb.c:206: warning: implicit declaration of function 'kproc_exit' /usr/src/sys/dev/usb/usb.c:206: warning: nested extern declaration of 'kproc_exit' /usr/src/sys/dev/usb/usb.c: In function 'usb_create_event_thread': /usr/src/sys/dev/usb/usb.c:303: warning: implicit declaration of function 'kproc_create' /usr/src/sys/dev/usb/usb.c:303: warning: nested extern declaration of 'kproc_create' *** Error code 1 Stop in /usr/obj/usr/src/sys/CORE. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. I'm using FreeBSD 7.0-RC1 #11: Mon Jan 7 11:31:53 EET 2008 i386 and revision 566 of usb4bsd. Is the new revision of usb4bsd only for -current or should work with releng_7_0 ? -- Best Wishes, Stefan Lambrev ICQ# 24134177 From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 23:41:22 2008 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 AF26116A417; Mon, 14 Jan 2008 23:41:22 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 6C2DF13C458; Mon, 14 Jan 2008 23:41:22 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.1/8.14.1) with ESMTP id m0ENavfO048843; Mon, 14 Jan 2008 16:36:58 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 14 Jan 2008 16:38:36 -0700 (MST) Message-Id: <20080114.163836.58456912.imp@bsdimp.com> To: wblock@wonkity.com From: "M. Warner Losh" In-Reply-To: <20080114162333.A26271@wonkity.com> References: <200801141747.37052.hselasky@c2i.net> <20080114.120058.74704237.imp@bsdimp.com> <20080114162333.A26271@wonkity.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: umass troubleshooting FAQ 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, 14 Jan 2008 23:41:22 -0000 In message: <20080114162333.A26271@wonkity.com> Warren Block writes: : On Mon, 14 Jan 2008, Warner Losh wrote: : > : > This item is about telling people how to fix N well known problems : > with devices that need quirks. : > : > Eg, if your new device sees a 'No Sync Supported' message, then do : > XYZ. : > : > If you see stalls in with these messages, do ABC. : > : > If you see a stall with those messages, do DEF. : : Is there a test suite that could detect and report these situations? Well, ideally one would code defensively if one could detect the problems. Many of them are 'and then the device locks up solid' kind of failure modes :-( Once you've touched the problem, you lose. Warner From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 23:41:22 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF26116A417; Mon, 14 Jan 2008 23:41:22 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 6C2DF13C458; Mon, 14 Jan 2008 23:41:22 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.1/8.14.1) with ESMTP id m0ENavfO048843; Mon, 14 Jan 2008 16:36:58 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 14 Jan 2008 16:38:36 -0700 (MST) Message-Id: <20080114.163836.58456912.imp@bsdimp.com> To: wblock@wonkity.com From: "M. Warner Losh" In-Reply-To: <20080114162333.A26271@wonkity.com> References: <200801141747.37052.hselasky@c2i.net> <20080114.120058.74704237.imp@bsdimp.com> <20080114162333.A26271@wonkity.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: umass troubleshooting FAQ 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, 14 Jan 2008 23:41:22 -0000 In message: <20080114162333.A26271@wonkity.com> Warren Block writes: : On Mon, 14 Jan 2008, Warner Losh wrote: : > : > This item is about telling people how to fix N well known problems : > with devices that need quirks. : > : > Eg, if your new device sees a 'No Sync Supported' message, then do : > XYZ. : > : > If you see stalls in with these messages, do ABC. : > : > If you see a stall with those messages, do DEF. : : Is there a test suite that could detect and report these situations? Well, ideally one would code defensively if one could detect the problems. Many of them are 'and then the device locks up solid' kind of failure modes :-( Once you've touched the problem, you lose. Warner From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 23:55:10 2008 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 B3EB516A41B; Mon, 14 Jan 2008 23:55:10 +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 66AC213C442; Mon, 14 Jan 2008 23:55:10 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.2/8.14.2) with ESMTP id m0ENOfEw026407; Mon, 14 Jan 2008 16:24:41 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.2/8.14.2/Submit) with ESMTP id m0ENOf1L026404; Mon, 14 Jan 2008 16:24:41 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Mon, 14 Jan 2008 16:24:41 -0700 (MST) From: Warren Block To: Warner Losh In-Reply-To: <20080114.120058.74704237.imp@bsdimp.com> Message-ID: <20080114162333.A26271@wonkity.com> References: <20080113.090822.-108809829.imp@bsdimp.com> <200801141747.37052.hselasky@c2i.net> <20080114.120058.74704237.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (wonkity.com [127.0.0.1]); Mon, 14 Jan 2008 16:24:41 -0700 (MST) Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: umass troubleshooting FAQ 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, 14 Jan 2008 23:55:10 -0000 On Mon, 14 Jan 2008, Warner Losh wrote: > > This item is about telling people how to fix N well known problems > with devices that need quirks. > > Eg, if your new device sees a 'No Sync Supported' message, then do > XYZ. > > If you see stalls in with these messages, do ABC. > > If you see a stall with those messages, do DEF. Is there a test suite that could detect and report these situations? -Warren Block * Rapid City, South Dakota USA From owner-freebsd-usb@FreeBSD.ORG Mon Jan 14 23:55:10 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3EB516A41B; Mon, 14 Jan 2008 23:55:10 +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 66AC213C442; Mon, 14 Jan 2008 23:55:10 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.2/8.14.2) with ESMTP id m0ENOfEw026407; Mon, 14 Jan 2008 16:24:41 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.2/8.14.2/Submit) with ESMTP id m0ENOf1L026404; Mon, 14 Jan 2008 16:24:41 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Mon, 14 Jan 2008 16:24:41 -0700 (MST) From: Warren Block To: Warner Losh In-Reply-To: <20080114.120058.74704237.imp@bsdimp.com> Message-ID: <20080114162333.A26271@wonkity.com> References: <20080113.090822.-108809829.imp@bsdimp.com> <200801141747.37052.hselasky@c2i.net> <20080114.120058.74704237.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (wonkity.com [127.0.0.1]); Mon, 14 Jan 2008 16:24:41 -0700 (MST) Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: umass troubleshooting FAQ 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, 14 Jan 2008 23:55:10 -0000 On Mon, 14 Jan 2008, Warner Losh wrote: > > This item is about telling people how to fix N well known problems > with devices that need quirks. > > Eg, if your new device sees a 'No Sync Supported' message, then do > XYZ. > > If you see stalls in with these messages, do ABC. > > If you see a stall with those messages, do DEF. Is there a test suite that could detect and report these situations? -Warren Block * Rapid City, South Dakota USA From owner-freebsd-usb@FreeBSD.ORG Tue Jan 15 00:14:38 2008 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 42AB416A417; Tue, 15 Jan 2008 00:14:38 +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 EA8C913C442; Tue, 15 Jan 2008 00:14:37 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.2/8.14.2) with ESMTP id m0F0EOdb015550; Mon, 14 Jan 2008 17:14:25 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.2/8.14.2/Submit) with ESMTP id m0F0EOaa015547; Mon, 14 Jan 2008 17:14:24 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Mon, 14 Jan 2008 17:14:24 -0700 (MST) From: Warren Block To: "M. Warner Losh" In-Reply-To: <20080114.163836.58456912.imp@bsdimp.com> Message-ID: <20080114170114.E84534@wonkity.com> References: <200801141747.37052.hselasky@c2i.net> <20080114.120058.74704237.imp@bsdimp.com> <20080114162333.A26271@wonkity.com> <20080114.163836.58456912.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (wonkity.com [127.0.0.1]); Mon, 14 Jan 2008 17:14:25 -0700 (MST) Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: umass troubleshooting FAQ 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: Tue, 15 Jan 2008 00:14:38 -0000 On Mon, 14 Jan 2008, M. Warner Losh wrote: > In message: <20080114162333.A26271@wonkity.com> > Warren Block writes: > : On Mon, 14 Jan 2008, Warner Losh wrote: > : > > : > This item is about telling people how to fix N well known problems > : > with devices that need quirks. > : > > : > Eg, if your new device sees a 'No Sync Supported' message, then do > : > XYZ. > : > > : > If you see stalls in with these messages, do ABC. > : > > : > If you see a stall with those messages, do DEF. > : > : Is there a test suite that could detect and report these situations? > > Well, ideally one would code defensively if one could detect the > problems. Many of them are 'and then the device locks up solid' kind > of failure modes :-( Once you've touched the problem, you lose. How about a stress test? Something like a benchmark (bonnie?) that pounds the device conclusively, then prints a summary of uname along with USB software and hardware versions. If it doesn't have errors, doesn't lock up, and the summary prints, that device doesn't need quirks and can be added to the list. Ideally that would have a provision for copying results to a searchable web database. (Might there be something already out there?) Add/modify quirks until the device works acceptably or smashing it with a hammer becomes the more attractive alternative. -Warren Block * Rapid City, South Dakota USA From owner-freebsd-usb@FreeBSD.ORG Tue Jan 15 00:14:38 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42AB416A417; Tue, 15 Jan 2008 00:14:38 +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 EA8C913C442; Tue, 15 Jan 2008 00:14:37 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.2/8.14.2) with ESMTP id m0F0EOdb015550; Mon, 14 Jan 2008 17:14:25 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.2/8.14.2/Submit) with ESMTP id m0F0EOaa015547; Mon, 14 Jan 2008 17:14:24 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Mon, 14 Jan 2008 17:14:24 -0700 (MST) From: Warren Block To: "M. Warner Losh" In-Reply-To: <20080114.163836.58456912.imp@bsdimp.com> Message-ID: <20080114170114.E84534@wonkity.com> References: <200801141747.37052.hselasky@c2i.net> <20080114.120058.74704237.imp@bsdimp.com> <20080114162333.A26271@wonkity.com> <20080114.163836.58456912.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (wonkity.com [127.0.0.1]); Mon, 14 Jan 2008 17:14:25 -0700 (MST) Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: umass troubleshooting FAQ 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: Tue, 15 Jan 2008 00:14:38 -0000 On Mon, 14 Jan 2008, M. Warner Losh wrote: > In message: <20080114162333.A26271@wonkity.com> > Warren Block writes: > : On Mon, 14 Jan 2008, Warner Losh wrote: > : > > : > This item is about telling people how to fix N well known problems > : > with devices that need quirks. > : > > : > Eg, if your new device sees a 'No Sync Supported' message, then do > : > XYZ. > : > > : > If you see stalls in with these messages, do ABC. > : > > : > If you see a stall with those messages, do DEF. > : > : Is there a test suite that could detect and report these situations? > > Well, ideally one would code defensively if one could detect the > problems. Many of them are 'and then the device locks up solid' kind > of failure modes :-( Once you've touched the problem, you lose. How about a stress test? Something like a benchmark (bonnie?) that pounds the device conclusively, then prints a summary of uname along with USB software and hardware versions. If it doesn't have errors, doesn't lock up, and the summary prints, that device doesn't need quirks and can be added to the list. Ideally that would have a provision for copying results to a searchable web database. (Might there be something already out there?) Add/modify quirks until the device works acceptably or smashing it with a hammer becomes the more attractive alternative. -Warren Block * Rapid City, South Dakota USA From owner-freebsd-usb@FreeBSD.ORG Tue Jan 15 05:03:48 2008 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 8797916A420; Tue, 15 Jan 2008 05:03:48 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 71D9613C468; Tue, 15 Jan 2008 05:03:48 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m0F53mW6006667; Tue, 15 Jan 2008 05:03:48 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m0F53mNF006663; Tue, 15 Jan 2008 05:03:48 GMT (envelope-from linimon) Date: Tue, 15 Jan 2008 05:03:48 GMT Message-Id: <200801150503.m0F53mNF006663@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-usb@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: usb/116699: USB HID devices does not initialized at system boot 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: Tue, 15 Jan 2008 05:03:48 -0000 Synopsis: USB HID devices does not initialized at system boot Responsible-Changed-From-To: freebsd-bugs->freebsd-usb Responsible-Changed-By: linimon Responsible-Changed-When: Tue Jan 15 05:03:04 UTC 2008 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=116699 From owner-freebsd-usb@FreeBSD.ORG Tue Jan 15 06:59:12 2008 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 2D06E16A419 for ; Tue, 15 Jan 2008 06:59:12 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id D3D1513C44B for ; Tue, 15 Jan 2008 06:59:11 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m0F6x4gX004533 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 15 Jan 2008 17:59:05 +1100 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m0F6x3Tl007611; Tue, 15 Jan 2008 17:59:03 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m0F6x2dV007610; Tue, 15 Jan 2008 17:59:02 +1100 (EST) (envelope-from peter) Date: Tue, 15 Jan 2008 17:59:02 +1100 From: Peter Jeremy To: "M. Warner Losh" Message-ID: <20080115065902.GZ929@server.vk2pj.dyndns.org> References: <200801141747.37052.hselasky@c2i.net> <20080114.120058.74704237.imp@bsdimp.com> <20080114162333.A26271@wonkity.com> <20080114.163836.58456912.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3yNHWXBV/QO9xKNm" Content-Disposition: inline In-Reply-To: <20080114.163836.58456912.imp@bsdimp.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-usb@freebsd.org Subject: Re: umass troubleshooting FAQ 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: Tue, 15 Jan 2008 06:59:12 -0000 --3yNHWXBV/QO9xKNm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 14, 2008 at 04:38:36PM -0700, M. Warner Losh wrote: >Well, ideally one would code defensively if one could detect the >problems. Many of them are 'and then the device locks up solid' kind >of failure modes :-( Once you've touched the problem, you lose. And someone recently posted a "and then my machine panics" failure which is also a nuisance to debug. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --3yNHWXBV/QO9xKNm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHjFm2/opHv/APuIcRAnUbAJ4p1+IFzrhPKYcglMjP9xf5396U0QCfeklt t4mOiG7AOqeFcbJtjUNpKXo= =Nk3A -----END PGP SIGNATURE----- --3yNHWXBV/QO9xKNm-- From owner-freebsd-usb@FreeBSD.ORG Tue Jan 15 08:14:50 2008 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 F197E16A468 for ; Tue, 15 Jan 2008 08:14:50 +0000 (UTC) (envelope-from info@camminodiassisi.it) Received: from smtp-out25.alice.it (smtp-out25.alice.it [85.33.2.25]) by mx1.freebsd.org (Postfix) with ESMTP id 1D7E113C469 for ; Tue, 15 Jan 2008 08:14:48 +0000 (UTC) (envelope-from info@camminodiassisi.it) Received: from FBCMMO03.fbc.local ([192.168.68.197]) by smtp-out25.alice.it with Microsoft SMTPSVC(6.0.3790.1830); Tue, 15 Jan 2008 08:51:02 +0100 Received: from FBCMCL01B06.fbc.local ([192.168.69.87]) by FBCMMO03.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Tue, 15 Jan 2008 08:51:01 +0100 Received: from camminodiassisi.it ([87.19.241.233]) by FBCMCL01B06.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Tue, 15 Jan 2008 08:51:01 +0100 From: info@camminodiassisi.it To: freebsd-usb@freebsd.org Third Quarter FreeBSD Status Report | KernelTrap http://kerneltrap.org/?q=freebsd/third_quarter_freebsd_status_report Date: 15 Jan 2008 08:50:53 +0100 Message-ID: <20080115085053.4C380E4D3EE2B857@camminodiassisi.it> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 15 Jan 2008 07:51:01.0802 (UTC) FILETIME=[5F9800A0:01C8574B] Cc: Subject: Pilgrimage to Assisi X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: info@camminodiassisi.it List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2008 08:14:51 -0000 Why a Pilgrimage … in Italy Saint Francis and Saint Anthony, the Seraphic Founder and the Learned Apostle (meo episcopus) of the Franciscan Order, are two great "figures" who have stirred the perpetual engine of humble and simple spirituality, a perpetual source for all people who are suffering from an existential aridity. Thanks to these suppositions, the wish to offer a Pilgrimage was born aimed at fulfilling the new spiritual requirement. Differently from the past, it is a research of "movement" where the pilgrim wants to explore in primis original experiences just to open himself to the compassion of that Love "that moves the sun and the other stars". Apparently the purpose of the pilgrim is to walk to Assisi, but in reality "he advances towards himself" to join the Divine within. The Pilgrimage to Assisi is not a recognised pilgrimage as you might suppose, but it is the fusion of many other short traditional pilgrimages, that already existed in the local sphere (See: Assisi, La Verna, Casella, Cerbaiolo, Montecasale, Montepaolo). These ways are linked to peculiar devotions and, lived in this spiritual dimension again, will give a new surge to the interior research, renewing the essence of Francisco’s doctrine. So it should be, not only the stones to testify to the stranger His Teaching, but also the renewal of the original Franciscan fraternity along the pilgrimage and in the community of Assisi itself. The town of Assisi will be raised as a "Landmark of Universal Reference" for all men of goodwill, overcoming in this way any distinction of Culture and Belief in syntony with the Fundamental Principles of every True Religion. Giordano for www.camminodiassisi.it From owner-freebsd-usb@FreeBSD.ORG Tue Jan 15 14:02:17 2008 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 77A3016A41B for ; Tue, 15 Jan 2008 14:02:17 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id 14E6413C44B for ; Tue, 15 Jan 2008 14:02:17 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id 9C0551B10F1D; Tue, 15 Jan 2008 15:02:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on blah.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, J_CHICKENPOX_33 autolearn=no version=3.2.3 Received: from hater.haters.org (hater.cmotd.com [192.168.3.125]) by blah.sun-fish.com (Postfix) with ESMTP id 3F17E1B10F19; Tue, 15 Jan 2008 15:02:04 +0100 (CET) Message-ID: <478CBCDB.6090203@moneybookers.com> Date: Tue, 15 Jan 2008 16:02:03 +0200 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.9 (X11/20071120) MIME-Version: 1.0 To: freebsd-usb@freebsd.org References: <477BC1A3.5080406@moneybookers.com> <200801021837.51376.hselasky@c2i.net> <477CD474.6080302@moneybookers.com> <200801032154.32107.hselasky@c2i.net> <478BE02A.7050100@moneybookers.com> In-Reply-To: <478BE02A.7050100@moneybookers.com> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/5483/Mon Jan 14 15:45:01 2008 on blah.cmotd.com X-Virus-Status: Clean Cc: Subject: Re: Problem with usb4bsd rev566 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: Tue, 15 Jan 2008 14:02:17 -0000 Greetings, Stefan Lambrev wrote: > Greetings, > > Any idea why I get this error when trying go build kernel with latest > usb4bsd? > > cc -c -O2 -pipe -fno-strict-aliasing -march=prescott -std=c99 -Wall > -Wredundant-decls -Wnested-externs -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys > -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS > -include opt_global.h -fno-common -finline-limit=8000 --param > inline-unit-growth=100 --param large-function-growth=1000 > -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx > -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Werror > /usr/src/sys/dev/usb/usb.c > cc1: warnings being treated as errors > /usr/src/sys/dev/usb/usb.c: In function 'usb_event_thread': > /usr/src/sys/dev/usb/usb.c:206: warning: implicit declaration of > function 'kproc_exit' > /usr/src/sys/dev/usb/usb.c:206: warning: nested extern declaration of > 'kproc_exit' > /usr/src/sys/dev/usb/usb.c: In function 'usb_create_event_thread': > /usr/src/sys/dev/usb/usb.c:303: warning: implicit declaration of > function 'kproc_create' > /usr/src/sys/dev/usb/usb.c:303: warning: nested extern declaration of > 'kproc_create' > *** Error code 1 > > Stop in /usr/obj/usr/src/sys/CORE. > *** Error code 1 > > Stop in /usr/src. > *** Error code 1 > > Stop in /usr/src. > > I'm using FreeBSD 7.0-RC1 #11: Mon Jan 7 11:31:53 EET 2008 i386 and > revision 566 of usb4bsd. > Is the new revision of usb4bsd only for -current or should work with > releng_7_0 ? > I think the new code depends on kproc_exits which is introduced in src/sys/kern/kern_kthread.c Revision 1.40, but this version is only in -current. Also I saw that there is a fix for freebsd 6.X in i4b/trunk/i4b/src/sys/dev/usb/usb_port.h at line 197: #if (__FreeBSD_version >= 700000) But at version 700055 (releng_7_0 from today) kproc_exec() is still not introduced, so the build failed. I tried to compile by changing few lines to: #if (__FreeBSD_version >= 800000) #define usb_thread_create(f, s, p, ...) \ kproc_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) #define usb_thread_exit(err) kproc_exit(err) #elif ((__FreeBSD_version >= 700000) && (__FreeBSD_version < 800000)) #define usb_thread_create(f, s, p, ...) \ kthread_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) #define usb_thread_exit(err) kthread_exit(err) #else #define usb_thread_create(f, s, p, ...) \ kthread_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) #define usb_thread_exit(err) kthread_exit(err) #define thread_lock(td) mtx_lock_spin(&sched_lock) #define thread_unlock(td) mtx_unlock_spin(&sched_lock) #endif But I'm now stuck at: cc -c -O2 -pipe -fno-strict-aliasing -march=prescott -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Werror /usr/src/sys/dev/usb/usb_transfer.c cc1: warnings being treated as errors /usr/src/sys/dev/usb/usb_transfer.c: In function 'usbd_callback_intr_td': /usr/src/sys/dev/usb/usb_transfer.c:2094: warning: 'xfer[2]' may be used uninitialized in this function /usr/src/sys/dev/usb/usb_transfer.c:2094: warning: 'xfer[3]' may be used uninitialized in this function *** Error code 1 Stop in /usr/obj/usr/src/sys/CORE. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. -- Best Wishes, Stefan Lambrev ICQ# 24134177 From owner-freebsd-usb@FreeBSD.ORG Tue Jan 15 16:38:03 2008 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 4D15216A417 for ; Tue, 15 Jan 2008 16:38:03 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id C87AD13C4D1 for ; Tue, 15 Jan 2008 16:38:02 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id 081591B10EF1; Tue, 15 Jan 2008 17:38:01 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on blah.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, J_CHICKENPOX_33 autolearn=no version=3.2.3 Received: from hater.haters.org (hater.cmotd.com [192.168.3.125]) by blah.sun-fish.com (Postfix) with ESMTP id 3D5921B10ED2; Tue, 15 Jan 2008 17:37:58 +0100 (CET) Message-ID: <478CE165.7060001@moneybookers.com> Date: Tue, 15 Jan 2008 18:37:57 +0200 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.9 (X11/20071120) MIME-Version: 1.0 To: freebsd-usb@freebsd.org References: <477BC1A3.5080406@moneybookers.com> <200801021837.51376.hselasky@c2i.net> <477CD474.6080302@moneybookers.com> <200801032154.32107.hselasky@c2i.net> <478BE02A.7050100@moneybookers.com> <478CBCDB.6090203@moneybookers.com> In-Reply-To: <478CBCDB.6090203@moneybookers.com> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/5483/Mon Jan 14 15:45:01 2008 on blah.cmotd.com X-Virus-Status: Clean Cc: Subject: Re: Problem with usb4bsd rev566 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: Tue, 15 Jan 2008 16:38:03 -0000 Greetings, Sorry to reply again to myself :) Stefan Lambrev wrote: > -cut- > > cc -c -O2 -pipe -fno-strict-aliasing -march=prescott -std=c99 -Wall > -Wredundant-decls -Wnested-externs -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys > -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS > -include opt_global.h -fno-common -finline-limit=8000 --param > inline-unit-growth=100 --param large-function-growth=1000 > -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx > -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Werror > /usr/src/sys/dev/usb/usb_transfer.c > cc1: warnings being treated as errors > /usr/src/sys/dev/usb/usb_transfer.c: In function 'usbd_callback_intr_td': > /usr/src/sys/dev/usb/usb_transfer.c:2094: warning: 'xfer[2]' may be > used uninitialized in this function > /usr/src/sys/dev/usb/usb_transfer.c:2094: warning: 'xfer[3]' may be > used uninitialized in this function > *** Error code 1 > > Stop in /usr/obj/usr/src/sys/CORE. > *** Error code 1 > > Stop in /usr/src. > *** Error code 1 > > Stop in /usr/src. > I think I got it, why the compiler complains and refuses to build this. What we have in usbd_callback_intr_td() is little strange "goto" cycle (at least strange for me): repeat: if (xfer[0]) { LIST_REMOVE(xfer[0], done_list); xfer[0]->done_list.le_prev = NULL; xfer[1] = LIST_FIRST(&(info->done_head)); if (xfer[1] == NULL) { dropcount = 1; goto lockchange_0; } At this point xfer[2] & xfer[3] are not defined and if xfer[1] == NULL we go here: lockchange_0: mtx_unlock(info->usb_mtx); /* * we exploit the fact that the mutex is the same for * all callbacks */ mtx_lock(info->priv_mtx); /* call callback(s) */ usbd_callback_wrapper(xfer[0], info, USBD_CONTEXT_CALLBACK); Here we already know that xfer[1] == NULL (but the compiler does not!) and I think the logic can be changed to remove the second check if (xfer[1] == NULL) { goto lockchange_1; } usbd_callback_wrapper(xfer[1], info, USBD_CONTEXT_CALLBACK); We can reach to this point if xfer[1] == NULL, but the compiler sees reference to xfer[2] so it complains - may be used uninitialized in this function if (xfer[2] == NULL) { goto lockchange_1; } usbd_callback_wrapper(xfer[2], info, USBD_CONTEXT_CALLBACK); Same situation with xfer[3] ! if (xfer[3] == NULL) { goto lockchange_1; } usbd_callback_wrapper(xfer[3], info, USBD_CONTEXT_CALLBACK); What I did to comfort the compiler is to add xfer[2] = NULL; xfer[3] = NULL; On the next line after label "repeat" (should work better if added before the label?) As I said more adequate patch is to fully remove lockchange_0 label and do all things in the first check. It will be more optimized and more readable :) I'll test what I did and do I still have working usb and will report back ASAP ;) P.S. usbd_callback_intr_td() is declared and called only in i4b/trunk/i4b/src/sys/dev/usb/usb_transfer.c -- Best Wishes, Stefan Lambrev ICQ# 24134177 From owner-freebsd-usb@FreeBSD.ORG Tue Jan 15 18:30:24 2008 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 6810016A41B for ; Tue, 15 Jan 2008 18:30:24 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id 2319E13C4D3 for ; Tue, 15 Jan 2008 18:30:23 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id AFE901B10EF7; Tue, 15 Jan 2008 19:30:22 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on blah.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, J_CHICKENPOX_33 autolearn=no version=3.2.3 Received: from hater.haters.org (unknown [192.168.25.10]) by blah.sun-fish.com (Postfix) with ESMTP id 23B4E1B10EF1; Tue, 15 Jan 2008 19:30:20 +0100 (CET) Message-ID: <478CFBBB.20905@moneybookers.com> Date: Tue, 15 Jan 2008 20:30:19 +0200 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.9 (X11/20071120) MIME-Version: 1.0 To: freebsd-usb@freebsd.org References: <477BC1A3.5080406@moneybookers.com> <200801021837.51376.hselasky@c2i.net> <477CD474.6080302@moneybookers.com> <200801032154.32107.hselasky@c2i.net> <478BE02A.7050100@moneybookers.com> <478CBCDB.6090203@moneybookers.com> <478CE165.7060001@moneybookers.com> In-Reply-To: <478CE165.7060001@moneybookers.com> Content-Type: multipart/mixed; boundary="------------070003010307090700090902" X-Virus-Scanned: ClamAV 0.91.2/5483/Mon Jan 14 15:45:01 2008 on blah.cmotd.com X-Virus-Status: Clean Cc: Subject: [SOLVED] Re: Problem with usb4bsd rev566 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: Tue, 15 Jan 2008 18:30:24 -0000 This is a multi-part message in MIME format. --------------070003010307090700090902 Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit Greetings, Just to confirm that with the following patches (attached) usb4bsd rev566 compiles and works on FreeBSD7-RC1 :) I'll try to come with something better soon for the usb_transfer.c , if nobody else do this. -- Best Wishes, Stefan Lambrev ICQ# 24134177 --------------070003010307090700090902 Content-Type: text/x-patch; name="usb_port.h.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="usb_port.h.diff" --- i4b/trunk/i4b/src/sys/dev/usb/usb_port.h 2008-01-15 19:47:11.000000000 +0200 +++ 566/i4b/trunk/i4b/src/sys/dev/usb/usb_port.h 2008-01-15 15:31:45.000000000 +0200 @@ -194,10 +194,14 @@ #include "opt_usb.h" -#if (__FreeBSD_version >= 700000) +#if (__FreeBSD_version >= 800000) #define usb_thread_create(f, s, p, ...) \ kproc_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) #define usb_thread_exit(err) kproc_exit(err) +#elif ((__FreeBSD_version >= 700000) && (__FreeBSD_version < 800000)) +#define usb_thread_create(f, s, p, ...) \ + kthread_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) +#define usb_thread_exit(err) kthread_exit(err) #else #define usb_thread_create(f, s, p, ...) \ kthread_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) --------------070003010307090700090902 Content-Type: text/x-patch; name="usb_transfer.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="usb_transfer.c.diff" --- i4b/trunk/i4b/src/sys/dev/usb/usb_transfer.c 2008-01-15 19:47:11.000000000 +0200 +++ 566/i4b/trunk/i4b/src/sys/dev/usb/usb_transfer.c 2008-01-15 19:56:52.000000000 +0200 @@ -2107,6 +2107,8 @@ * The order of the callbacks should not be important. * Optimize by doing 4 callbacks at a time. */ + xfer[2] = NULL; + xfer[3] = NULL; repeat: xfer[0] = LIST_FIRST(&(info->done_head)); if (xfer[0]) { --------------070003010307090700090902-- From owner-freebsd-usb@FreeBSD.ORG Tue Jan 15 19:48:08 2008 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 C7EEF16A417 for ; Tue, 15 Jan 2008 19:48:08 +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 6AAFB13C447 for ; Tue, 15 Jan 2008 19:48:08 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [85.19.218.45] (account mc467741@c2i.net [85.19.218.45] verified) by mailfe08.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 765981278; Tue, 15 Jan 2008 20:48:06 +0100 From: Hans Petter Selasky To: Stefan Lambrev Date: Tue, 15 Jan 2008 20:48:54 +0100 User-Agent: KMail/1.9.7 References: <477BC1A3.5080406@moneybookers.com> <478CE165.7060001@moneybookers.com> <478CFBBB.20905@moneybookers.com> In-Reply-To: <478CFBBB.20905@moneybookers.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801152048.54719.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: [SOLVED] Re: Problem with usb4bsd rev566 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: Tue, 15 Jan 2008 19:48:08 -0000 Hi Stefan, Your patches have been committed with some modifications. Please check if the code compiles now. Thanks for reporting! --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Jan 15 20:30:31 2008 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 4E4F816A480 for ; Tue, 15 Jan 2008 20:30:31 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id E726313C4D5 for ; Tue, 15 Jan 2008 20:30:30 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id 473E71B10EF4; Tue, 15 Jan 2008 21:30:29 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on blah.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, J_CHICKENPOX_33 autolearn=no version=3.2.3 Received: from hater.haters.org (unknown [192.168.25.10]) by blah.sun-fish.com (Postfix) with ESMTP id 799951B10EA4; Tue, 15 Jan 2008 21:30:26 +0100 (CET) Message-ID: <478D17E2.5000908@moneybookers.com> Date: Tue, 15 Jan 2008 22:30:26 +0200 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.9 (X11/20071120) MIME-Version: 1.0 To: Hans Petter Selasky References: <477BC1A3.5080406@moneybookers.com> <478CE165.7060001@moneybookers.com> <478CFBBB.20905@moneybookers.com> <200801152048.54719.hselasky@c2i.net> In-Reply-To: <200801152048.54719.hselasky@c2i.net> Content-Type: multipart/mixed; boundary="------------050706000207050002030200" X-Virus-Scanned: ClamAV 0.91.2/5483/Mon Jan 14 15:45:01 2008 on blah.cmotd.com X-Virus-Status: Clean Cc: freebsd-usb@freebsd.org Subject: Re: [SOLVED] Re: Problem with usb4bsd rev566 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: Tue, 15 Jan 2008 20:30:31 -0000 This is a multi-part message in MIME format. --------------050706000207050002030200 Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit Hi Hans, Thanks for your response. I'm little puzzled right now :) I'm looking at i4b/trunk/i4b/src/sys/dev/usb/usb_transfer.c The logic in rev 566 in case 4 is to call usbd_callback_wrapper(xfer[0], info, USBD_CONTEXT_CALLBACK); usbd_callback_wrapper(xfer[1], info, USBD_CONTEXT_CALLBACK); usbd_callback_wrapper(xfer[2], info, USBD_CONTEXT_CALLBACK); usbd_callback_wrapper(xfer[3], info, USBD_CONTEXT_CALLBACK); not just: usbd_callback_wrapper(xfer[3], info, USBD_CONTEXT_CALLBACK); Am I right? If yes please consider the attached patch (the patch is against rev 566) - it will remove lockcheck_0/1 lables, all "goto" to them and uint8_t dropcount; is not not needed (less needed memory?) Also for i4b/trunk/i4b/src/sys/dev/usb/usb_port.h #define thread_lock(td) mtx_lock_spin(&sched_lock) #define thread_unlock(td) mtx_unlock_spin(&sched_lock) Those should not be defined as they are already defined in sys/sys/mutex.h - Revision 1.96 (which is part of RELENG_7 and RELENG_7_0) and the code will not compile, thus the need of special case for versions >= 700000 and < 800000 Hans Petter Selasky wrote: > Hi Stefan, > > Your patches have been committed with some modifications. Please check if the > code compiles now. Thanks for reporting! > > --HPS > -- Best Wishes, Stefan Lambrev ICQ# 24134177 --------------050706000207050002030200 Content-Type: text/x-patch; name="usb_transfer.c.new.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="usb_transfer.c.new.diff" --- i4b/trunk/i4b/src/sys/dev/usb/usb_transfer.c 2008-01-15 19:47:11.000000000 +0200 +++ 566/i4b/trunk/i4b/src/sys/dev/usb/usb_transfer.c 2008-01-15 21:53:16.000000000 +0200 @@ -2093,7 +2093,7 @@ struct usbd_memory_info *info = arg; struct usbd_xfer *xfer[4]; struct thread *td; - uint8_t dropcount; +// uint8_t dropcount; /* adjust priority */ td = curthread; @@ -2114,54 +2114,56 @@ xfer[0]->done_list.le_prev = NULL; xfer[1] = LIST_FIRST(&(info->done_head)); if (xfer[1] == NULL) { - dropcount = 1; - goto lockchange_0; +// dropcount = 1; + mtx_unlock(info->usb_mtx); + mtx_lock(info->priv_mtx); + usbd_callback_wrapper(xfer[0], info, USBD_CONTEXT_CALLBACK); + mtx_unlock(info->priv_mtx); + mtx_lock(info->usb_mtx); + info->memory_refcount -= 1; + goto repeat; } LIST_REMOVE(xfer[1], done_list); xfer[1]->done_list.le_prev = NULL; xfer[2] = LIST_FIRST(&(info->done_head)); if (xfer[2] == NULL) { - dropcount = 2; - goto lockchange_0; +// dropcount = 2; + mtx_unlock(info->usb_mtx); + mtx_lock(info->priv_mtx); + usbd_callback_wrapper(xfer[0], info, USBD_CONTEXT_CALLBACK); + usbd_callback_wrapper(xfer[1], info, USBD_CONTEXT_CALLBACK); + mtx_unlock(info->priv_mtx); + mtx_lock(info->usb_mtx); + info->memory_refcount -= 2; + goto repeat; } LIST_REMOVE(xfer[2], done_list); xfer[2]->done_list.le_prev = NULL; xfer[3] = LIST_FIRST(&(info->done_head)); if (xfer[3] == NULL) { - dropcount = 3; - goto lockchange_0; +// dropcount = 3; + mtx_unlock(info->usb_mtx); + mtx_lock(info->priv_mtx); + usbd_callback_wrapper(xfer[0], info, USBD_CONTEXT_CALLBACK); + usbd_callback_wrapper(xfer[1], info, USBD_CONTEXT_CALLBACK); + usbd_callback_wrapper(xfer[2], info, USBD_CONTEXT_CALLBACK); + mtx_unlock(info->priv_mtx); + mtx_lock(info->usb_mtx); + info->memory_refcount -= 3; + goto repeat; } LIST_REMOVE(xfer[3], done_list); xfer[3]->done_list.le_prev = NULL; - dropcount = 4; -lockchange_0: +// dropcount = 4; mtx_unlock(info->usb_mtx); - - /* - * we exploit the fact that the mutex is the same for - * all callbacks - */ mtx_lock(info->priv_mtx); - - /* call callback(s) */ usbd_callback_wrapper(xfer[0], info, USBD_CONTEXT_CALLBACK); - if (xfer[1] == NULL) { - goto lockchange_1; - } usbd_callback_wrapper(xfer[1], info, USBD_CONTEXT_CALLBACK); - if (xfer[2] == NULL) { - goto lockchange_1; - } usbd_callback_wrapper(xfer[2], info, USBD_CONTEXT_CALLBACK); - if (xfer[3] == NULL) { - goto lockchange_1; - } usbd_callback_wrapper(xfer[3], info, USBD_CONTEXT_CALLBACK); -lockchange_1: mtx_unlock(info->priv_mtx); - mtx_lock(info->usb_mtx); - info->memory_refcount -= dropcount; + info->memory_refcount -= 4; goto repeat; } else { --------------050706000207050002030200-- From owner-freebsd-usb@FreeBSD.ORG Tue Jan 15 21:52:56 2008 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 5E42F16A41A for ; Tue, 15 Jan 2008 21:52:56 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from smtp8.yandex.ru (smtp8.yandex.ru [213.180.200.213]) by mx1.freebsd.org (Postfix) with ESMTP id AEC9213C46E for ; Tue, 15 Jan 2008 21:52:55 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from [213.27.44.18] ([213.27.44.18]:53502 "EHLO nx7400.local.domain" smtp-auth: "cvs-src" TLS-CIPHER: TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S7455913AbYAOV0L (ORCPT ); Wed, 16 Jan 2008 00:26:11 +0300 X-Yandex-Spam: 1 X-Yandex-Front: smtp8 X-Yandex-TimeMark: 1200432371 X-MsgDayCount: 1 X-Comment: RFC 2476 MSA function at smtp8.yandex.ru logged sender identity as: cvs-src Message-ID: <478D24BD.2020402@yandex.ru> Date: Wed, 16 Jan 2008 00:25:17 +0300 From: "R.Mahmatkhanov" User-Agent: Thunderbird 2.0.0.9 (X11/20071117) MIME-Version: 1.0 To: freebsd-usb@freebsd.org X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: usb/117075 and Samsung YP-U3 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: Tue, 15 Jan 2008 21:52:56 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Good day. I have a Samsung YP-U3 mp3 player. On RELENG_7 from yesterday it "works" like this: /var/log/messages: Jan 14 22:38:16 nx7400 kernel: umass0: on uhub4 Jan 14 22:38:16 nx7400 root: Unknown USB device: vendor 0x04e8 product 0x507c bus uhub4 Jan 14 22:38:16 nx7400 kernel: da0 at umass-sim0 bus 0 target 0 lun 0 Jan 14 22:38:16 nx7400 kernel: da0: Removable Direct Access SCSI-2 device Jan 14 22:38:16 nx7400 kernel: da0: 40.000MB/s transfers Jan 14 22:38:16 nx7400 kernel: da0: 939MB (1924352 512 byte sectors: 64H 32S/T 939C) Jan 14 22:38:16 nx7400 kernel: GEOM_LABEL: Label for provider da0 is msdosfs/YP -U3. Jan 14 22:38:16 nx7400 kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 Jan 14 22:38:17 nx7400 kernel: umass0: Invalid CSW: tag 18 should be 55 Jan 14 22:38:19 nx7400 kernel: umass0: Invalid CSW: tag 21 should be 56 usbdevs: Controller /dev/usb4: addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered port 3 powered port 4 powered port 5 powered port 6 addr 2: high speed, power 500 mA, config 1, YP-U3(0x507c), Samsung Electronics(0x04e8), rev 2.20 port 7 powered port 8 powered when i unplug the player from a system: Jan 15 08:26:15 nx7400 kernel: umass0: BBB reset failed, IOERROR Jan 15 08:26:15 nx7400 kernel: umass0: BBB bulk-in clear stall failed, IOERROR Jan 15 08:26:15 nx7400 kernel: umass0: BBB bulk-out clear stall failed, IOERROR Jan 15 08:26:17 nx7400 kernel: umass0: BBB reset failed, IOERROR Jan 15 08:26:17 nx7400 kernel: umass0: BBB bulk-in clear stall failed, IOERROR Jan 15 08:26:17 nx7400 kernel: umass0: BBB bulk-out clear stall failed, IOERROR After patch has been applied from http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/117075 it now works fine: /var/log/messages: Jan 15 23:56:37 nx7400 kernel: umass0: on uhub4 Jan 15 23:56:37 nx7400 root: Unknown USB device: vendor 0x04e8 product 0x507c bus uhub4 Jan 15 23:56:37 nx7400 kernel: da0 at umass-sim0 bus 0 target 0 lun 0 Jan 15 23:56:37 nx7400 kernel: da0: Removable Direct Access SCSI-2 device Jan 15 23:56:37 nx7400 kernel: da0: 40.000MB/s transfers Jan 15 23:56:37 nx7400 kernel: da0: 939MB (1924352 512 byte sectors: 64H 32S/T 939C) Jan 15 23:56:37 nx7400 kernel: GEOM_LABEL: Label for provider da0 is msdosfs/YP -U3. usbdevs: Controller /dev/usb4: addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered port 3 powered port 4 powered port 5 powered port 6 addr 2: high speed, power 500 mA, config 1, YP-U3(0x507c), Samsung Electronics(0x04e8), rev 2.20 port 7 powered port 8 powered I can now mount it and use: # mount_msdosfs /dev/da0 /home/manager/mnt/ # when i unplug the player from a system: Jan 16 00:03:59 nx7400 kernel: GEOM_LABEL: Label msdosfs/YP -U3 removed. Jan 16 00:10:17 nx7400 kernel: GEOM_LABEL: Label for provider da0 is msdosfs/YP -U3. The only trouble is - i have not actually have the da0s1 device, just da0 - is this normal? Can please anybody consider to commit this? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkeNJL0ACgkQmY+KeAh7t3COdQCggH2vEhtiS312kKHpWnE5AsiX vXMAnR6e++8GsaOeKFXJtvwdmyjmIfZa =ObbN -----END PGP SIGNATURE----- From owner-freebsd-usb@FreeBSD.ORG Tue Jan 15 22:10:28 2008 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 50E7F16A417 for ; Tue, 15 Jan 2008 22:10:28 +0000 (UTC) (envelope-from gofdu-freebsd-usb@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 10DEA13C4CC for ; Tue, 15 Jan 2008 22:10:27 +0000 (UTC) (envelope-from gofdu-freebsd-usb@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JEtzA-0005lI-Mv for freebsd-usb@freebsd.org; Tue, 15 Jan 2008 22:10:20 +0000 Received: from 81.210.234.246 ([81.210.234.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Jan 2008 22:10:20 +0000 Received: from saper by 81.210.234.246 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Jan 2008 22:10:20 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-usb@freebsd.org From: Marcin Cieslak Date: Tue, 15 Jan 2008 23:10:06 +0100 Lines: 19 Message-ID: References: <478D24BD.2020402@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 81.210.234.246 User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8.1.11) Gecko/20071215 SeaMonkey/1.1.7 In-Reply-To: <478D24BD.2020402@yandex.ru> Sender: news Subject: Re: usb/117075 and Samsung YP-U3 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: Tue, 15 Jan 2008 22:10:28 -0000 R.Mahmatkhanov wrote: > # mount_msdosfs /dev/da0 /home/manager/mnt/ > # > > when i unplug the player from a system: > Jan 16 00:03:59 nx7400 kernel: GEOM_LABEL: Label msdosfs/YP -U3 removed. > Jan 16 00:10:17 nx7400 kernel: GEOM_LABEL: Label for provider da0 is > msdosfs/YP -U3. > > The only trouble is - i have not actually have the da0s1 device, just > da0 - is this normal? > > Can please anybody consider to commit this? Yes. It does not has to have partition table. I have some USB sticks formatted like harddisks with partitions - and some without. --Marcin From owner-freebsd-usb@FreeBSD.ORG Wed Jan 16 13:06:13 2008 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 0934C16A417 for ; Wed, 16 Jan 2008 13:06:13 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 8207313C43E for ; Wed, 16 Jan 2008 13:06:12 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id m0GD6Alx007304; Wed, 16 Jan 2008 14:06:10 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id m0GD5vLV080905 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Jan 2008 14:05:58 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id m0GD5vT0009139; Wed, 16 Jan 2008 14:05:57 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id m0GD5vUJ009138; Wed, 16 Jan 2008 14:05:57 +0100 (CET) (envelope-from ticso) Date: Wed, 16 Jan 2008 14:05:57 +0100 From: Bernd Walter To: Torfinn Ingolfsen Message-ID: <20080116130556.GS79270@cicely12.cicely.de> References: <683E901E-8564-49FF-B177-754EF48232A4@gmail.com> <20080112115132.GI79270@cicely12.cicely.de> <20080113161713.4632c32e.torfinn.ingolfsen@broadpark.no> <20080113.090155.199374899.imp@bsdimp.com> <20080114192634.a46ca603.torfinn.ingolfsen@broadpark.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080114192634.a46ca603.torfinn.ingolfsen@broadpark.no> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on cicely12.cicely.de Cc: freebsd-usb@freebsd.org Subject: Re: USB Slave mode - FreeBSD emulate a CDROM device? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2008 13:06:13 -0000 On Mon, Jan 14, 2008 at 07:26:34PM +0100, Torfinn Ingolfsen wrote: > On Sun, 13 Jan 2008 09:01:55 -0700 (MST) > "M. Warner Losh" wrote: > > > Because the usb hardware doesn't support it. USB is a unidirectional > > tree. PC Hardware is the top end of the tree. It can't be downstream > > in the tree. > > It is good to have this infoformation confirmed. That way we avoid > theses questions in the future. There is something special named USB On-The-Go, but this is basicly just a USB device and USB host sharing the same connector. The intention is attach picture cameras directly to printers and such. But practically it is better to have different connectors of course and only sensefull if you don't have enough space for both connectors. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de From owner-freebsd-usb@FreeBSD.ORG Wed Jan 16 13:16:40 2008 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 36FB216A41B for ; Wed, 16 Jan 2008 13:16:40 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 9872A13C465 for ; Wed, 16 Jan 2008 13:16:39 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id m0GDGYje007653; Wed, 16 Jan 2008 14:16:34 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id m0GDGMHo080978 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Jan 2008 14:16:23 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id m0GDGMEc009168; Wed, 16 Jan 2008 14:16:22 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id m0GDGMrt009167; Wed, 16 Jan 2008 14:16:22 +0100 (CET) (envelope-from ticso) Date: Wed, 16 Jan 2008 14:16:21 +0100 From: Bernd Walter To: Warner Losh Message-ID: <20080116131621.GT79270@cicely12.cicely.de> References: <20080113.090822.-108809829.imp@bsdimp.com> <200801141747.37052.hselasky@c2i.net> <20080114.120058.74704237.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080114.120058.74704237.imp@bsdimp.com> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on cicely12.cicely.de Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: umass troubleshooting FAQ X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2008 13:16:40 -0000 On Mon, Jan 14, 2008 at 12:00:58PM -0700, Warner Losh wrote: > From: Hans Petter Selasky > Subject: Re: umass troubleshooting FAQ > Date: Mon, 14 Jan 2008 17:47:36 +0100 > > > On Sunday 13 January 2008, M. Warner Losh wrote: > > > I think it would be useful to mine the PR database for common umass > > > problems that are solved by hints. There's a bunch of 'my umass is > > > broken' with no patch, but a few that have fixes that could be used. > > > Or a few that can be looked up in the code that have been fixed. > > > > > > Any takers? > > > > Should we have a separate bugathon on IRC/SIP/AIM/ICQ ... for USB ? > > No. > > This item isn't about fixing bugs at all. > > This item is about telling people how to fix N well known problems > with devices that need quirks. > > Eg, if your new device sees a 'No Sync Supported' message, then do > XYZ. > > If you see stalls in with these messages, do ABC. > > If you see a stall with those messages, do DEF. > > While it might be useful to have a bug-a-thon, without having this > sort of cheat sheet many of the bugs in gnats won't be resolvable. When USB started the USB guys at least have had so called "plug fests". Maybe it would be interesting to announce such meetings for FreeBSD on regional basis where at least one person with enough knowledge about FreeBSD USB code is present to get popular bugs fixed. If there is interest I might consider hosting one in Moers/Germany (Düsseldorf/Duisburg area) and likely be able to get this done in Lübeck/Germany as well. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de From owner-freebsd-usb@FreeBSD.ORG Wed Jan 16 13:28:36 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D04816A41B for ; Wed, 16 Jan 2008 13:28:36 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id DEA0013C46A for ; Wed, 16 Jan 2008 13:28:35 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id m0GDGYje007653; Wed, 16 Jan 2008 14:16:34 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id m0GDGMHo080978 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Jan 2008 14:16:23 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id m0GDGMEc009168; Wed, 16 Jan 2008 14:16:22 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id m0GDGMrt009167; Wed, 16 Jan 2008 14:16:22 +0100 (CET) (envelope-from ticso) Date: Wed, 16 Jan 2008 14:16:21 +0100 From: Bernd Walter To: Warner Losh Message-ID: <20080116131621.GT79270@cicely12.cicely.de> References: <20080113.090822.-108809829.imp@bsdimp.com> <200801141747.37052.hselasky@c2i.net> <20080114.120058.74704237.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080114.120058.74704237.imp@bsdimp.com> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on cicely12.cicely.de Cc: usb@freebsd.org, freebsd-usb@freebsd.org Subject: Re: umass troubleshooting FAQ X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2008 13:28:36 -0000 On Mon, Jan 14, 2008 at 12:00:58PM -0700, Warner Losh wrote: > From: Hans Petter Selasky > Subject: Re: umass troubleshooting FAQ > Date: Mon, 14 Jan 2008 17:47:36 +0100 > > > On Sunday 13 January 2008, M. Warner Losh wrote: > > > I think it would be useful to mine the PR database for common umass > > > problems that are solved by hints. There's a bunch of 'my umass is > > > broken' with no patch, but a few that have fixes that could be used. > > > Or a few that can be looked up in the code that have been fixed. > > > > > > Any takers? > > > > Should we have a separate bugathon on IRC/SIP/AIM/ICQ ... for USB ? > > No. > > This item isn't about fixing bugs at all. > > This item is about telling people how to fix N well known problems > with devices that need quirks. > > Eg, if your new device sees a 'No Sync Supported' message, then do > XYZ. > > If you see stalls in with these messages, do ABC. > > If you see a stall with those messages, do DEF. > > While it might be useful to have a bug-a-thon, without having this > sort of cheat sheet many of the bugs in gnats won't be resolvable. When USB started the USB guys at least have had so called "plug fests". Maybe it would be interesting to announce such meetings for FreeBSD on regional basis where at least one person with enough knowledge about FreeBSD USB code is present to get popular bugs fixed. If there is interest I might consider hosting one in Moers/Germany (Düsseldorf/Duisburg area) and likely be able to get this done in Lübeck/Germany as well. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de From owner-freebsd-usb@FreeBSD.ORG Wed Jan 16 17:02:01 2008 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 619F516A469 for ; Wed, 16 Jan 2008 17:02:01 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe15.swip.net [212.247.155.193]) by mx1.freebsd.org (Postfix) with ESMTP id EAF8B13C457 for ; Wed, 16 Jan 2008 17:02:00 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [85.19.218.45] (account mc467741@c2i.net [85.19.218.45] verified) by mailfe15.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 32935059; Wed, 16 Jan 2008 18:01:59 +0100 From: Hans Petter Selasky To: Stefan Lambrev Date: Wed, 16 Jan 2008 18:02:47 +0100 User-Agent: KMail/1.9.7 References: <477BC1A3.5080406@moneybookers.com> <200801152048.54719.hselasky@c2i.net> <478D17E2.5000908@moneybookers.com> In-Reply-To: <478D17E2.5000908@moneybookers.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801161802.48506.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: [SOLVED] Re: Problem with usb4bsd rev566 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, 16 Jan 2008 17:02:01 -0000 On Tuesday 15 January 2008, Stefan Lambrev wrote: > Hi Hans, > > Thanks for your response. > I'm little puzzled right now :) Hi Stefan, The order in which the callbacks are called is not that important. "dropcount" == number of callbacks to call. The xfer[] array is filled starting at index 0 up to and including index 3. If dropcount == 1 then call callback on xfer[0] only If dropcount == 2 then call callback on xfer[1] call callback on xfer[0] If dropcount == 3 then call callback on xfer[2] call callback on xfer[1] call callback on xfer[0] This I optimized into a switch statement: switch(dropcount) { ... } Looking at your patch I think you have the old files! Try "svn revert usb_transfer.c" and "svn revert usb_port.h" or something similar. I'm at revision 568. Regarding thread_lock and thread_unlock already being defined, you are right. I've done like this now: #if (__FreeBSD_version >= 800000) #define usb_thread_create(f, s, p, ...) \ kproc_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) #define usb_thread_exit(err) kproc_exit(err) #else #define usb_thread_create(f, s, p, ...) \ kthread_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) #define usb_thread_exit(err) kthread_exit(err) #endif #if (__FreeBSD_version < 700000) #define thread_lock(td) mtx_lock_spin(&sched_lock) #define thread_unlock(td) mtx_unlock_spin(&sched_lock) #endif Is this Ok ? --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Jan 16 17:38:45 2008 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 CFF8A16A417; Wed, 16 Jan 2008 17:38:45 +0000 (UTC) (envelope-from lofi@freebsd.org) Received: from mail-in-07.arcor-online.net (mail-in-07.arcor-online.net [151.189.21.47]) by mx1.freebsd.org (Postfix) with ESMTP id 4023B13C4DD; Wed, 16 Jan 2008 17:38:45 +0000 (UTC) (envelope-from lofi@freebsd.org) Received: from mail-in-07-z2.arcor-online.net (mail-in-07-z2.arcor-online.net [151.189.8.19]) by mail-in-07.arcor-online.net (Postfix) with ESMTP id 7BB4324B18A; Wed, 16 Jan 2008 17:08:44 +0100 (CET) Received: from mail-in-14.arcor-online.net (mail-in-14.arcor-online.net [151.189.21.54]) by mail-in-07-z2.arcor-online.net (Postfix) with ESMTP id 687E92C9246; Wed, 16 Jan 2008 17:08:44 +0100 (CET) Received: from lofi.dyndns.org (dslb-084-063-163-069.pools.arcor-ip.net [84.63.163.69]) by mail-in-14.arcor-online.net (Postfix) with ESMTP id 27A171877E1; Wed, 16 Jan 2008 17:08:44 +0100 (CET) Received: from kiste.my.domain (root@kiste.my.domain [192.168.8.2]) by lofi.dyndns.org (8.13.8/8.13.3) with ESMTP id m0GG8dow004655 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Jan 2008 17:08:39 +0100 (CET) (envelope-from lofi@freebsd.org) Received: from kiste.my.domain (lofi@localhost [127.0.0.1]) by kiste.my.domain (8.14.1/8.14.1) with ESMTP id m0GG8c1G002215; Wed, 16 Jan 2008 17:08:38 +0100 (CET) (envelope-from lofi@freebsd.org) Received: from localhost (localhost [[UNIX: localhost]]) by kiste.my.domain (8.14.1/8.14.1/Submit) id m0GG8cnn002214; Wed, 16 Jan 2008 17:08:38 +0100 (CET) (envelope-from lofi@freebsd.org) X-Authentication-Warning: kiste.my.domain: lofi set sender to lofi@freebsd.org using -f From: Michael Nottebrock To: freebsd-stable@freebsd.org Date: Wed, 16 Jan 2008 17:08:34 +0100 User-Agent: KMail/1.9.7 X-Face: g:jG2\O{-yqD1x?DG2lU1)(v%xffR"p8Nz(w/*)YEUO\Hn%mGi&-!+rq$&r64,=?utf-8?q?fuP=7E=3Bbw=5C=0A=09=5EQdX?=@v~HEAi?NaE8SU]}.oeYSjN84Fe{M(ahZ.(i+lxyP; pr)2[%mGbkY'RmM>=?utf-8?q?+mg3Y=24ip=0A=091?=@Z>[EUaE7tjJ=1DRs~:!uSd""d~:/Er3rpQA%ze|bp>S MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4962687.lb3GUAW8lM"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200801161708.38213.lofi@freebsd.org> X-Virus-Scanned: by amavisd-new X-Virus-Scanned: ClamAV 0.92/5485/Wed Jan 16 14:06:29 2008 on mail-in-14.arcor-online.net X-Virus-Status: Clean Cc: freebsd-usb@freebsd.org Subject: USB prevents system from powering off and ucom prevents usb from being unloaded - ideas? 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, 16 Jan 2008 17:38:45 -0000 --nextPart4962687.lb3GUAW8lM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject line is the executive summary of my problem: I have a box with an Intel 945GC A2 chipset that will not poweroff on shutd= own=20 if the usb kernel module is loaded (or statically compiled into the kernel)= =2E=20 Unloading the usb kernel modules sometime during shutdown (I hacked the usb= d=20 rc script for this) to work around the problem helped until I needed to hoo= k=20 up another device which uses ucom(4) to the machine. On kldunload, ucom=20 claims to detach, but remains loaded and subsequent kldunload attempts=20 trigger the error "kldunload: attempt to unload file that was loaded by the= =20 kernel". The stuck ucom in turn prevents usb from getting unloaded and the= =20 machine cannot poweroff. I have already tried disabling EHCI, but it does not help. Any ideas on eit= her=20 getting uhci to properly detach on shutdown or getting rid of ucom? Cheers, =2D-=20 ,_, | Michael Nottebrock | lofi@freebsd.org (/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org \u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org --nextPart4962687.lb3GUAW8lM Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBHjiwDXhc68WspdLARAmDoAJ4m4OPRHOUlcM3KlMDnjB3sTrQrdQCfXjhB 6REg8XkHvApai58dZDpDgBI= =YmVQ -----END PGP SIGNATURE----- --nextPart4962687.lb3GUAW8lM-- From owner-freebsd-usb@FreeBSD.ORG Wed Jan 16 18:06:50 2008 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 8BB8816A420 for ; Wed, 16 Jan 2008 18:06:50 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id 4131213C468 for ; Wed, 16 Jan 2008 18:06:50 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id B10561B10EF4; Wed, 16 Jan 2008 19:06:48 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on blah.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, J_CHICKENPOX_33 autolearn=no version=3.2.3 Received: from hater.haters.org (hater.cmotd.com [192.168.3.125]) by blah.sun-fish.com (Postfix) with ESMTP id E5E261B10EF0; Wed, 16 Jan 2008 19:06:45 +0100 (CET) Message-ID: <478E47B5.9010104@moneybookers.com> Date: Wed, 16 Jan 2008 20:06:45 +0200 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.9 (X11/20071120) MIME-Version: 1.0 To: Hans Petter Selasky References: <477BC1A3.5080406@moneybookers.com> <200801152048.54719.hselasky@c2i.net> <478D17E2.5000908@moneybookers.com> <200801161802.48506.hselasky@c2i.net> In-Reply-To: <200801161802.48506.hselasky@c2i.net> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/5485/Wed Jan 16 14:06:29 2008 on blah.cmotd.com X-Virus-Status: Clean Cc: freebsd-usb@freebsd.org Subject: Re: [SOLVED] Re: Problem with usb4bsd rev566 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, 16 Jan 2008 18:06:50 -0000 Hi Hans, Hans Petter Selasky wrote: > On Tuesday 15 January 2008, Stefan Lambrev wrote: > >> Hi Hans, >> >> Thanks for your response. >> I'm little puzzled right now :) >> > > Hi Stefan, > > The order in which the callbacks are called is not that important. > > "dropcount" == number of callbacks to call. The xfer[] array is filled > starting at index 0 up to and including index 3. > > If dropcount == 1 then > call callback on xfer[0] only > > If dropcount == 2 then > call callback on xfer[1] > call callback on xfer[0] > > If dropcount == 3 then > call callback on xfer[2] > call callback on xfer[1] > call callback on xfer[0] > > This I optimized into a switch statement: > > switch(dropcount) { > ... > } > > Looking at your patch I think you have the old files! Try "svn revert > usb_transfer.c" and "svn revert usb_port.h" or something similar. I'm at > revision 568. > Yes you are completely right. I understand the beauty of this switch now ;) Btw do we need this part: default: break; The only way for dropcount to not be defined is if xfer[0] == NULL, but we will never reach to the switch if it is. > Regarding thread_lock and thread_unlock already being defined, you are right. > > I've done like this now: > > #if (__FreeBSD_version >= 800000) > #define usb_thread_create(f, s, p, ...) \ > kproc_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) > #define usb_thread_exit(err) kproc_exit(err) > #else > #define usb_thread_create(f, s, p, ...) \ > kthread_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) > #define usb_thread_exit(err) kthread_exit(err) > #endif > > #if (__FreeBSD_version < 700000) > #define thread_lock(td) mtx_lock_spin(&sched_lock) > #define thread_unlock(td) mtx_unlock_spin(&sched_lock) > #endif > > Is this Ok ? > I'll build new kernel and will let you know. But yes it seems OK :) > --HPS > -- Best Wishes, Stefan Lambrev ICQ# 24134177 From owner-freebsd-usb@FreeBSD.ORG Wed Jan 16 18:55:05 2008 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 9DC5316A419 for ; Wed, 16 Jan 2008 18:55:05 +0000 (UTC) (envelope-from steve@anelay.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.freebsd.org (Postfix) with ESMTP id 3736213C459 for ; Wed, 16 Jan 2008 18:55:05 +0000 (UTC) (envelope-from steve@anelay.net) Received: from [192.168.0.200] (cpc2-cove6-0-0-cust52.sol2.cable.ntl.com [86.20.52.53]) by mrelayeu.kundenserver.de (node=mrelayeu1) with ESMTP (Nemesis) id 0MKwpI-1JFDDa1pSB-0005Sk; Wed, 16 Jan 2008 19:42:30 +0100 From: Steve Anelay To: freebsd-usb@freebsd.org Content-Type: text/plain Date: Wed, 16 Jan 2008 18:42:40 +0000 Message-Id: <1200508961.6490.9.camel@tek-patrol.DISTROSHACK> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1//zNDIeDn6pzPIfhM9beHYN4UHyTqOsK5gdO2 IR9Zubk+nbajhIteDt4pNzA4CKmtXqQhUcFX1ny31qqm1krq0A 947uzq79KbXDNdW3NgUcx+QSi0k7WUz Subject: Problem with USB4BSD on DesktopBSD 1.6 (i386) 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, 16 Jan 2008 18:55:05 -0000 I installed this driver today using the svn sources because I was unable to access any usb thumb drives. After inserting a drive this is the message in dmesg | tail uhub1: device problem (SHORT_XFER), disabling port 4 USB4BSD solved this problem. I can now mount my card reader and any of the three usb sticks I own, and by moving to the directory where they're mounted I can also see the contents. However, as soon as I try to open a file on the disk, copy files across to my system, or write to the device my system freezes. I've tried manually mounting and the same thing happens. I've also noticed that the mounting process for these devices takes 5-10 seconds, and sometimes as long as 30 seconds. For information the system is installed on the following: AMD 64 3800+ (single core), 3GB RAM, Nvidia 6600GT, 3xSATA hard drives, PS2 mouse and keyboard, MSI K8 Neo4 Platinum motherboard (with latest bios, nforce4 chipset) Steve From owner-freebsd-usb@FreeBSD.ORG Wed Jan 16 19:29:00 2008 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 4462E16A417 for ; Wed, 16 Jan 2008 19:29:00 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe11.swip.net [212.247.155.65]) by mx1.freebsd.org (Postfix) with ESMTP id CDC0E13C4CE for ; Wed, 16 Jan 2008 19:28:59 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [85.19.218.45] (account mc467741@c2i.net [85.19.218.45] verified) by mailfe11.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 600018833; Wed, 16 Jan 2008 20:28:57 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Wed, 16 Jan 2008 20:29:44 +0100 User-Agent: KMail/1.9.7 References: <1200508961.6490.9.camel@tek-patrol.DISTROSHACK> In-Reply-To: <1200508961.6490.9.camel@tek-patrol.DISTROSHACK> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801162029.45471.hselasky@c2i.net> Cc: Subject: Re: Problem with USB4BSD on DesktopBSD 1.6 (i386) 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, 16 Jan 2008 19:29:00 -0000 On Wednesday 16 January 2008, Steve Anelay wrote: > I installed this driver today using the svn sources because I was unable > to access any usb thumb drives. After inserting a drive this is the > message in dmesg | tail > > uhub1: device problem (SHORT_XFER), disabling port 4 > > USB4BSD solved this problem. I can now mount my card reader and any of > the three usb sticks I own, and by moving to the directory where they're > mounted I can also see the contents. However, as soon as I try to open a > file on the disk, copy files across to my system, or write to the device > my system freezes. I've tried manually mounting and the same thing > happens. I've also noticed that the mounting process for these devices > takes 5-10 seconds, and sometimes as long as 30 seconds. > > For information the system is installed on the following: > > AMD 64 3800+ (single core), 3GB RAM, Nvidia 6600GT, 3xSATA hard drives, > PS2 mouse and keyboard, MSI K8 Neo4 Platinum motherboard (with latest > bios, nforce4 chipset) Hi, The following sysctl will enable debugging: sysctl hw.usb.umass.debug=-1 Have you tried loading "atausb" instead of "umass" ? Also try to cat the complete disk and see where it stops. dd if=/dev/da0 of=/dev/null bs=131072 BTW: I'm sorry to say that if you stress certain kinds of memory sticks they will simply stop working due to poor software design inside the meory stick itself. It is usually a problem of the memory stick manufacturer. However there is a way to nice/throttle USB transfers now! And maybe it is an idea to try that. How fast are your memory sticks? --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Jan 17 15:38:02 2008 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 BD8F916A468 for ; Thu, 17 Jan 2008 15:38:02 +0000 (UTC) (envelope-from gofdu-freebsd-usb@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 634E513C467 for ; Thu, 17 Jan 2008 15:38:02 +0000 (UTC) (envelope-from gofdu-freebsd-usb@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JFWoa-0000nQ-Bd for freebsd-usb@freebsd.org; Thu, 17 Jan 2008 15:38:00 +0000 Received: from pc26-111.sgh.waw.pl ([194.145.111.26]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Jan 2008 15:38:00 +0000 Received: from saper by pc26-111.sgh.waw.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Jan 2008 15:38:00 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-usb@freebsd.org From: Marcin Cieslak Date: Thu, 17 Jan 2008 16:37:47 +0100 Lines: 32 Message-ID: References: <200801161708.38213.lofi@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pc26-111.sgh.waw.pl User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8.1.11) Gecko/20071215 SeaMonkey/1.1.7 In-Reply-To: <200801161708.38213.lofi@freebsd.org> Sender: news Cc: freebsd-stable@freebsd.org Subject: Re: USB prevents system from powering off and ucom prevents usb from being unloaded - ideas? 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, 17 Jan 2008 15:38:02 -0000 Michael Nottebrock wrote: > Subject line is the executive summary of my problem: > > I have a box with an Intel 945GC A2 chipset that will not poweroff on shutdown > if the usb kernel module is loaded (or statically compiled into the kernel). > Unloading the usb kernel modules sometime during shutdown (I hacked the usbd > rc script for this) to work around the problem helped until I needed to hook > up another device which uses ucom(4) to the machine. On kldunload, ucom > claims to detach, but remains loaded and subsequent kldunload attempts > trigger the error "kldunload: attempt to unload file that was loaded by the > kernel". The stuck ucom in turn prevents usb from getting unloaded and the > machine cannot poweroff. Any other module loaded that requires ucom? % grep MODULE_DEPEND /sys/dev/usb/* | grep UCOM_PREFVER | grep -v -i orig uark.c:MODULE_DEPEND(uark, ucom, UCOM_MINVER, UCOM_PREFVER, UCOM_MAXVER); ubsa.c:MODULE_DEPEND(ubsa, ucom, UCOM_MINVER, UCOM_PREFVER, UCOM_MAXVER); ufoma.c:MODULE_DEPEND(ufoma, ucom, UCOM_MINVER, UCOM_PREFVER, UCOM_MAXVER); uftdi.c:MODULE_DEPEND(uftdi, ucom,UCOM_MINVER, UCOM_PREFVER, UCOM_MAXVER); uipaq.c:MODULE_DEPEND(uipaq, ucom, UCOM_MINVER, UCOM_PREFVER, UCOM_MAXVER); umct.c:MODULE_DEPEND(umct, ucom, UCOM_MINVER, UCOM_PREFVER, UCOM_MAXVER); umodem.c:MODULE_DEPEND(umodem, ucom, UCOM_MINVER, UCOM_PREFVER, UCOM_MAXVER); uplcom.c:MODULE_DEPEND(uplcom, ucom, UCOM_MINVER, UCOM_PREFVER, UCOM_MAXVER); uvisor.c:MODULE_DEPEND(uvisor, ucom, UCOM_MINVER, UCOM_PREFVER, UCOM_MAXVER); uvscom.c:MODULE_DEPEND(uvscom, ucom, UCOM_MINVER, UCOM_PREFVER, UCOM_MAXVER); --Marcin From owner-freebsd-usb@FreeBSD.ORG Thu Jan 17 16:46:48 2008 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 46A7416A418 for ; Thu, 17 Jan 2008 16:46:48 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id 1BD9313C467 for ; Thu, 17 Jan 2008 16:46:48 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id 559D21B10F0B; Thu, 17 Jan 2008 17:46:46 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on blah.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, J_CHICKENPOX_33 autolearn=no version=3.2.3 Received: from hater.haters.org (hater.cmotd.com [192.168.3.125]) by blah.sun-fish.com (Postfix) with ESMTP id CB35C1B10EF8; Thu, 17 Jan 2008 17:46:40 +0100 (CET) Message-ID: <478F8670.3030500@moneybookers.com> Date: Thu, 17 Jan 2008 18:46:40 +0200 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.9 (X11/20071120) MIME-Version: 1.0 To: Hans Petter Selasky References: <477BC1A3.5080406@moneybookers.com> <200801152048.54719.hselasky@c2i.net> <478D17E2.5000908@moneybookers.com> <200801161802.48506.hselasky@c2i.net> In-Reply-To: <200801161802.48506.hselasky@c2i.net> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/5490/Thu Jan 17 11:39:33 2008 on blah.cmotd.com X-Virus-Status: Clean Cc: freebsd-usb@freebsd.org Subject: Re: [SOLVED] Re: Problem with usb4bsd rev566 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, 17 Jan 2008 16:46:48 -0000 Hi Hans, Unfortunately with rev568 I still see: /usr/src/sys/dev/usb/usb_transfer.c: In function 'usbd_callback_intr_td': /usr/src/sys/dev/usb/usb_transfer.c:2094: warning: 'xfer[2]' may be used uninitialized in this function /usr/src/sys/dev/usb/usb_transfer.c:2094: warning: 'xfer[3]' may be used uninitialized in this function *** Error code 1 And the code does not compile. -- Best Wishes, Stefan Lambrev ICQ# 24134177 From owner-freebsd-usb@FreeBSD.ORG Thu Jan 17 17:14:51 2008 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 9BE1D16A417 for ; Thu, 17 Jan 2008 17:14:51 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe09.swipnet.se [212.247.155.1]) by mx1.freebsd.org (Postfix) with ESMTP id 26D1C13C459 for ; Thu, 17 Jan 2008 17:14:50 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [85.19.218.45] (account mc467741@c2i.net [85.19.218.45] verified) by mailfe09.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 601056197; Thu, 17 Jan 2008 18:14:49 +0100 From: Hans Petter Selasky To: Stefan Lambrev Date: Thu, 17 Jan 2008 18:15:37 +0100 User-Agent: KMail/1.9.7 References: <477BC1A3.5080406@moneybookers.com> <200801161802.48506.hselasky@c2i.net> <478F8670.3030500@moneybookers.com> In-Reply-To: <478F8670.3030500@moneybookers.com> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801171815.38196.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: [SOLVED] Re: Problem with usb4bsd rev566 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, 17 Jan 2008 17:14:51 -0000 On Thursday 17 January 2008, Stefan Lambrev wrote: > Hi Hans, > > Unfortunately with rev568 I still see: > > /usr/src/sys/dev/usb/usb_transfer.c: In function 'usbd_callback_intr_td': > /usr/src/sys/dev/usb/usb_transfer.c:2094: warning: 'xfer[2]' may be used > uninitialized in this function > /usr/src/sys/dev/usb/usb_transfer.c:2094: warning: 'xfer[3]' may be used > uninitialized in this function > *** Error code 1 > > And the code does not compile. I've given it another try: +static void +usbd_callback_intr_td_sub(struct usbd_xfer **xfer, uint8_t dropcount) +{ + struct usbd_memory_info *info = xfer[0]->usb_root; + + mtx_unlock(info->usb_mtx); + + /* + * We exploit the fact that the mutex is the same for + * all callbacks: + */ + mtx_lock(info->priv_mtx); + + /* call callback(s) */ + switch (dropcount) { + case 4: + usbd_callback_wrapper(xfer[3], info, USBD_CONTEXT_CALLBACK); + case 3: + usbd_callback_wrapper(xfer[2], info, USBD_CONTEXT_CALLBACK); + case 2: + usbd_callback_wrapper(xfer[1], info, USBD_CONTEXT_CALLBACK); + case 1: + usbd_callback_wrapper(xfer[0], info, USBD_CONTEXT_CALLBACK); + default: + break; + } + mtx_unlock(info->priv_mtx); + mtx_lock(info->usb_mtx); + info->memory_refcount -= dropcount; + return; +} + /*------------------------------------------------------------------------* * usbd_callback_intr_td * @@ -2093,7 +2125,6 @@ struct usbd_memory_info *info = arg; struct usbd_xfer *xfer[4]; struct thread *td; - uint8_t dropcount; /* adjust priority */ td = curthread; @@ -2110,60 +2141,31 @@ repeat: xfer[0] = LIST_FIRST(&(info->done_head)); if (xfer[0]) { - do { LIST_REMOVE(xfer[0], done_list); xfer[0]->done_list.le_prev = NULL; xfer[1] = LIST_FIRST(&(info->done_head)); if (xfer[1] == NULL) { - dropcount = 1; - break; + usbd_callback_intr_td_sub(xfer, 1); + goto repeat; } LIST_REMOVE(xfer[1], done_list); xfer[1]->done_list.le_prev = NULL; xfer[2] = LIST_FIRST(&(info->done_head)); if (xfer[2] == NULL) { - dropcount = 2; - break; + usbd_callback_intr_td_sub(xfer, 2); + goto repeat; } LIST_REMOVE(xfer[2], done_list); xfer[2]->done_list.le_prev = NULL; xfer[3] = LIST_FIRST(&(info->done_head)); if (xfer[3] == NULL) { - dropcount = 3; - break; + usbd_callback_intr_td_sub(xfer, 3); + goto repeat; } LIST_REMOVE(xfer[3], done_list); xfer[3]->done_list.le_prev = NULL; - dropcount = 4; - } while (0); - - mtx_unlock(info->usb_mtx); - - /* - * we exploit the fact that the mutex is the same for - * all callbacks - */ - mtx_lock(info->priv_mtx); - - /* call callback(s) */ - switch (dropcount) { - case 4: - usbd_callback_wrapper(xfer[3], info, USBD_CONTEXT_CALLBACK); - case 3: - usbd_callback_wrapper(xfer[2], info, USBD_CONTEXT_CALLBACK); - case 2: - usbd_callback_wrapper(xfer[1], info, USBD_CONTEXT_CALLBACK); - case 1: - usbd_callback_wrapper(xfer[0], info, USBD_CONTEXT_CALLBACK); - default: - break; - } - mtx_unlock(info->priv_mtx); - - mtx_lock(info->usb_mtx); - info->memory_refcount -= dropcount; - goto repeat; - + usbd_callback_intr_td_sub(xfer, 4); + goto repeat; } else { if (info->memory_refcount != 0) { info->done_sleep = 1; Could you do an "svn update" and see if it finally compiles without errors ? --HPS --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Jan 18 13:48:32 2008 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 1B48316A418 for ; Fri, 18 Jan 2008 13:48:32 +0000 (UTC) (envelope-from steve@anelay.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.freebsd.org (Postfix) with ESMTP id 8B05713C4DB for ; Fri, 18 Jan 2008 13:48:30 +0000 (UTC) (envelope-from steve@anelay.net) Received: from [192.168.0.147] (cpc2-cove6-0-0-cust52.sol2.cable.ntl.com [86.20.52.53]) by mrelayeu.kundenserver.de (node=mrelayeu0) with ESMTP (Nemesis) id 0MKwh2-1JFra53R0R-0005fU; Fri, 18 Jan 2008 14:48:29 +0100 Message-ID: <4790AE22.3090005@anelay.net> Date: Fri, 18 Jan 2008 13:48:18 +0000 From: Steve Anelay User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: freebsd-usb@freebsd.org References: <1200508961.6490.9.camel@tek-patrol.DISTROSHACK> <200801162029.45471.hselasky@c2i.net> In-Reply-To: <200801162029.45471.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX198crtc0Uqo/DDK31n1nxL7PJWVeOwKohjSaVF iBkbiDxmOA7gPPHGDFaiP3Ur4xyqa/Od3Ss877qmsC+8SL7cI3 u9JGa3R7IEMKlUWomr92Q== Cc: Subject: Re: Problem with USB4BSD on DesktopBSD 1.6 (i386) 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, 18 Jan 2008 13:48:32 -0000 Hans Petter Selasky wrote: > Hi, > > The following sysctl will enable debugging: > > sysctl hw.usb.umass.debug=-1 > > Have you tried loading "atausb" instead of "umass" ? > > Also try to cat the complete disk and see where it stops. > > dd if=/dev/da0 of=/dev/null bs=131072 > > BTW: I'm sorry to say that if you stress certain kinds of memory sticks they > will simply stop working due to poor software design inside the meory stick > itself. It is usually a problem of the memory stick manufacturer. > > However there is a way to nice/throttle USB transfers now! And maybe it is an > idea to try that. > > How fast are your memory sticks? > > --HPS > > Hi Peter Thanks for getting back to me so soon. Apologies if I've misinterpreted your advice, I've only been using DesktopBSD for a week. Anyway, after enabling debugging lots of messages similar to the one below appeared in the log after inserting a stick: Jan 17 18:41:33 TekBSD kernel: da0 at umass-sim0 bus 0 target 0 lun 0 Jan 17 18:41:33 TekBSD kernel: da0: < USB DISK 2.0 PMAP> Removable Direct Access SCSI-0 device Jan 17 18:41:33 TekBSD kernel: umass0:umass_cam_action: 11:0:0:XPT_GET_TRAN_SETTINGS:. Jan 17 18:41:33 TekBSD kernel: umass0:umass_cam_action: 11:0:0:XPT_PATH_INQ:. Jan 17 18:41:33 TekBSD kernel: da0: 40.000MB/s transfers Jan 17 18:41:33 TekBSD kernel: da0: 1961MB (4016128 512 byte sectors: 255H 63S/T 249C) Jan 17 18:41:33 TekBSD kernel: umass0:umass_cam_action: 11:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense Jan 17 18:41:33 TekBSD kernel: umass0:umass_bbb_dump_cbw: CBW 6: cmd = 10b (0x250000000000...), data = 8b, lun = 0, dir = in Jan 17 18:41:33 TekBSD kernel: umass0:umass_transfer_start: transfer index = 4 Jan 17 18:41:33 TekBSD kernel: umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=8 Jan 17 18:41:33 TekBSD kernel: umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 Jan 17 18:41:33 TekBSD kernel: umass0:umass_transfer_start: transfer index = 8 Jan 17 18:41:33 TekBSD kernel: umass0:umass_bbb_dump_csw: CSW 6: sig = 0x53425355 (valid), tag = 0x00000006, res = 0, status = 0x00 (good) Jan 17 18:41:33 TekBSD kernel: umass0:umass_cam_action: 11:0:0:XPT_SCSI_IO: cmd: 0x1e, flags: 0xc0, 6b cmd/0b data/32b sense Jan 17 18:41:33 TekBSD kernel: umass0:umass_bbb_dump_cbw: CBW 7: cmd = 6b (0x1e0000000100), data = 0b, lun = 0, dir = out Jan 17 18:41:33 TekBSD kernel: umass0:umass_transfer_start: transfer index = 8 Jan 17 18:41:33 TekBSD kernel: umass0:umass_bbb_dump_csw: CSW 7: sig = 0x53425355 (valid), tag = 0x00000007, res = 0, status = 0x01 (failed) Jan 17 18:41:33 TekBSD kernel: umass0:umass_t_bbb_status_callback: Command failed, residue = 0 Jan 17 18:41:33 TekBSD kernel: umass0:umass_cam_cb: Fetching 32 bytes of sense data Jan 17 18:41:33 TekBSD kernel: umass0:umass_bbb_dump_cbw: CBW 8: cmd = 6b (0x030000002000), data = 32b, lun = 0, dir = in dd if=/dev/da0 of=/dev/null bs=131072 returned: dd: /dev/da0: Input/output error 0+0 records in 0+0 records out 0 bytes transferred in 51.854561 secs (0 bytes/sec) And rebuilding the kernel to use atausb instead of umass resulted in no improvement. I inserted a stick as soon as I had rebooted with the new kernel and dmesg | tail showed the following: afd0: FAILURE - PREVENT_ALLOW ILLEGAL REQUEST asc=0x24 ascq=0x00 afd0: FAILURE - PREVENT_ALLOW ILLEGAL REQUEST asc=0x24 ascq=0x00 afd0: FAILURE - PREVENT_ALLOW ILLEGAL REQUEST asc=0x24 ascq=0x00 And this was in the logs: Jan 17 19:22:46 TekBSD kernel: da0: Removable Direct Access SCSI-0 device Jan 17 19:22:46 TekBSD kernel: da0: 3.300MB/s transfers Jan 17 19:22:46 TekBSD kernel: da0: 3872MB (7929856 512 byte sectors: 255H 63S/T 493C) Jan 17 19:22:46 TekBSD kernel: afd0: FAILURE - PREVENT_ALLOW ILLEGAL REQUEST asc=0x24 ascq=0x00 Jan 17 19:22:47 TekBSD last message repeated 10 times Jan 17 19:24:31 TekBSD kernel: atausb0: at uhub1, port 4, addr 2 (disconnected) Jan 17 19:24:31 TekBSD kernel: afd0: detached Jan 17 19:24:31 TekBSD kernel: (da0:ata10:0:0:0): lost device Jan 17 19:24:31 TekBSD kernel: (da0:ata10:0:0:0): removing device entry Jan 17 19:24:31 TekBSD kernel: atapicam10: detached Jan 17 19:24:31 TekBSD kernel: ata10: detached The usb sticks I'm using are two corsair flash voyagers 4GB (16mb/s) and one generic 2GB stick (12mb/s). I'm not sure what you mean when you say there is a way to nice/throttle USB transfers now. How would I do that? Hope this means more to you than me, and thanks again. Steve From owner-freebsd-usb@FreeBSD.ORG Fri Jan 18 16:56:27 2008 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 09ACF16A46D for ; Fri, 18 Jan 2008 16:56:27 +0000 (UTC) (envelope-from gonzo@pbxpress.com) Received: from bugor.portaone.com (bugor.portaone.com [65.61.203.147]) by mx1.freebsd.org (Postfix) with ESMTP id AC3F113C4E7 for ; Fri, 18 Jan 2008 16:56:26 +0000 (UTC) (envelope-from gonzo@pbxpress.com) Received: from mail.pbxpress.com ([65.61.203.142] helo=leaf.pbxpress.com) by bugor.portaone.com (8.11.3/8.11.3) with ESMTP (TLSv1:AES256-SHA:256)id 1JFuH9-0003IB-NC for freebsd-usb@freebsd.org; Fri, 18 Jan 2008 08:41:03 -0800 Received: from jeeves.bluezbox.com (k3-gw.portaone.com [193.28.87.193]) (authenticated bits=0) by leaf.pbxpress.com (8.13.3/8.13.3) with ESMTP id m0IGewib029811 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 18 Jan 2008 08:41:02 -0800 (PST) (envelope-from gonzo@pbxpress.com) Message-ID: <4790D699.9000403@pbxpress.com> Date: Fri, 18 Jan 2008 18:40:57 +0200 From: Oleksandr Tymoshenko User-Agent: Thunderbird 2.0.0.6 (X11/20070907) MIME-Version: 1.0 To: freebsd-usb@freebsd.org References: <4790D5E3.40008@pbxpress.com> In-Reply-To: <4790D5E3.40008@pbxpress.com> Content-Type: multipart/mixed; boundary="------------010506070101090909000909" X-Spam-Status: No, recieved from trusted server Subject: Re: Call for testers: AXE88x78 support for RELENG_6 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, 18 Jan 2008 16:56:27 -0000 This is a multi-part message in MIME format. --------------010506070101090909000909 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Oleksandr Tymoshenko wrote: > patch atached Sorry, now it *is* attached. -- Sincerely, Oleksandr Tymoshenko PBXpress Communications, Inc. http://www.pbxpress.com Tel./Fax.: +1 866 SIP PBX1 Ext. 7117 --------------010506070101090909000909 Content-Type: text/plain; name="if_axe.88x78.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="if_axe.88x78.diff" --- dev/usb/if_axe.c.orig 2008-01-18 18:04:09.000000000 +0000 +++ dev/usb/if_axe.c 2008-01-18 18:04:36.000000000 +0000 @@ -31,11 +31,11 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/if_axe.c,v 1.30.2.6 2007/05/21 18:13:11 brueffer Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/if_axe.c,v 1.56 2007/11/10 16:23:38 sam Exp $"); /* - * ASIX Electronics AX88172 USB 2.0 ethernet driver. Used in the - * LinkSys USB200M and various other adapters. + * ASIX Electronics AX88172/AX88178/AX88778 USB 2.0 ethernet driver. + * Used in the LinkSys USB200M and various other adapters. * * Manuals available from: * http://www.asix.com.tw/datasheet/mac/Ax88172.PDF @@ -69,12 +69,15 @@ #include #include +#include #include #include #include +#include #include #include #include +#include #include #include @@ -98,51 +101,83 @@ #include #include -/* "controller miibus0" required. See GENERIC if you get errors here. */ +/* "device miibus" required. See GENERIC if you get errors here. */ #include "miibus_if.h" +/* + * AXE_178_MAX_FRAME_BURST + * max frame burst size for Ax88178 and Ax88772 + * 0 2048 bytes + * 1 4096 bytes + * 2 8192 bytes + * 3 16384 bytes + * use the largest your system can handle without usb stalling. + * + * NB: 88772 parts appear to generate lots of input errors with + * a 2K rx buffer and 8K is only slightly faster than 4K on an + * EHCI port on a T42 so change at your own risk. + */ +#define AXE_178_MAX_FRAME_BURST 1 + #include /* * Various supported device vendors/products. */ -Static struct axe_type axe_devs[] = { - { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88172 }, - { USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DUBE100 }, - { USB_VENDOR_JVC, USB_PRODUCT_JVC_MP_PRX1 }, - { USB_VENDOR_LINKSYS2, USB_PRODUCT_LINKSYS2_USB200M }, - { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUAU2KTX }, - { USB_VENDOR_NETGEAR, USB_PRODUCT_NETGEAR_FA120 }, - { USB_VENDOR_SYSTEMTALKS, USB_PRODUCT_SYSTEMTALKS_SGCX2UL }, - { USB_VENDOR_SITECOM, USB_PRODUCT_SITECOM_LN029 }, - { 0, 0 } +const struct axe_type axe_devs[] = { + { { USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_UF200}, 0 }, + { { USB_VENDOR_ACERCM, USB_PRODUCT_ACERCM_EP1427X2}, 0 }, + { { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88172}, 0 }, + { { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772}, AX772 }, + { { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88178}, AX178 }, + { { USB_VENDOR_ATEN, USB_PRODUCT_ATEN_UC210T}, 0 }, + { { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D5055 }, AX178 }, + { { USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USB2AR}, 0}, + { { USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_USB200MV2}, AX772 }, + { { USB_VENDOR_COREGA, USB_PRODUCT_COREGA_FETHER_USB2_TX }, 0}, + { { USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DUBE100}, 0 }, + { { USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DUBE100B1 }, AX772 }, + { { USB_VENDOR_GOODWAY, USB_PRODUCT_GOODWAY_GWUSB2E}, 0 }, + { { USB_VENDOR_IODATA, USB_PRODUCT_IODATA_ETGUS2 }, AX178 }, + { { USB_VENDOR_JVC, USB_PRODUCT_JVC_MP_PRX1}, 0 }, + { { USB_VENDOR_LINKSYS2, USB_PRODUCT_LINKSYS2_USB200M}, 0 }, + { { USB_VENDOR_LINKSYS5, USB_PRODUCT_LINKSYS5_USB1000 }, AX178 }, + { { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUAU2KTX}, 0 }, + { { USB_VENDOR_NETGEAR, USB_PRODUCT_NETGEAR_FA120}, 0 }, + { { USB_VENDOR_OQO, USB_PRODUCT_OQO_ETHER01PLUS }, AX772 }, + { { USB_VENDOR_PLANEX3, USB_PRODUCT_PLANEX3_GU1000T }, AX178 }, + { { USB_VENDOR_SYSTEMTALKS, USB_PRODUCT_SYSTEMTALKS_SGCX2UL}, 0 }, + { { USB_VENDOR_SITECOM, USB_PRODUCT_SITECOM_LN029}, 0 }, + { { USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_LN028 }, AX178 } }; -Static int axe_match(device_ptr_t); -Static int axe_attach(device_ptr_t); -Static int axe_detach(device_ptr_t); - -Static int axe_encap(struct axe_softc *, struct mbuf *, int); -Static void axe_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); -Static void axe_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); -Static void axe_tick(void *); -Static void axe_rxstart(struct ifnet *); -Static void axe_start(struct ifnet *); -Static int axe_ioctl(struct ifnet *, u_long, caddr_t); -Static void axe_init(void *); -Static void axe_stop(struct axe_softc *); -Static void axe_watchdog(struct ifnet *); -Static void axe_shutdown(device_ptr_t); -Static int axe_miibus_readreg(device_ptr_t, int, int); -Static int axe_miibus_writereg(device_ptr_t, int, int, int); -Static void axe_miibus_statchg(device_ptr_t); -Static int axe_cmd(struct axe_softc *, int, int, int, void *); -Static int axe_ifmedia_upd(struct ifnet *); -Static void axe_ifmedia_sts(struct ifnet *, struct ifmediareq *); +#define axe_lookup(v, p) ((const struct axe_type *)usb_lookup(axe_devs, v, p)) + +static device_probe_t axe_match; +static device_attach_t axe_attach; +static device_detach_t axe_detach; +static device_shutdown_t axe_shutdown; +static miibus_readreg_t axe_miibus_readreg; +static miibus_writereg_t axe_miibus_writereg; +static miibus_statchg_t axe_miibus_statchg; + +static int axe_encap(struct axe_softc *, struct mbuf *, int); +static void axe_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); +static void axe_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); +static void axe_tick(void *); +static void axe_tick_task(void *); +static void axe_start(struct ifnet *); +static int axe_ioctl(struct ifnet *, u_long, caddr_t); +static void axe_init(void *); +static void axe_stop(struct axe_softc *); +static void axe_watchdog(struct ifnet *); +static int axe_cmd(struct axe_softc *, int, int, int, void *); +static int axe_ifmedia_upd(struct ifnet *); +static void axe_ifmedia_sts(struct ifnet *, struct ifmediareq *); -Static void axe_setmulti(struct axe_softc *); +static void axe_setmulti(struct axe_softc *); -Static device_method_t axe_methods[] = { +static device_method_t axe_methods[] = { /* Device interface */ DEVMETHOD(device_probe, axe_match), DEVMETHOD(device_attach, axe_attach), @@ -161,25 +196,26 @@ { 0, 0 } }; -Static driver_t axe_driver = { +static driver_t axe_driver = { "axe", axe_methods, sizeof(struct axe_softc) }; -Static devclass_t axe_devclass; +static devclass_t axe_devclass; DRIVER_MODULE(axe, uhub, axe_driver, axe_devclass, usbd_driver_load, 0); DRIVER_MODULE(miibus, axe, miibus_driver, miibus_devclass, 0, 0); MODULE_DEPEND(axe, usb, 1, 1, 1); MODULE_DEPEND(axe, miibus, 1, 1, 1); -Static int +static int axe_cmd(struct axe_softc *sc, int cmd, int index, int val, void *buf) { usb_device_request_t req; usbd_status err; + AXE_SLEEPLOCKASSERT(sc); if (sc->axe_dying) return(0); @@ -200,16 +236,17 @@ return(0); } -Static int -axe_miibus_readreg(device_ptr_t dev, int phy, int reg) +static int +axe_miibus_readreg(device_t dev, int phy, int reg) { - struct axe_softc *sc = USBGETSOFTC(dev); + struct axe_softc *sc = device_get_softc(dev); usbd_status err; u_int16_t val; if (sc->axe_dying) return(0); + AXE_SLEEPLOCKASSERT(sc); #ifdef notdef /* * The chip tells us the MII address of any supported @@ -232,7 +269,7 @@ AXE_UNLOCK(sc); if (err) { - printf("axe%d: read PHY failed\n", sc->axe_unit); + device_printf(sc->axe_dev, "read PHY failed\n"); return(-1); } @@ -242,15 +279,16 @@ return (val); } -Static int -axe_miibus_writereg(device_ptr_t dev, int phy, int reg, int val) +static int +axe_miibus_writereg(device_t dev, int phy, int reg, int val) { - struct axe_softc *sc = USBGETSOFTC(dev); + struct axe_softc *sc = device_get_softc(dev); usbd_status err; if (sc->axe_dying) return(0); + AXE_SLEEPLOCKASSERT(sc); AXE_LOCK(sc); axe_cmd(sc, AXE_CMD_MII_OPMODE_SW, 0, 0, NULL); err = axe_cmd(sc, AXE_CMD_MII_WRITE_REG, reg, phy, (void *)&val); @@ -258,29 +296,46 @@ AXE_UNLOCK(sc); if (err) { - printf("axe%d: write PHY failed\n", sc->axe_unit); + device_printf(sc->axe_dev, "write PHY failed\n"); return(-1); } return (0); } -Static void -axe_miibus_statchg(device_ptr_t dev) +static void +axe_miibus_statchg(device_t dev) { -#ifdef notdef - struct axe_softc *sc = USBGETSOFTC(dev); + struct axe_softc *sc = device_get_softc(dev); struct mii_data *mii = GET_MII(sc); -#endif - /* doesn't seem to be necessary */ + int val, err; - return; + val = (mii->mii_media_active & IFM_GMASK) == IFM_FDX ? + AXE_MEDIA_FULL_DUPLEX : 0; + if (sc->axe_flags & (AX178|AX772)) { + val |= AXE_178_MEDIA_RX_EN | AXE_178_MEDIA_MAGIC; + + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_1000_T: + val |= AXE_178_MEDIA_GMII | AXE_178_MEDIA_ENCK; + break; + case IFM_100_TX: + val |= AXE_178_MEDIA_100TX; + break; + case IFM_10_T: + /* doesn't need to be handled */ + break; + } + } + err = axe_cmd(sc, AXE_CMD_WRITE_MEDIA, 0, val, NULL); + if (err) + device_printf(dev, "media change failed, error %d\n", err); } /* * Set media options. */ -Static int +static int axe_ifmedia_upd(struct ifnet *ifp) { struct axe_softc *sc = ifp->if_softc; @@ -300,7 +355,7 @@ /* * Report current media status. */ -Static void +static void axe_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) { struct axe_softc *sc = ifp->if_softc; @@ -313,7 +368,7 @@ return; } -Static void +static void axe_setmulti(struct axe_softc *sc) { struct ifnet *ifp; @@ -353,7 +408,94 @@ return; } -Static void +static void +axe_ax88178_init(struct axe_softc *sc) +{ + int gpio0 = 0, phymode = 0; + u_int16_t eeprom; + + axe_cmd(sc, AXE_CMD_SROM_WR_ENABLE, 0, 0, NULL); + /* XXX magic */ + axe_cmd(sc, AXE_CMD_SROM_READ, 0, 0x0017, &eeprom); + axe_cmd(sc, AXE_CMD_SROM_WR_DISABLE, 0, 0, NULL); + + /* if EEPROM is invalid we have to use to GPIO0 */ + if (eeprom == 0xffff) { + phymode = 0; + gpio0 = 1; + } else { + phymode = eeprom & 7; + gpio0 = (eeprom & 0x80) ? 0 : 1; + } + + axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x008c, NULL); + usbd_delay_ms(sc->axe_udev, 40); + if ((eeprom >> 8) != 1) { + axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x003c, NULL); + usbd_delay_ms(sc->axe_udev, 30); + + axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x001c, NULL); + usbd_delay_ms(sc->axe_udev, 300); + + axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x003c, NULL); + usbd_delay_ms(sc->axe_udev, 30); + } else { + axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x0004, NULL); + usbd_delay_ms(sc->axe_udev, 30); + axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x000c, NULL); + usbd_delay_ms(sc->axe_udev, 30); + } + + /* soft reset */ + axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, 0, NULL); + usbd_delay_ms(sc->axe_udev, 150); + axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, + AXE_SW_RESET_PRL | AXE_178_RESET_MAGIC, NULL); + usbd_delay_ms(sc->axe_udev, 150); + axe_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, 0, NULL); +} + +static void +axe_ax88772_init(struct axe_softc *sc) +{ + axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x00b0, NULL); + usbd_delay_ms(sc->axe_udev, 40); + + if (sc->axe_phyaddrs[1] == AXE_INTPHY) { + /* ask for embedded PHY */ + axe_cmd(sc, AXE_CMD_SW_PHY_SELECT, 0, 0x01, NULL); + usbd_delay_ms(sc->axe_udev, 10); + + /* power down and reset state, pin reset state */ + axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, AXE_SW_RESET_CLEAR, NULL); + usbd_delay_ms(sc->axe_udev, 60); + + /* power down/reset state, pin operating state */ + axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, + AXE_SW_RESET_IPPD | AXE_SW_RESET_PRL, NULL); + usbd_delay_ms(sc->axe_udev, 150); + + /* power up, reset */ + axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, AXE_SW_RESET_PRL, NULL); + + /* power up, operating */ + axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, + AXE_SW_RESET_IPRL | AXE_SW_RESET_PRL, NULL); + } else { + /* ask for external PHY */ + axe_cmd(sc, AXE_CMD_SW_PHY_SELECT, 0, 0x00, NULL); + usbd_delay_ms(sc->axe_udev, 10); + + /* power down/reset state, pin operating state */ + axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, + AXE_SW_RESET_IPPD | AXE_SW_RESET_PRL, NULL); + } + + usbd_delay_ms(sc->axe_udev, 150); + axe_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, 0, NULL); +} + +static void axe_reset(struct axe_softc *sc) { if (sc->axe_dying) @@ -362,8 +504,7 @@ if (usbd_set_config_no(sc->axe_udev, AXE_CONFIG_NO, 1) || usbd_device2interface_handle(sc->axe_udev, AXE_IFACE_IDX, &sc->axe_iface)) { - printf("axe%d: getting interface handle failed\n", - sc->axe_unit); + device_printf(sc->axe_dev, "getting interface handle failed\n"); } /* Wait a little while for the chip to get its brains in order. */ @@ -374,71 +515,76 @@ /* * Probe for a AX88172 chip. */ -USB_MATCH(axe) +static int +axe_match(device_t self) { - USB_MATCH_START(axe, uaa); - struct axe_type *t; + struct usb_attach_arg *uaa = device_get_ivars(self); if (!uaa->iface) return(UMATCH_NONE); - - t = axe_devs; - while(t->axe_vid) { - if (uaa->vendor == t->axe_vid && - uaa->product == t->axe_did) { - return(UMATCH_VENDOR_PRODUCT); - } - t++; - } - - return(UMATCH_NONE); + return (axe_lookup(uaa->vendor, uaa->product) != NULL ? + UMATCH_VENDOR_PRODUCT : UMATCH_NONE); } /* * Attach the interface. Allocate softc structures, do ifmedia * setup and ethernet/BPF attach. */ -USB_ATTACH(axe) +static int +axe_attach(device_t self) { - USB_ATTACH_START(axe, sc, uaa); - char devinfo[1024]; + struct axe_softc *sc = device_get_softc(self); + struct usb_attach_arg *uaa = device_get_ivars(self); + const struct axe_type *type; u_char eaddr[ETHER_ADDR_LEN]; struct ifnet *ifp; usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed; int i; - bzero(sc, sizeof(struct axe_softc)); sc->axe_udev = uaa->device; sc->axe_dev = self; - sc->axe_unit = device_get_unit(self); + type = axe_lookup(uaa->vendor, uaa->product); + if (type != NULL) + sc->axe_flags = type->axe_flags; if (usbd_set_config_no(sc->axe_udev, AXE_CONFIG_NO, 1)) { - printf("axe%d: getting interface handle failed\n", - sc->axe_unit); - USB_ATTACH_ERROR_RETURN; + device_printf(sc->axe_dev, "getting interface handle failed\n"); + return ENXIO; } + usb_init_task(&sc->axe_tick_task, axe_tick_task, sc); + if (usbd_device2interface_handle(uaa->device, AXE_IFACE_IDX, &sc->axe_iface)) { - printf("axe%d: getting interface handle failed\n", - sc->axe_unit); - USB_ATTACH_ERROR_RETURN; + device_printf(sc->axe_dev, "getting interface handle failed\n"); + return ENXIO; } - id = usbd_get_interface_descriptor(sc->axe_iface); + sc->axe_boundary = 64; + if (sc->axe_flags & (AX178|AX772)) { + if (sc->axe_udev->speed == USB_SPEED_HIGH) { + sc->axe_bufsz = AXE_178_MAX_BUFSZ; + sc->axe_boundary = 512; + } else + sc->axe_bufsz = AXE_178_MIN_BUFSZ; + } else + sc->axe_bufsz = AXE_172_BUFSZ; +{ /* XXX debug */ +device_printf(sc->axe_dev, "%s, bufsz %d, boundary %d\n", + sc->axe_flags & AX178 ? "AX88178" : + sc->axe_flags & AX772 ? "AX88772" : "AX88172", + sc->axe_bufsz, sc->axe_boundary); +} - usbd_devinfo(uaa->device, 0, devinfo); - device_set_desc_copy(self, devinfo); - printf("%s: %s\n", USBDEVNAME(self), devinfo); + id = usbd_get_interface_descriptor(sc->axe_iface); /* Find endpoints. */ for (i = 0; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(sc->axe_iface, i); if (!ed) { - printf("axe%d: couldn't get ep %d\n", - sc->axe_unit, i); - USB_ATTACH_ERROR_RETURN; + device_printf(sc->axe_dev, "couldn't get ep %d\n", i); + return ENXIO; } if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { @@ -454,18 +600,30 @@ mtx_init(&sc->axe_mtx, device_get_nameunit(self), MTX_NETWORK_LOCK, MTX_DEF | MTX_RECURSE); + sx_init(&sc->axe_sleeplock, device_get_nameunit(self)); + AXE_SLEEPLOCK(sc); AXE_LOCK(sc); + /* We need the PHYID for the init dance in some cases */ + axe_cmd(sc, AXE_CMD_READ_PHYID, 0, 0, (void *)&sc->axe_phyaddrs); + + if (sc->axe_flags & AX178) + axe_ax88178_init(sc); + else if (sc->axe_flags & AX772) + axe_ax88772_init(sc); + /* * Get station address. */ - axe_cmd(sc, AXE_CMD_READ_NODEID, 0, 0, &eaddr); + if (sc->axe_flags & (AX178|AX772)) + axe_cmd(sc, AXE_178_CMD_READ_NODEID, 0, 0, &eaddr); + else + axe_cmd(sc, AXE_172_CMD_READ_NODEID, 0, 0, &eaddr); /* - * Load IPG values and PHY indexes. + * Fetch IPG values. */ axe_cmd(sc, AXE_CMD_READ_IPG012, 0, 0, (void *)&sc->axe_ipgs); - axe_cmd(sc, AXE_CMD_READ_PHYID, 0, 0, (void *)&sc->axe_phyaddrs); /* * Work around broken adapters that appear to lie about @@ -475,13 +633,15 @@ ifp = sc->axe_ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { - printf("axe%d: can not if_alloc()\n", sc->axe_unit); + device_printf(sc->axe_dev, "can not if_alloc()\n"); AXE_UNLOCK(sc); + AXE_SLEEPUNLOCK(sc); + sx_destroy(&sc->axe_sleeplock); mtx_destroy(&sc->axe_mtx); - USB_ATTACH_ERROR_RETURN; + return ENXIO; } ifp->if_softc = sc; - if_initname(ifp, "axe", sc->axe_unit); + if_initname(ifp, "axe", device_get_unit(sc->axe_dev)); ifp->if_mtu = ETHERMTU; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | IFF_NEEDSGIANT; @@ -493,16 +653,15 @@ ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; IFQ_SET_READY(&ifp->if_snd); - sc->axe_qdat.ifp = ifp; - sc->axe_qdat.if_rxstart = axe_rxstart; - if (mii_phy_probe(self, &sc->axe_miibus, axe_ifmedia_upd, axe_ifmedia_sts)) { - printf("axe%d: MII without any PHY!\n", sc->axe_unit); + device_printf(sc->axe_dev, "MII without any PHY!\n"); if_free(ifp); AXE_UNLOCK(sc); + AXE_SLEEPUNLOCK(sc); + sx_destroy(&sc->axe_sleeplock); mtx_destroy(&sc->axe_mtx); - USB_ATTACH_ERROR_RETURN; + return ENXIO; } /* @@ -516,12 +675,13 @@ sc->axe_dying = 0; AXE_UNLOCK(sc); + AXE_SLEEPUNLOCK(sc); - USB_ATTACH_SUCCESS_RETURN; + return 0; } -Static int -axe_detach(device_ptr_t dev) +static int +axe_detach(device_t dev) { struct axe_softc *sc; struct ifnet *ifp; @@ -532,6 +692,8 @@ sc->axe_dying = 1; untimeout(axe_tick, sc, sc->axe_stat_ch); + usb_rem_task(sc->axe_udev, &sc->axe_tick_task); + ether_ifdetach(ifp); if_free(ifp); @@ -543,55 +705,122 @@ usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_INTR]); AXE_UNLOCK(sc); + sx_destroy(&sc->axe_sleeplock); mtx_destroy(&sc->axe_mtx); return(0); } -Static void -axe_rxstart(struct ifnet *ifp) +static int +axe_rx_list_init(struct axe_softc *sc) { - struct axe_softc *sc; - struct ue_chain *c; + struct axe_cdata *cd; + struct axe_chain *c; + int i; - sc = ifp->if_softc; - AXE_LOCK(sc); - c = &sc->axe_cdata.ue_rx_chain[sc->axe_cdata.ue_rx_prod]; + cd = &sc->axe_cdata; + for (i = 0; i < AXE_RX_LIST_CNT; i++) { + c = &cd->axe_rx_chain[i]; + c->axe_sc = sc; + c->axe_idx = i; + c->axe_mbuf = NULL; + if (c->axe_xfer == NULL) { + c->axe_xfer = usbd_alloc_xfer(sc->axe_udev); + if (c->axe_xfer == NULL) + return (ENOBUFS); + c->axe_buf = usbd_alloc_buffer(c->axe_xfer, + sc->axe_bufsz); + if (c->axe_buf == NULL) { + usbd_free_xfer(c->axe_xfer); + return (ENOBUFS); + } + } + } - c->ue_mbuf = usb_ether_newbuf(); - if (c->ue_mbuf == NULL) { - printf("%s: no memory for rx list " - "-- packet dropped!\n", USBDEVNAME(sc->axe_dev)); - ifp->if_ierrors++; - AXE_UNLOCK(sc); - return; + return (0); +} + +static void +axe_rx_list_free(struct axe_softc *sc) +{ + int i; + + for (i = 0; i < AXE_RX_LIST_CNT; i++) { + if (sc->axe_cdata.axe_rx_chain[i].axe_mbuf != NULL) { + m_freem(sc->axe_cdata.axe_rx_chain[i].axe_mbuf); + sc->axe_cdata.axe_rx_chain[i].axe_mbuf = NULL; + } + if (sc->axe_cdata.axe_rx_chain[i].axe_xfer != NULL) { + usbd_free_xfer(sc->axe_cdata.axe_rx_chain[i].axe_xfer); + sc->axe_cdata.axe_rx_chain[i].axe_xfer = NULL; + } } +} - /* Setup new transfer. */ - usbd_setup_xfer(c->ue_xfer, sc->axe_ep[AXE_ENDPT_RX], - c, mtod(c->ue_mbuf, char *), UE_BUFSZ, USBD_SHORT_XFER_OK, - USBD_NO_TIMEOUT, axe_rxeof); - usbd_transfer(c->ue_xfer); - AXE_UNLOCK(sc); +static int +axe_tx_list_init(struct axe_softc *sc) +{ + struct axe_cdata *cd; + struct axe_chain *c; + int i; - return; + cd = &sc->axe_cdata; + for (i = 0; i < AXE_TX_LIST_CNT; i++) { + c = &cd->axe_tx_chain[i]; + c->axe_sc = sc; + c->axe_idx = i; + c->axe_mbuf = NULL; + if (c->axe_xfer == NULL) { + c->axe_xfer = usbd_alloc_xfer(sc->axe_udev); + if (c->axe_xfer == NULL) + return (ENOBUFS); + c->axe_buf = usbd_alloc_buffer(c->axe_xfer, + sc->axe_bufsz); + if (c->axe_buf == NULL) { + usbd_free_xfer(c->axe_xfer); + return (ENOBUFS); + } + } + } + + return (0); +} + +static void +axe_tx_list_free(struct axe_softc *sc) +{ + int i; + + /* Free TX resources. */ + for (i = 0; i < AXE_TX_LIST_CNT; i++) { + if (sc->axe_cdata.axe_tx_chain[i].axe_mbuf != NULL) { + m_freem(sc->axe_cdata.axe_tx_chain[i].axe_mbuf); + sc->axe_cdata.axe_tx_chain[i].axe_mbuf = NULL; + } + if (sc->axe_cdata.axe_tx_chain[i].axe_xfer != NULL) { + usbd_free_xfer(sc->axe_cdata.axe_tx_chain[i].axe_xfer); + sc->axe_cdata.axe_tx_chain[i].axe_xfer = NULL; + } + } } /* * A frame has been uploaded: pass the resulting mbuf chain up to * the higher level protocols. */ -Static void +static void axe_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) { struct axe_softc *sc; - struct ue_chain *c; + struct axe_chain *c = (struct axe_chain *) priv; struct mbuf *m; + u_char *buf; struct ifnet *ifp; + struct axe_sframe_hdr *hdr; int total_len = 0; + int pktlen = 0; - c = priv; - sc = c->ue_sc; + sc = c->axe_sc; AXE_LOCK(sc); ifp = sc->axe_ifp; @@ -606,7 +835,7 @@ return; } if (usbd_ratecheck(&sc->axe_rx_notice)) - printf("axe%d: usb error on rx: %s\n", sc->axe_unit, + device_printf(sc->axe_dev, "usb error on rx: %s\n", usbd_errstr(status)); if (status == USBD_STALLED) usbd_clear_endpoint_stall(sc->axe_ep[AXE_ENDPT_RX]); @@ -615,28 +844,61 @@ usbd_get_xfer_status(xfer, NULL, NULL, &total_len, NULL); - m = c->ue_mbuf; - - if (total_len < sizeof(struct ether_header)) { - ifp->if_ierrors++; - goto done; - } + buf = c->axe_buf; - ifp->if_ipackets++; - m->m_pkthdr.rcvif = (void *)&sc->axe_qdat; - m->m_pkthdr.len = m->m_len = total_len; + do { + if (sc->axe_flags & (AX178|AX772)) { + if (total_len < sizeof(struct axe_sframe_hdr)) { + ifp->if_ierrors++; + goto done; + } + if ((pktlen % 2) != 0) + pktlen++; + buf += pktlen; + + hdr = (struct axe_sframe_hdr *) buf; + total_len -= sizeof(struct axe_sframe_hdr); + if ((hdr->len ^ hdr->ilen) != 0xffff) { + ifp->if_ierrors++; + goto done; + } + pktlen = le16toh(hdr->len); + if (pktlen > total_len) { + ifp->if_ierrors++; + goto done; + } - /* Put the packet on the special USB input queue. */ - usb_ether_input(m); - AXE_UNLOCK(sc); + buf += sizeof(struct axe_sframe_hdr); + total_len -= pktlen + (pktlen % 2); + } else { + pktlen = total_len; + total_len = 0; + } - return; + if (pktlen < sizeof(struct ether_header)) { + ifp->if_ierrors++; + goto done; + } + m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + if (m == NULL) { + ifp->if_ierrors++; + goto done; + } + m->m_data += ETHER_ALIGN; + memcpy(mtod(m, void *), buf, pktlen); + m->m_pkthdr.len = m->m_len = pktlen; + m->m_pkthdr.rcvif = ifp; + + ifp->if_input(ifp, m); + ifp->if_ipackets++; + } while (total_len > 0); + /* fall thru... */ done: /* Setup new transfer. */ - usbd_setup_xfer(c->ue_xfer, sc->axe_ep[AXE_ENDPT_RX], - c, mtod(c->ue_mbuf, char *), UE_BUFSZ, USBD_SHORT_XFER_OK, + usbd_setup_xfer(xfer, sc->axe_ep[AXE_ENDPT_RX], + c, c->axe_buf, sc->axe_bufsz, USBD_SHORT_XFER_OK | USBD_NO_COPY, USBD_NO_TIMEOUT, axe_rxeof); - usbd_transfer(c->ue_xfer); + usbd_transfer(xfer); AXE_UNLOCK(sc); return; @@ -647,16 +909,16 @@ * the list buffers. */ -Static void +static void axe_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) { struct axe_softc *sc; - struct ue_chain *c; + struct axe_chain *c; struct ifnet *ifp; usbd_status err; c = priv; - sc = c->ue_sc; + sc = c->axe_sc; AXE_LOCK(sc); ifp = sc->axe_ifp; @@ -665,7 +927,7 @@ AXE_UNLOCK(sc); return; } - printf("axe%d: usb error on tx: %s\n", sc->axe_unit, + device_printf(sc->axe_dev, "usb error on tx: %s\n", usbd_errstr(status)); if (status == USBD_STALLED) usbd_clear_endpoint_stall(sc->axe_ep[AXE_ENDPT_TX]); @@ -675,12 +937,11 @@ ifp->if_timer = 0; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - usbd_get_xfer_status(c->ue_xfer, NULL, NULL, NULL, &err); + usbd_get_xfer_status(c->axe_xfer, NULL, NULL, NULL, &err); - if (c->ue_mbuf != NULL) { - c->ue_mbuf->m_pkthdr.rcvif = ifp; - usb_tx_done(c->ue_mbuf); - c->ue_mbuf = NULL; + if (c->axe_mbuf != NULL) { + m_freem(c->axe_mbuf); + c->axe_mbuf = NULL; } if (err) @@ -690,12 +951,29 @@ AXE_UNLOCK(sc); + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + axe_start(ifp); + return; } -Static void +static void axe_tick(void *xsc) { + struct axe_softc *sc = xsc; + + if (sc == NULL) + return; + if (sc->axe_dying) + return; + + /* Perform periodic stuff in process context */ + usb_add_task(sc->axe_udev, &sc->axe_tick_task); +} + +static void +axe_tick_task(void *xsc) +{ struct axe_softc *sc; struct ifnet *ifp; struct mii_data *mii; @@ -705,12 +983,14 @@ if (sc == NULL) return; + AXE_SLEEPLOCK(sc); AXE_LOCK(sc); ifp = sc->axe_ifp; mii = GET_MII(sc); if (mii == NULL) { AXE_UNLOCK(sc); + AXE_SLEEPUNLOCK(sc); return; } @@ -725,42 +1005,66 @@ sc->axe_stat_ch = timeout(axe_tick, sc, hz); AXE_UNLOCK(sc); + AXE_SLEEPUNLOCK(sc); return; } -Static int +static int axe_encap(struct axe_softc *sc, struct mbuf *m, int idx) { - struct ue_chain *c; + struct axe_chain *c; usbd_status err; + struct axe_sframe_hdr hdr; + int length; - c = &sc->axe_cdata.ue_tx_chain[idx]; + c = &sc->axe_cdata.axe_tx_chain[idx]; /* * Copy the mbuf data into a contiguous buffer, leaving two * bytes at the beginning to hold the frame length. */ - m_copydata(m, 0, m->m_pkthdr.len, c->ue_buf); - c->ue_mbuf = m; + if (sc->axe_flags & (AX178|AX772)) { + hdr.len = htole16(m->m_pkthdr.len); + hdr.ilen = ~hdr.len; + + memcpy(c->axe_buf, &hdr, sizeof(hdr)); + length = sizeof(hdr); + + m_copydata(m, 0, m->m_pkthdr.len, c->axe_buf + length); + length += m->m_pkthdr.len; + + if ((length % sc->axe_boundary) == 0) { + hdr.len = 0; + hdr.ilen = 0xffff; + memcpy(c->axe_buf + length, &hdr, sizeof(hdr)); + length += sizeof(hdr); + } + } else { + m_copydata(m, 0, m->m_pkthdr.len, c->axe_buf); + length = m->m_pkthdr.len; + } + c->axe_mbuf = m; - usbd_setup_xfer(c->ue_xfer, sc->axe_ep[AXE_ENDPT_TX], - c, c->ue_buf, m->m_pkthdr.len, USBD_FORCE_SHORT_XFER, - 10000, axe_txeof); + usbd_setup_xfer(c->axe_xfer, sc->axe_ep[AXE_ENDPT_TX], + c, c->axe_buf, length, USBD_FORCE_SHORT_XFER, 10000, axe_txeof); /* Transmit */ - err = usbd_transfer(c->ue_xfer); + err = usbd_transfer(c->axe_xfer); if (err != USBD_IN_PROGRESS) { + /* XXX probably don't want to sleep here */ + AXE_SLEEPLOCK(sc); axe_stop(sc); + AXE_SLEEPUNLOCK(sc); return(EIO); } - sc->axe_cdata.ue_tx_cnt++; + sc->axe_cdata.axe_tx_cnt++; return(0); } -Static void +static void axe_start(struct ifnet *ifp) { struct axe_softc *sc; @@ -809,12 +1113,12 @@ return; } -Static void +static void axe_init(void *xsc) { struct axe_softc *sc = xsc; struct ifnet *ifp = sc->axe_ifp; - struct ue_chain *c; + struct axe_chain *c; usbd_status err; int i; int rxmode; @@ -822,6 +1126,7 @@ if (ifp->if_drv_flags & IFF_DRV_RUNNING) return; + AXE_SLEEPLOCK(sc); AXE_LOCK(sc); /* @@ -832,34 +1137,44 @@ #ifdef notdef /* Set MAC address */ - axe_mac(sc, IFP2ENADDR(sc->axe_ifp), 1); + axe_mac(sc, IF_LLADDR(sc->axe_ifp), 1); #endif /* Enable RX logic. */ /* Init TX ring. */ - if (usb_ether_tx_list_init(sc, &sc->axe_cdata, - sc->axe_udev) == ENOBUFS) { - printf("axe%d: tx list init failed\n", sc->axe_unit); + if (axe_tx_list_init(sc) == ENOBUFS) { + device_printf(sc->axe_dev, "tx list init failed\n"); AXE_UNLOCK(sc); + AXE_SLEEPUNLOCK(sc); return; } /* Init RX ring. */ - if (usb_ether_rx_list_init(sc, &sc->axe_cdata, - sc->axe_udev) == ENOBUFS) { - printf("axe%d: rx list init failed\n", sc->axe_unit); + if (axe_rx_list_init(sc) == ENOBUFS) { + device_printf(sc->axe_dev, "rx list init failed\n"); AXE_UNLOCK(sc); + AXE_SLEEPUNLOCK(sc); return; } /* Set transmitter IPG values */ - axe_cmd(sc, AXE_CMD_WRITE_IPG0, 0, sc->axe_ipgs[0], NULL); - axe_cmd(sc, AXE_CMD_WRITE_IPG1, 0, sc->axe_ipgs[1], NULL); - axe_cmd(sc, AXE_CMD_WRITE_IPG2, 0, sc->axe_ipgs[2], NULL); + if (sc->axe_flags & (AX178|AX772)) { + axe_cmd(sc, AXE_178_CMD_WRITE_IPG012, sc->axe_ipgs[2], + (sc->axe_ipgs[1]<<8) | sc->axe_ipgs[0], NULL); + } else { + axe_cmd(sc, AXE_172_CMD_WRITE_IPG0, 0, sc->axe_ipgs[0], NULL); + axe_cmd(sc, AXE_172_CMD_WRITE_IPG1, 0, sc->axe_ipgs[1], NULL); + axe_cmd(sc, AXE_172_CMD_WRITE_IPG2, 0, sc->axe_ipgs[2], NULL); + } /* Enable receiver, set RX mode */ - rxmode = AXE_RXCMD_UNICAST|AXE_RXCMD_MULTICAST|AXE_RXCMD_ENABLE; + rxmode = AXE_RXCMD_MULTICAST|AXE_RXCMD_ENABLE; + if (sc->axe_flags & (AX178|AX772)) { + if (sc->axe_bufsz == AXE_178_MAX_BUFSZ) + rxmode |= AXE_178_RXCMD_MFB; + } else + rxmode |= AXE_172_RXCMD_UNICAST; /* If we want promiscuous mode, set the allframes bit. */ if (ifp->if_flags & IFF_PROMISC) @@ -877,41 +1192,45 @@ err = usbd_open_pipe(sc->axe_iface, sc->axe_ed[AXE_ENDPT_RX], USBD_EXCLUSIVE_USE, &sc->axe_ep[AXE_ENDPT_RX]); if (err) { - printf("axe%d: open rx pipe failed: %s\n", - sc->axe_unit, usbd_errstr(err)); + device_printf(sc->axe_dev, "open rx pipe failed: %s\n", + usbd_errstr(err)); AXE_UNLOCK(sc); + AXE_SLEEPUNLOCK(sc); return; } err = usbd_open_pipe(sc->axe_iface, sc->axe_ed[AXE_ENDPT_TX], USBD_EXCLUSIVE_USE, &sc->axe_ep[AXE_ENDPT_TX]); if (err) { - printf("axe%d: open tx pipe failed: %s\n", - sc->axe_unit, usbd_errstr(err)); + device_printf(sc->axe_dev, "open tx pipe failed: %s\n", + usbd_errstr(err)); AXE_UNLOCK(sc); + AXE_SLEEPUNLOCK(sc); return; } /* Start up the receive pipe. */ - for (i = 0; i < UE_RX_LIST_CNT; i++) { - c = &sc->axe_cdata.ue_rx_chain[i]; - usbd_setup_xfer(c->ue_xfer, sc->axe_ep[AXE_ENDPT_RX], - c, mtod(c->ue_mbuf, char *), UE_BUFSZ, - USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT, axe_rxeof); - usbd_transfer(c->ue_xfer); + for (i = 0; i < AXE_RX_LIST_CNT; i++) { + c = &sc->axe_cdata.axe_rx_chain[i]; + usbd_setup_xfer(c->axe_xfer, sc->axe_ep[AXE_ENDPT_RX], + c, c->axe_buf, sc->axe_bufsz, + USBD_SHORT_XFER_OK | USBD_NO_COPY, + USBD_NO_TIMEOUT, axe_rxeof); + usbd_transfer(c->axe_xfer); } ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; AXE_UNLOCK(sc); + AXE_SLEEPUNLOCK(sc); sc->axe_stat_ch = timeout(axe_tick, sc, hz); return; } -Static int +static int axe_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct axe_softc *sc = ifp->if_softc; @@ -926,6 +1245,7 @@ if (ifp->if_drv_flags & IFF_DRV_RUNNING && ifp->if_flags & IFF_PROMISC && !(sc->axe_if_flags & IFF_PROMISC)) { + AXE_SLEEPLOCK(sc); AXE_LOCK(sc); axe_cmd(sc, AXE_CMD_RXCTL_READ, 0, 0, (void *)&rxmode); @@ -934,9 +1254,11 @@ 0, rxmode, NULL); AXE_UNLOCK(sc); axe_setmulti(sc); + AXE_SLEEPUNLOCK(sc); } else if (ifp->if_drv_flags & IFF_DRV_RUNNING && !(ifp->if_flags & IFF_PROMISC) && sc->axe_if_flags & IFF_PROMISC) { + AXE_SLEEPLOCK(sc); AXE_LOCK(sc); axe_cmd(sc, AXE_CMD_RXCTL_READ, 0, 0, (void *)&rxmode); @@ -945,24 +1267,32 @@ 0, rxmode, NULL); AXE_UNLOCK(sc); axe_setmulti(sc); + AXE_SLEEPUNLOCK(sc); } else if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) axe_init(sc); } else { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + AXE_SLEEPLOCK(sc); axe_stop(sc); + AXE_SLEEPUNLOCK(sc); + } } sc->axe_if_flags = ifp->if_flags; error = 0; break; case SIOCADDMULTI: case SIOCDELMULTI: + AXE_SLEEPLOCK(sc); axe_setmulti(sc); + AXE_SLEEPUNLOCK(sc); error = 0; break; case SIOCGIFMEDIA: case SIOCSIFMEDIA: + AXE_SLEEPLOCK(sc); mii = GET_MII(sc); error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command); + AXE_SLEEPUNLOCK(sc); break; default: @@ -970,27 +1300,25 @@ break; } - AXE_UNLOCK(sc); - return(error); } -Static void +static void axe_watchdog(struct ifnet *ifp) { struct axe_softc *sc; - struct ue_chain *c; + struct axe_chain *c; usbd_status stat; sc = ifp->if_softc; AXE_LOCK(sc); ifp->if_oerrors++; - printf("axe%d: watchdog timeout\n", sc->axe_unit); + device_printf(sc->axe_dev, "watchdog timeout\n"); - c = &sc->axe_cdata.ue_tx_chain[0]; - usbd_get_xfer_status(c->ue_xfer, NULL, NULL, NULL, &stat); - axe_txeof(c->ue_xfer, c, stat); + c = &sc->axe_cdata.axe_tx_chain[0]; + usbd_get_xfer_status(c->axe_xfer, NULL, NULL, NULL, &stat); + axe_txeof(c->axe_xfer, c, stat); AXE_UNLOCK(sc); @@ -1004,12 +1332,13 @@ * Stop the adapter and free any mbufs allocated to the * RX and TX lists. */ -Static void +static void axe_stop(struct axe_softc *sc) { usbd_status err; struct ifnet *ifp; + AXE_SLEEPLOCKASSERT(sc); AXE_LOCK(sc); ifp = sc->axe_ifp; @@ -1021,13 +1350,13 @@ if (sc->axe_ep[AXE_ENDPT_RX] != NULL) { err = usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_RX]); if (err) { - printf("axe%d: abort rx pipe failed: %s\n", - sc->axe_unit, usbd_errstr(err)); + device_printf(sc->axe_dev, "abort rx pipe failed: %s\n", + usbd_errstr(err)); } err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_RX]); if (err) { - printf("axe%d: close rx pipe failed: %s\n", - sc->axe_unit, usbd_errstr(err)); + device_printf(sc->axe_dev, "close rx pipe failed: %s\n", + usbd_errstr(err)); } sc->axe_ep[AXE_ENDPT_RX] = NULL; } @@ -1035,13 +1364,13 @@ if (sc->axe_ep[AXE_ENDPT_TX] != NULL) { err = usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_TX]); if (err) { - printf("axe%d: abort tx pipe failed: %s\n", - sc->axe_unit, usbd_errstr(err)); + device_printf(sc->axe_dev, "abort tx pipe failed: %s\n", + usbd_errstr(err)); } err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_TX]); if (err) { - printf("axe%d: close tx pipe failed: %s\n", - sc->axe_unit, usbd_errstr(err)); + device_printf(sc->axe_dev, "close tx pipe failed: %s\n", + usbd_errstr(err)); } sc->axe_ep[AXE_ENDPT_TX] = NULL; } @@ -1049,13 +1378,13 @@ if (sc->axe_ep[AXE_ENDPT_INTR] != NULL) { err = usbd_abort_pipe(sc->axe_ep[AXE_ENDPT_INTR]); if (err) { - printf("axe%d: abort intr pipe failed: %s\n", - sc->axe_unit, usbd_errstr(err)); + device_printf(sc->axe_dev, + "abort intr pipe failed: %s\n", usbd_errstr(err)); } err = usbd_close_pipe(sc->axe_ep[AXE_ENDPT_INTR]); if (err) { - printf("axe%d: close intr pipe failed: %s\n", - sc->axe_unit, usbd_errstr(err)); + device_printf(sc->axe_dev, + "close intr pipe failed: %s\n", usbd_errstr(err)); } sc->axe_ep[AXE_ENDPT_INTR] = NULL; } @@ -1063,9 +1392,9 @@ axe_reset(sc); /* Free RX resources. */ - usb_ether_rx_list_free(&sc->axe_cdata); + axe_rx_list_free(sc); /* Free TX resources. */ - usb_ether_tx_list_free(&sc->axe_cdata); + axe_tx_list_free(sc); ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); sc->axe_link = 0; @@ -1078,14 +1407,16 @@ * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -Static void -axe_shutdown(device_ptr_t dev) +static int +axe_shutdown(device_t dev) { struct axe_softc *sc; sc = device_get_softc(dev); + AXE_SLEEPLOCK(sc); axe_stop(sc); + AXE_SLEEPUNLOCK(sc); - return; + return (0); } --- dev/usb/if_axereg.h.orig 2008-01-18 18:04:21.000000000 +0000 +++ dev/usb/if_axereg.h 2008-01-18 18:04:36.000000000 +0000 @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/usb/if_axereg.h,v 1.8.2.1 2007/05/21 18:10:48 brueffer Exp $ + * $FreeBSD: src/sys/dev/usb/if_axereg.h,v 1.17 2007/11/10 16:23:38 sam Exp $ */ /* @@ -53,9 +53,11 @@ #define AXE_CMD_LEN(x) (((x) & 0xF000) >> 12) #define AXE_CMD_CMD(x) ((x) & 0x00FF) -#define AXE_CMD_READ_RXTX_SRAM 0x2002 -#define AXE_CMD_WRITE_RX_SRAM 0x0103 -#define AXE_CMD_WRITE_TX_SRAM 0x0104 +#define AXE_172_CMD_READ_RXTX_SRAM 0x2002 +#define AXE_182_CMD_READ_RXTX_SRAM 0x8002 +#define AXE_172_CMD_WRITE_RX_SRAM 0x0103 +#define AXE_172_CMD_WRITE_TX_SRAM 0x0104 +#define AXE_182_CMD_WRITE_RXTX_SRAM 0x8103 #define AXE_CMD_MII_OPMODE_SW 0x0106 #define AXE_CMD_MII_READ_REG 0x2007 #define AXE_CMD_MII_WRITE_REG 0x2108 @@ -68,35 +70,115 @@ #define AXE_CMD_RXCTL_READ 0x200F #define AXE_CMD_RXCTL_WRITE 0x0110 #define AXE_CMD_READ_IPG012 0x3011 -#define AXE_CMD_WRITE_IPG0 0x0112 -#define AXE_CMD_WRITE_IPG1 0x0113 -#define AXE_CMD_WRITE_IPG2 0x0114 +#define AXE_172_CMD_WRITE_IPG0 0x0112 +#define AXE_172_CMD_WRITE_IPG1 0x0113 +#define AXE_172_CMD_WRITE_IPG2 0x0114 +#define AXE_178_CMD_WRITE_IPG012 0x0112 #define AXE_CMD_READ_MCAST 0x8015 #define AXE_CMD_WRITE_MCAST 0x8116 -#define AXE_CMD_READ_NODEID 0x6017 -#define AXE_CMD_WRITE_NODEID 0x6118 +#define AXE_172_CMD_READ_NODEID 0x6017 +#define AXE_172_CMD_WRITE_NODEID 0x6118 +#define AXE_178_CMD_READ_NODEID 0x6013 +#define AXE_178_CMD_WRITE_NODEID 0x6114 #define AXE_CMD_READ_PHYID 0x2019 -#define AXE_CMD_READ_MEDIA 0x101A +#define AXE_172_CMD_READ_MEDIA 0x101A +#define AXE_178_CMD_READ_MEDIA 0x201A #define AXE_CMD_WRITE_MEDIA 0x011B #define AXE_CMD_READ_MONITOR_MODE 0x101C #define AXE_CMD_WRITE_MONITOR_MODE 0x011D #define AXE_CMD_READ_GPIO 0x101E #define AXE_CMD_WRITE_GPIO 0x011F +#define AXE_CMD_SW_RESET_REG 0x0120 +#define AXE_CMD_SW_PHY_STATUS 0x0021 +#define AXE_CMD_SW_PHY_SELECT 0x0122 + +#define AXE_SW_RESET_CLEAR 0x00 +#define AXE_SW_RESET_RR 0x01 +#define AXE_SW_RESET_RT 0x02 +#define AXE_SW_RESET_PRTE 0x04 +#define AXE_SW_RESET_PRL 0x08 +#define AXE_SW_RESET_BZ 0x10 +#define AXE_SW_RESET_IPRL 0x20 +#define AXE_SW_RESET_IPPD 0x40 + +/* AX88178 documentation says to always write this bit... */ +#define AXE_178_RESET_MAGIC 0x40 + +#define AXE_178_MEDIA_GMII 0x0001 +#define AXE_MEDIA_FULL_DUPLEX 0x0002 +#define AXE_172_MEDIA_TX_ABORT_ALLOW 0x0004 +/* AX88178/88772 documentation says to always write 1 to bit 2 */ +#define AXE_178_MEDIA_MAGIC 0x0004 +/* AX88772 documentation says to always write 0 to bit 3 */ +#define AXE_178_MEDIA_ENCK 0x0008 +#define AXE_172_MEDIA_FLOW_CONTROL_EN 0x0010 +#define AXE_178_MEDIA_RXFLOW_CONTROL_EN 0x0010 +#define AXE_178_MEDIA_TXFLOW_CONTROL_EN 0x0020 +#define AXE_178_MEDIA_JUMBO_EN 0x0040 +#define AXE_178_MEDIA_LTPF_ONLY 0x0080 +#define AXE_178_MEDIA_RX_EN 0x0100 +#define AXE_178_MEDIA_100TX 0x0200 +#define AXE_178_MEDIA_SBP 0x0800 +#define AXE_178_MEDIA_SUPERMAC 0x1000 #define AXE_RXCMD_PROMISC 0x0001 #define AXE_RXCMD_ALLMULTI 0x0002 -#define AXE_RXCMD_UNICAST 0x0004 +#define AXE_172_RXCMD_UNICAST 0x0004 +#define AXE_178_RXCMD_KEEP_INVALID_CRC 0x0004 #define AXE_RXCMD_BROADCAST 0x0008 #define AXE_RXCMD_MULTICAST 0x0010 +#define AXE_178_RXCMD_AP 0x0020 #define AXE_RXCMD_ENABLE 0x0080 +#define AXE_178_RXCMD_MFB_2048 0x0000 /* 2K max frame burst */ +#define AXE_178_RXCMD_MFB_4096 0x0100 /* 4K max frame burst */ +#define AXE_178_RXCMD_MFB_8192 0x0200 /* 8K max frame burst */ +#define AXE_178_RXCMD_MFB_16384 0x0300 /* 16K max frame burst*/ #define AXE_NOPHY 0xE0 +#define AXE_INTPHY 0x10 #define AXE_TIMEOUT 1000 +#define AXE_172_BUFSZ 1536 +#define AXE_178_MIN_BUFSZ 2048 #define AXE_MIN_FRAMELEN 60 #define AXE_RX_FRAMES 1 #define AXE_TX_FRAMES 1 +#if AXE_178_MAX_FRAME_BURST == 0 +#define AXE_178_RXCMD_MFB AXE_178_RXCMD_MFB_2048 +#define AXE_178_MAX_BUFSZ 2048 +#elif AXE_178_MAX_FRAME_BURST == 1 +#define AXE_178_RXCMD_MFB AXE_178_RXCMD_MFB_4096 +#define AXE_178_MAX_BUFSZ 4096 +#elif AXE_178_MAX_FRAME_BURST == 2 +#define AXE_178_RXCMD_MFB AXE_178_RXCMD_MFB_8192 +#define AXE_178_MAX_BUFSZ 8192 +#else +#define AXE_178_RXCMD_MFB AXE_178_RXCMD_MFB_16384 +#define AXE_178_MAX_BUFSZ 16384 +#endif + +#define AXE_RX_LIST_CNT 1 +#define AXE_TX_LIST_CNT 1 + +struct axe_chain { + struct axe_softc *axe_sc; + usbd_xfer_handle axe_xfer; + char *axe_buf; + struct mbuf *axe_mbuf; + int axe_accum; + int axe_idx; +}; + +struct axe_cdata { + struct axe_chain axe_tx_chain[AXE_TX_LIST_CNT]; + struct axe_chain axe_rx_chain[AXE_RX_LIST_CNT]; + int axe_tx_prod; + int axe_tx_cons; + int axe_tx_cnt; + int axe_rx_prod; +}; + #define AXE_CTL_READ 0x01 #define AXE_CTL_WRITE 0x02 @@ -112,9 +194,17 @@ #define AXE_ENDPT_INTR 0x2 #define AXE_ENDPT_MAX 0x3 +struct axe_sframe_hdr { + uint16_t len; + uint16_t ilen; +} __packed; + struct axe_type { - u_int16_t axe_vid; - u_int16_t axe_did; + struct usb_devno axe_dev; + uint32_t axe_flags; +#define AX172 0x0000 /* AX88172 */ +#define AX178 0x0001 /* AX88178 */ +#define AX772 0x0002 /* AX88772 */ }; #define AXE_INC(x, y) (x) = (x + 1) % y @@ -132,19 +222,24 @@ device_t axe_dev; usbd_device_handle axe_udev; usbd_interface_handle axe_iface; + u_int16_t axe_vendor; + u_int16_t axe_product; + u_int16_t axe_flags; int axe_ed[AXE_ENDPT_MAX]; usbd_pipe_handle axe_ep[AXE_ENDPT_MAX]; - int axe_unit; int axe_if_flags; - struct ue_cdata axe_cdata; + struct axe_cdata axe_cdata; struct callout_handle axe_stat_ch; struct mtx axe_mtx; + struct sx axe_sleeplock; char axe_dying; int axe_link; unsigned char axe_ipgs[3]; unsigned char axe_phyaddrs[2]; struct timeval axe_rx_notice; - struct usb_qdat axe_qdat; + struct usb_task axe_tick_task; + int axe_bufsz; + int axe_boundary; }; #if 0 @@ -154,3 +249,6 @@ #define AXE_LOCK(_sc) #define AXE_UNLOCK(_sc) #endif +#define AXE_SLEEPLOCK(_sc) sx_xlock(&(_sc)->axe_sleeplock) +#define AXE_SLEEPUNLOCK(_sc) sx_xunlock(&(_sc)->axe_sleeplock) +#define AXE_SLEEPLOCKASSERT(_sc) sx_assert(&(_sc)->axe_sleeplock, SX_XLOCKED) --- dev/usb/usbdevs.orig 2008-01-18 18:04:29.000000000 +0000 +++ dev/usb/usbdevs 2008-01-18 18:14:44.000000000 +0000 @@ -481,6 +481,7 @@ vendor ACDC 0x0d7e ACDC vendor ABC 0x0d8c ABC vendor MSI 0x0db0 Micro Star International +vendor SITECOMEU 0x0df6 Sitecom Europe vendor HAWKING 0x0e66 Hawking vendor GMATE 0x0e7e G.Mate, Inc vendor OTI 0x0ea0 Ours @@ -518,16 +519,20 @@ vendor RALINK 0x148f Ralink Technology vendor IMAGINATION 0x149a Imagination Technologies vendor CONCEPTRONIC 0x14b2 Conceptronic +vendor PLANEX3 0x14ea Planex Communications vendor SILICONPORTALS 0x1527 Silicon Portals vendor UBIQUAM 0x1529 UBIQUAM Co., Ltd. vendor PNY 0x154b PNY +vendor OQO 0x1557 OQO vendor SOHOWARE 0x15e8 SOHOware vendor UMAX 0x1606 UMAX vendor INSIDEOUT 0x1608 Inside Out Networks +vendor GOODWAY 0x1631 Good Way Technology vendor ENTREGA 0x1645 Entrega vendor ACTIONTEC 0x1668 Actiontec vendor ANYDATA 0x16d5 AnyData Corporation vendor CMOTECH 0x16d8 CMOTECH CO., LTD. +vendor LINKSYS5 0x1737 Linksys vendor LINKSYS3 0x1915 Linksys vendor DLINK 0x2001 D-Link vendor ERICSSON 0x2282 Ericsson @@ -584,6 +589,7 @@ product ABOCOM XX7 0x400c XX7 product ABOCOM XX8 0x4102 XX8 product ABOCOM XX9 0x4104 XX9 +product ABOCOM UF200 0x420a UF200 Ethernet product ABOCOM XX10 0xabc1 XX10 /* Accton products */ @@ -593,6 +599,9 @@ /* Aceeca products */ product ACEECA MEZ1000 0x0001 Aceeca Mez1000 RDA +/* Acer Communications & Multimedia (oemd by Surecom) */ +product ACERCM EP1427X2 0x0893 EP-1427X-2 Ethernet Adapter + /* Acer Peripherals, Inc. products */ product ACERP ACERSCAN_C310U 0x12a6 Acerscan C310U product ACERP ACERSCAN_320U 0x2022 Acerscan 320U @@ -694,6 +703,8 @@ /* ASIX Electronics products */ product ASIX AX88172 0x1720 10/100 ethernet +product ASIX AX88178 0x1780 AX88178 +product ASIX AX88772 0x7720 AX88772 /* ASUS products */ product ASUS WL167G 0x1707 WL-167g wireless adapter @@ -701,6 +712,8 @@ /* ATen products */ product ATEN UC1284 0x2001 Parallel printer product ATEN UC10T 0x2002 10Mbps ethernet +product ATEN UC110T 0x2007 UC-110T Ethernet +product ATEN UC210T 0x2009 UC-210T Ethernet product ATEN UC232A 0x2008 Serial /* Atmel Comp. products */ @@ -726,6 +739,7 @@ product BELKIN F5U409 0x0409 F5U409 Serial product BELKIN F6C550AVR 0x0551 F6C550-AVR UPS product BELKIN F5U120 0x1203 F5U120-PC Hub +product BELKIN F5D5055 0x5055 F5D5055 product BELKIN F5D7050 0x7050 F5D7050 wireless adapter /* Billionton products */ @@ -733,6 +747,7 @@ product BILLIONTON USBLP100 0x0987 USB100LP product BILLIONTON USBEL100 0x0988 USB100EL product BILLIONTON USBE100 0x8511 USBE100 +product BILLIONTON USB2AR 0x90ff USB2AR Ethernet /* Broadcom products */ product BROADCOM BCM2033 0x2033 BCM2033 Bluetooth USB dongle @@ -790,6 +805,7 @@ product COREGA ETHER_USB_T 0x0001 Ether USB-T product COREGA FETHER_USB_TX 0x0004 FEther USB-TX product COREGA FETHER_USB_TXS 0x000d FEther USB-TXS +product COREGA FETHER_USB2_TX 0x0017 FEther USB2-TX product COREGA FETHER_USB_TXC 0x9601 FEther USB-TXC /* Creative products */ @@ -850,6 +866,7 @@ product DLINK DUBE100 0x1a00 10/100 ethernet product DLINK DSB650TX4 0x200c 10/100 ethernet product DLINK DWLG122 0x3c00 DWL-G122 b1 wireless adapter +product DLINK DUBE100B1 0x3c05 DUB-E100 rev B1 product DLINK DSB650C 0x4000 10Mbps ethernet product DLINK DSB650TX1 0x4001 10/100 ethernet product DLINK DSB650TX 0x4002 10/100 ethernet @@ -931,6 +948,9 @@ /* GoHubs products */ product GOHUBS GOCOM232 0x1001 GoCOM232 Serial +/* Good Way Technology products */ +product GOODWAY GWUSB2E 0x6200 GWUSB2E + /* Gravis products */ product GRAVIS GAMEPADPRO 0x4001 GamePad Pro @@ -1078,6 +1098,7 @@ product IODATA USBETT 0x0901 USB ETT product IODATA USBETTX 0x0904 USB ETTX product IODATA USBETTXS 0x0913 USB ETTX +product IODATA ETGUS2 0x0930 ETG-US2 product IODATA USBRSAQ 0x0a03 Serial USB-RSAQ1 /* Iomega products */ @@ -1184,7 +1205,10 @@ product LINKSYS3 WUSB11v28 0x2233 WUSB11 v2.8 wireless adapter product LINKSYS4 WUSB54G 0x000d WUSB54G wireless adapter product LINKSYS4 WUSB54GP 0x0011 WUSB54GP wireless adapter +product LINKSYS4 USB200MV2 0x0018 USB200M v2 product LINKSYS4 HU200TS 0x001a HU200TS wireless adapter +product LINKSYS5 USB1000 0x0039 USB1000 + /* Logitech products */ product LOGITECH M2452 0x0203 M2452 keyboard @@ -1370,6 +1394,9 @@ /* OnSpec Electronic, Inc. */ product ONSPEC UCF100 0xa400 FlashLink UCF-100 CompactFlash Reader +/* OQO */ +product OQO ETHER01PLUS 0x7720 model 01+ Ethernet + /* Palm Computing, Inc. product */ product PALM SERIAL 0x0080 USB Serial product PALM M500 0x0001 Palm m500 @@ -1412,6 +1439,9 @@ /* P.I. Engineering products */ product PIENGINEERING PS2USB 0x020b PS2 to Mac USB Adapter +/* Planex Communications products */ +product PLANEX3 GU1000T 0xab11 GU-1000T + /* Plextor Corp. */ product PLEXTOR 40_12_40U 0x0011 PlexWriter 40/12/40U @@ -1561,6 +1591,9 @@ product SITECOM LN029 0x182d USB 2.0 Ethernet product SITECOM SERIAL 0x2068 USB to serial cable (v2) +/* Sitecom Europe products */ +product SITECOMEU LN028 0x061c LN-028 + /* SmartBridges products */ product SMARTBRIDGES SMARTLINK 0x0001 SmartLink USB ethernet product SMARTBRIDGES SMARTNIC 0x0003 smartNIC 2 PnP ethernet --------------010506070101090909000909-- From owner-freebsd-usb@FreeBSD.ORG Fri Jan 18 16:58:10 2008 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 722FE16A417 for ; Fri, 18 Jan 2008 16:58:10 +0000 (UTC) (envelope-from gonzo@pbxpress.com) Received: from bugor.portaone.com (bugor.portaone.com [65.61.203.147]) by mx1.freebsd.org (Postfix) with ESMTP id 422B713C457 for ; Fri, 18 Jan 2008 16:58:10 +0000 (UTC) (envelope-from gonzo@pbxpress.com) Received: from mail.pbxpress.com ([65.61.203.142] helo=leaf.pbxpress.com) by bugor.portaone.com (8.11.3/8.11.3) with ESMTP (TLSv1:AES256-SHA:256)id 1JFuEE-0002nL-MF for freebsd-usb@freebsd.org; Fri, 18 Jan 2008 08:38:02 -0800 Received: from jeeves.bluezbox.com (k3-gw.portaone.com [193.28.87.193]) (authenticated bits=0) by leaf.pbxpress.com (8.13.3/8.13.3) with ESMTP id m0IGbuOn029776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 18 Jan 2008 08:38:02 -0800 (PST) (envelope-from gonzo@pbxpress.com) Message-ID: <4790D5E3.40008@pbxpress.com> Date: Fri, 18 Jan 2008 18:37:55 +0200 From: Oleksandr Tymoshenko User-Agent: Thunderbird 2.0.0.6 (X11/20070907) MIME-Version: 1.0 To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, recieved from trusted server Subject: Call for testers: AXE88x78 support for RELENG_6 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, 18 Jan 2008 16:58:10 -0000 Hello everybody. I backported if_axe support of AXE88x78 chips from FreeBSD 7/CURRENT (patch atached). It was tested only with Linksys USB200M and seems to work fine, but I'd like to be sure this is not coincidence before sending PR. So, if anybody has AXE88x78-based USB Ethernet adapters, I'd be grateful for some feedback. Thanks in advance. -- Sincerely, Oleksandr Tymoshenko PBXpress Communications, Inc. http://www.pbxpress.com Tel./Fax.: +1 866 SIP PBX1 Ext. 7117 From owner-freebsd-usb@FreeBSD.ORG Sat Jan 19 18:05:04 2008 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 BE64316A46B for ; Sat, 19 Jan 2008 18:05:04 +0000 (UTC) (envelope-from aldenpease963@peaseenterprises.com) Received: from outbound-mail-116.bluehost.com (outbound-mail-116.bluehost.com [69.89.22.16]) by mx1.freebsd.org (Postfix) with SMTP id AD0D113C469 for ; Sat, 19 Jan 2008 18:05:04 +0000 (UTC) (envelope-from aldenpease963@peaseenterprises.com) Received: (qmail 29923 invoked by uid 0); 19 Jan 2008 17:38:24 -0000 Received: from unknown (HELO host125.hostmonster.com) (74.220.207.125) by xmail.bluehost.com with SMTP; 19 Jan 2008 17:38:24 -0000 Received: from d233090.tidewater.net ([12.148.233.90] helo=custom) by host125.hostmonster.com with esmtpa (Exim 4.68) (envelope-from ) id 1JGHeC-0001wc-9q for freebsd-usb@freebsd.org; Sat, 19 Jan 2008 10:38:24 -0700 Message-ID: <000601c85ac2$179fc100$0502a8c0@custom> From: "Alden Pease" To: Date: Sat, 19 Jan 2008 12:38:22 -0500 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Identified-User: {727:host125.hostmonster.com:peaseent:peaseenterprises.com} {sentby:smtp auth 12.148.233.90 authed with aldenpease963@peaseenterprises.com} Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: uhub2 port 5 reset failed help 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, 19 Jan 2008 18:05:04 -0000 Hi, I am using FreeBSD 6.2 i386. When I first got FreeBSD installed on = this computer is worked perfectly until a few days ago I got, "usb2: = port reset timedout; uhub2: port 5 reset failed". The only way I can = get it to start up without rebooting is to start it up in safe mode. = Any one have a fix? Also, I have a AMD Sempron Processor and not a i386 = Processor (Intel). Could that be the problem? I have also disabled all = usb drives in the bios, and all ports I don't use. I have just begun = downloading FreeBSD AMD64. Thanks for your help. From owner-freebsd-usb@FreeBSD.ORG Sat Jan 19 21:24:48 2008 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 7826C16A419 for ; Sat, 19 Jan 2008 21:24:48 +0000 (UTC) (envelope-from dorian.buettner@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id DE48813C45A for ; Sat, 19 Jan 2008 21:24:47 +0000 (UTC) (envelope-from dorian.buettner@gmx.de) Received: (qmail invoked by alias); 19 Jan 2008 20:58:06 -0000 Received: from port-83-236-54-40.dynamic.qsc.de (EHLO zock.doris.net) [83.236.54.40] by mail.gmx.net (mp026) with SMTP; 19 Jan 2008 21:58:06 +0100 X-Authenticated: #1682771 X-Provags-ID: V01U2FsdGVkX18gDdspVSYgxRXJkMA0wYFr03jlZ+HaC5yTbbsBrb DVEx0LVv437wGw From: Dorian =?iso-8859-1?q?B=FCttner?= To: freebsd-usb@freebsd.org Date: Sat, 19 Jan 2008 21:58:05 +0100 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801192158.06129.dorian.buettner@gmx.de> X-Y-GMX-Trusted: 0 Subject: kernel panics with Logitech G15 Keyboard on boot 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, 19 Jan 2008 21:24:48 -0000 Hi, I'm running 7.0_Prerelease/amd64. However, with the Logitech G15-Keyboard attached during boot, the kernel panics with "panic: ohci_add_done: addr 0x7fef16d0 not found" I believe this propably has something to do with the keyboard's integrated hub? This does only appear with the onboard usb connectors on the rear of the machine, the wired port at the front of the box does not lead to that panic. Any advice how to proceed? Thanks, Dorian