From owner-freebsd-ports@FreeBSD.ORG Mon Sep 3 09:36:24 2007 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B978F16A417 for ; Mon, 3 Sep 2007 09:36:24 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from spacemail2-out.mgmt.space.net (spacemail2-out.mgmt.space.net [194.97.149.148]) by mx1.freebsd.org (Postfix) with ESMTP id 4EFE913C4A3 for ; Mon, 3 Sep 2007 09:36:24 +0000 (UTC) (envelope-from se@FreeBSD.org) X-SpaceNet-SBRS: None X-IronPort-AV: E=Sophos;i="4.20,201,1186351200"; d="scan'208";a="42287421" Received: from mail.atsec.com ([195.30.252.105]) by spacemail2-out.mgmt.space.net with ESMTP; 03 Sep 2007 11:17:41 +0200 Received: from [10.2.2.88] (frueh.atsec.com [217.110.13.170]) (Authenticated sender: se@atsec.com) by mail.atsec.com (Postfix) with ESMTP id 501257209FF; Mon, 3 Sep 2007 11:17:41 +0200 (CEST) Message-ID: <46D92292.1000701@FreeBSD.org> Date: Sat, 01 Sep 2007 10:28:02 +0200 From: Stefan Esser User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Lars Eighner References: <4862c65e0708312050t1a448e81wa2d6ea555a200c01@mail.gmail.com> <20070831232524.D33394@qroenaqrq.6qbyyneqvnyhc.pbz> In-Reply-To: <20070831232524.D33394@qroenaqrq.6qbyyneqvnyhc.pbz> X-Enigmail-Version: 0.95.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org, Brian Wagener Subject: Re: HPLIP ugen X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Sep 2007 09:36:24 -0000 Lars Eighner wrote: > On Sat, 1 Sep 2007, Brian Wagener wrote: > >> When using HPLIP your usb printer has to use the ugen driver in order for >> all printing/scanning/status functionality to be present. The problem >> is, my >> printer loads as a umass device so it doesn't get detected by hplip. >> >> Does anyone know of a workaround for this? Is there anyway to force my >> printer to use ugen instead of umass? I can't just remove umass because >> other devices require it. > > The only way is to use a kernel built without umass (and without ulpt). If > you can boot without umass, you can load umass from the command line (using > kldload) after the printer is attached. Although I have not actually tried Hmmm, there might be two methods to implement a more user- friendly behaviour: 1) Make umass ignore the device 2) Make ugen accept it with higher priority than umass For 1) the umass driver should get a "DONOTATTACH" quirk, which then lets ugen gain control. But if anybody wanted to use the umass driver with that printer (e.g. if he is only interested in reading from the built-in card reader and does not want to print anything), this would not be possible (without installation of HPLIP, that is). If the device was grabbed by ulpt (if umass does not want it, then it must be black-listed in both, but I do not expect this to be the case). Variant 2) would need a device table and support for scanning it to be added to ugen. Devices that are best served by ugen could be entered to that list, to prevent other drivers from taking precedence. This does not seem such an uncommon situation and might also be useful for device protocol tests, for example. Device hints could be used to control this feature for specific devices. Either variant is workable (but 1) is easier to implement). It may be counter-intuitive for a device to be added to a driver that is *not* meant to be used to control it ... Regards, STefan