From owner-freebsd-current@FreeBSD.ORG Tue Jul 7 18:39:53 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FFDB106564A for ; Tue, 7 Jul 2009 18:39:53 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id E09248FC1D for ; Tue, 7 Jul 2009 18:39:52 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=BQeo18V-fugA:10 a=MXw7gxVQKqGXY79tIT8aFQ==:17 a=mWr3Gg2zCNgJgtvLSuMA:9 a=Xg8A_g8-J_tqFkZdVEYA:7 a=SMLswts1WtyyLDmFcZ9DzLodgmEA:4 Received: from [62.113.132.61] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1272763511; Tue, 07 Jul 2009 20:39:51 +0200 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Tue, 7 Jul 2009 20:39:26 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA1; KDE/4.2.4; i386; ; ) References: <20090703172600.1971111e@baby-jane.lamaiziere.net> <20090706161154.06abb3cd@baby-jane.lamaiziere.net> <200907061750.39084.hselasky@c2i.net> In-Reply-To: <200907061750.39084.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907072039.27811.hselasky@c2i.net> Cc: Patrick Lamaiziere Subject: Re: ulpt problem (USB_ERR_IOERROR) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 07 Jul 2009 18:39:53 -0000 On Monday 06 July 2009 17:50:37 Hans Petter Selasky wrote: > On Monday 06 July 2009 16:11:54 Patrick Lamaiziere wrote: > > > > Shall I setup another box with current to be sure that's a problem > > with the printer and not with the hardware? > > Hi, > > urlpt was just for backwards compatibility. > > Could you try printing using /dev/unlpt0 ? And send me resulting dmesg? > > Power cycle your printer before testing. Hi, There was a small bug in my patch. Could you post-patching edit /sys/dev/serial/ulpt.c And move the: /* set raw write mode */ if (fflags & FWRITE) { usb_fifo_set_write_defrag(fifo, 0); } And: /* set defrag write mode */ if (fflags & FWRITE) { usb_fifo_set_write_defrag(fifo, 1); } outside the "if (sc->sc_fflags == 0)", so that the code looks like this: static int urlpt_open(struct usb_fifo *fifo, int fflags) { struct ulpt_softc *sc = usb_fifo_softc(fifo); /* we assume that open is a serial process */ if (sc->sc_fflags == 0) { /* reset USB paralell port */ ulpt_reset(sc); } /* set raw write mode */ if (fflags & FWRITE) { usb_fifo_set_write_defrag(fifo, 0); } return (unlpt_open(fifo, fflags)); } static int ulpt_open(struct usb_fifo *fifo, int fflags) { struct ulpt_softc *sc = usb_fifo_softc(fifo); /* we assume that open is a serial process */ if (sc->sc_fflags == 0) { /* reset USB paralell port */ ulpt_reset(sc); } /* set defrag write mode */ if (fflags & FWRITE) { usb_fifo_set_write_defrag(fifo, 1); } return (unlpt_open(fifo, fflags)); } --HPS