From owner-freebsd-usb@FreeBSD.ORG Fri Jul 8 22:18:51 2005 Return-Path: X-Original-To: usb@FreeBSD.ORG Delivered-To: freebsd-usb@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9DE1F16A41C for ; Fri, 8 Jul 2005 22:18:51 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.village.org (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4473043D49 for ; Fri, 8 Jul 2005 22:18:51 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1]) by harmony.village.org (8.13.3/8.13.3) with ESMTP id j68MHm8A022744 for ; Fri, 8 Jul 2005 16:17:49 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 08 Jul 2005 16:17:54 -0600 (MDT) Message-Id: <20050708.161754.79267773.imp@bsdimp.com> To: usb@FreeBSD.ORG From: "M. Warner Losh" In-Reply-To: <20050708.161257.58435372.imp@bsdimp.com> References: <20050708.161257.58435372.imp@bsdimp.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Fri_Jul__8_16:17:54_2005_414)--" Content-Transfer-Encoding: 7bit Cc: Subject: Re: Proposed patch to ulpt.c 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, 08 Jul 2005 22:18:51 -0000 ----Next_Part(Fri_Jul__8_16:17:54_2005_414)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Ooops. In my last message, there's an extra chunk in the patch, left over from debugging. Please try this one instead. Warner ----Next_Part(Fri_Jul__8_16:17:54_2005_414)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ulpt.diff" Index: ulpt.c =================================================================== RCS file: /home/ncvs/src/sys/dev/usb/ulpt.c,v retrieving revision 1.66 diff -u -r1.66 ulpt.c --- ulpt.c 6 Jan 2005 01:43:28 -0000 1.66 +++ ulpt.c 8 Jul 2005 22:12:33 -0000 @@ -543,28 +544,6 @@ } } - for (spin = 0; (ulpt_status(sc) & LPS_SELECT) == 0; spin += STEP) { - DPRINTF(("ulpt_open: waiting a while\n")); - if (spin >= TIMEOUT) { - error = EBUSY; - sc->sc_state = 0; - goto done; - } - - /* wait 1/4 second, give up if we get a signal */ - error = tsleep(sc, LPTPRI | PCATCH, "ulptop", STEP); - if (error != EWOULDBLOCK) { - sc->sc_state = 0; - goto done; - } - - if (sc->sc_dying) { - error = ENXIO; - sc->sc_state = 0; - goto done; - } - } - err = usbd_open_pipe(sc->sc_iface, sc->sc_out, 0, &sc->sc_out_pipe); if (err) { error = EIO; ----Next_Part(Fri_Jul__8_16:17:54_2005_414)----