From owner-freebsd-usb@FreeBSD.ORG Fri Dec 1 19:43:24 2006 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 139E316A50E; Fri, 1 Dec 2006 19:43:24 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13D8543CA7; Fri, 1 Dec 2006 19:43:08 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id ADF181A4D9B; Fri, 1 Dec 2006 11:43:23 -0800 (PST) Date: Fri, 1 Dec 2006 11:43:23 -0800 From: Alfred Perlstein To: "M. Warner Losh" Message-ID: <20061201194323.GT38808@elvis.mu.org> References: <20061201191731.GR38808@elvis.mu.org> <20061201.122433.-749245269.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061201.122433.-749245269.imp@bsdimp.com> User-Agent: Mutt/1.4.2.2i Cc: freebsd-smp@freebsd.org, freebsd-usb@freebsd.org Subject: Re: RFC: Fixing USB ethernet for FreeBSD 7.0. 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, 01 Dec 2006 19:43:24 -0000 * M. Warner Losh [061201 11:30] wrote: > Have you looked at the usb work that Hans Petter Selasky > at http://www.turbocat.net/~hselasky/usb4bsd yet? I just did, while it solves a lock order problem, this doesn't appear to solve the programmitic issues, namely multiple usb IOs requiring callbacks and how to issue a series of complex usb IOs from interrupt context. Basically, I need to be able to do USB IO as if I was doing normal BUS IO, usb does not offer this in interrupt context except as a series of callbacks that appear to be programmatically impossible to implement. Have a look at if_aue.c, then look at any of the error cases that might be called from interrupt context, they wind up doing sync IO to the device which is illegal (sleeping while holding a driver lock). Hans Petter Selasky's work is nice, however it doesn't solve these issues, the lock would still have to be held. Do you understand that I'm trying to give usb ethernet the same ease of programming that other devices on a "fast bus" have? -- - Alfred Perlstein, RED Incorporated Consulting. - coder / sysadmin / FreeBSD Hacker / All that jazz -