From owner-freebsd-stable Sun Feb 10 15:47:17 2002 Delivered-To: freebsd-stable@freebsd.org Received: from tholian.rsasecurity.com (mail.rsasecurity.com [204.167.112.129]) by hub.freebsd.org (Postfix) with SMTP id 9AC0137B400 for ; Sun, 10 Feb 2002 15:47:11 -0800 (PST) Received: from sdtihq24.securitydynamics.com by tholian.rsasecurity.com via smtpd (for hub.FreeBSD.org [216.136.204.18]) with SMTP; 10 Feb 2002 23:46:34 UT Received: from ebola.securitydynamics.com (ebola.securid.com [192.168.7.4]) by sdtihq24.securid.com (Pro-8.9.3/Pro-8.9.3) with ESMTP id SAA02187 for ; Sun, 10 Feb 2002 18:47:10 -0500 (EST) Received: from spirit.dynas.se (localhost [127.0.0.1]) by ebola.securitydynamics.com (8.10.2+Sun/8.9.1) with SMTP id g1ANl8Z25421 for ; Sun, 10 Feb 2002 18:47:09 -0500 (EST) Received: (qmail 19169 invoked from network); 10 Feb 2002 23:47:07 -0000 Received: from explorer.rsa.com (HELO mikko.rsa.com) (10.81.217.59) by spirit.dynas.se with SMTP; 10 Feb 2002 23:47:07 -0000 Received: (from mikko@localhost) by mikko.rsa.com (8.11.6/8.11.6) id g1ANl5r07417; Sun, 10 Feb 2002 15:47:05 -0800 (PST) (envelope-from mikko) Date: Sun, 10 Feb 2002 15:47:05 -0800 (PST) From: Mikko Tyolajarvi Message-Id: <200202102347.g1ANl5r07417@mikko.rsa.com> To: joe@tao.org.uk Cc: stable@freebsd.org Subject: Re: USB patchset available for testing. Newsgroups: local.freebsd.stable References: <20020210204630.D16746@genius.tao.org.uk> X-Newsreader: NN version 6.5.6 (NOV) Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In local.freebsd.stable you write: >--Qrgsu6vtpU/OV/zm >Content-Type: text/plain; charset=us-ascii >Content-Disposition: inline >Dear USB users, >I've created a patch set containing improvements from -current for >USB controllers and devices. I'd be very interested in feedback >from interested parties. >http://www.josef-k.net:/misc/RELENG_4-USB-20020210.patch.gz [...] I've just looked through the patch and unless I misunderstand something, the following (from ulpt.c) removes one line too many: void -ulpt_reset(sc) - struct ulpt_softc *sc; +ulpt_reset(struct ulpt_softc *sc) { usb_device_request_t req; DPRINTFN(1, ("ulpt_reset\n")); - req.bmRequestType = UT_WRITE_CLASS_OTHER; Don't delete this line, or the first call to usbd_do_request() will have an uninitialized request type. req.bRequest = UR_SOFT_RESET; USETW(req.wValue, 0); USETW(req.wIndex, sc->sc_ifaceno); USETW(req.wLength, 0); - (void)usbd_do_request(sc->sc_udev, &req, 0); + + /* + * There was a mistake in the USB printer 1.0 spec that gave the + * request type as UT_WRITE_CLASS_OTHER; it should have been + * UT_WRITE_CLASS_INTERFACE. Many printers use the old one, + * so we try both. + */ + if (usbd_do_request(sc->sc_udev, &req, 0)) { /* 1.0 */ + req.bmRequestType = UT_WRITE_CLASS_INTERFACE; + (void)usbd_do_request(sc->sc_udev, &req, 0); /* 1.1 */ + } +} Doesn't look like you made an error, though -- the line is gone in -CURRENT too... $.02, /Mikko -- Mikko Työläjärvi_______________________________________mikko@rsasecurity.com RSA Security To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message