From owner-freebsd-usb@FreeBSD.ORG Tue Jan 8 01:02: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 2952F16A418 for ; Tue, 8 Jan 2008 01:02:42 +0000 (UTC) (envelope-from gdt@ir.bbn.com) Received: from fnord.ir.bbn.com (fnord.ir.bbn.com [192.1.100.210]) by mx1.freebsd.org (Postfix) with ESMTP id BAD1A13C45D for ; Tue, 8 Jan 2008 01:02:41 +0000 (UTC) (envelope-from gdt@ir.bbn.com) Received: by fnord.ir.bbn.com (Postfix, from userid 10853) id BB11F52E9; Mon, 7 Jan 2008 20:02:40 -0500 (EST) X-Hashcash: 1:20:080108:usb@freebsd.org::ndpvVkzQWKnJGo1J:000MV7 From: Greg Troxel To: usb@freebsd.org Date: Mon, 07 Jan 2008 20:02:40 -0500 Message-ID: User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: Subject: non-blocking reads on ulpt(4) - patched in NetBSD 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, 08 Jan 2008 01:02:42 -0000 --=-=-= If any of you are trying to use gutenprint with USB printers, it would probably be useful to at least read this diff, and probably merge it into FreeBSD. When I started, I read diffs from FreeBSD's ulpt to NetBSD's, and concluded that FreeBSD's was a lightly-modified (kernel infrastructure issues) version of an older version of NetBSD's. I think a remerge is in order. I'd be happy to answer questions if anyone works on this. --=-=-= Content-Type: message/rfc822 Content-Disposition: inline From: Greg Troxel Subject: CVS commit: src/sys/dev/usb To: source-changes@NetBSD.org Reply-To: gdt@netbsd.org Message-Id: <20080108005810.8CC3321507@cvs.netbsd.org> Date: Tue, 8 Jan 2008 00:58:10 +0000 (UTC) MIME-Version: 1.0 Module Name: src Committed By: gdt Date: Tue Jan 8 00:58:10 UTC 2008 Modified Files: src/sys/dev/usb: ulpt.c Log Message: Support FIONBIO. Support non-blocking reads from USB printers. With this, escputil can query the printer model, and I can print a test page with gutenprint 5.1 and cups. Add many comments explaining why the support is not quite right. (This change is quite a bit less invasive than a "correct" fix, and thus more reasonable to pull up to netbsd-4.) Rototill debugging, so that all DPRINTFN have a level, and so that the message is printed if the debug level is >= the number in the source code. Document debug level plan. Fix bug where only one status change would be printed (by inspection, not tested). Document scheme for reading/discarding data when ulpt(4) is opened for write only. Delete dead code. Plan and patch posted on tech-kern without objections. To generate a diff of this commit: cvs rdiff -r1.78 -r1.79 src/sys/dev/usb/ulpt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --=-=-=--