From owner-freebsd-current@FreeBSD.ORG Sun Aug 8 04:13:44 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 575E416A4CF for ; Sun, 8 Aug 2004 04:13:44 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7AA9B43D5A for ; Sun, 8 Aug 2004 04:13:43 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i784AuFV041366; Sat, 7 Aug 2004 22:10:56 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 07 Aug 2004 22:10:55 -0600 (MDT) Message-Id: <20040807.221055.107701749.imp@bsdimp.com> To: chris@tellme3times.com From: "M. Warner Losh" In-Reply-To: <4115A736.9000705@tellme3times.com> References: <000001c47cb8$8ef1bb50$142a15ac@spud> <4115A736.9000705@tellme3times.com> 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: dmp@bitfreak.org cc: freebsd-current@freebsd.org Subject: Re: USB drivers X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Aug 2004 04:13:44 -0000 In message: <4115A736.9000705@tellme3times.com> Chris writes: : Darren Pilgrim wrote: : : >>From: M. Warner Losh : >> : >>In message: <41124C8B.2060902@tellme3times.com> : >> Chris writes: : >>: : >>: What I am trying to determine is why my multifunction : >> : >> : >printer/scanner : > : > : >>: receives only one of the two drivers. Is it because the printer : >> : >> : >does : > : > : >>: not respond properly? Is it because the printer is not defined? I : >>: have many questions here. : >> : >>Yes. Usb is a little complicated in this area, and there are a number : >>of details that are hard to get right. It wouldn't surprise me if the : >>current set of drivers are less than completely optimal. : >> : >> : > : >On a bit of a side-track, I'm wondering if it could be due to how the : >multifunction device presents itself? A bit back in this thread someone : >mentioned that a pointer must be present for a driver to attach to a : >device. If there is only one pointer for a device, only one driver may : >attach. Since a single USB bus can have a LOT of devices and each : >device's capabilities are determined through the presence of usage : >pages, I see two ways for a multifunction device to present itself: : > : >- A single device ID with more than one usage page. All the : >functionality is there and is compatible with FreeBSD drivers, but since : >there is only one device probed on the bus, only one driver may attach. : >Perhaps a "simple" mux driver would be useful? : > : >- A multiple single-usage device IDs. Same functionality as before, but : >now FreeBSD can probe unique printer and scanner devices and thus let : >both ulpt and uscanner attach simutaneously. : > : >Am I way off base? : > : > : > : > : What I would like to know is where are these tests done. Or should I say : where does USB start to load and what are the steps in between. In usb_subr.c, routine usbd_probe_and_attach is where the child's config stuff is done that I posted before. Warner