Date: Tue, 7 Jul 2009 20:39:26 +0200 From: Hans Petter Selasky <hselasky@c2i.net> To: freebsd-current@freebsd.org Cc: Patrick Lamaiziere <patfbsd@davenulle.org> Subject: Re: ulpt problem (USB_ERR_IOERROR) Message-ID: <200907072039.27811.hselasky@c2i.net> In-Reply-To: <200907061750.39084.hselasky@c2i.net> References: <20090703172600.1971111e@baby-jane.lamaiziere.net> <20090706161154.06abb3cd@baby-jane.lamaiziere.net> <200907061750.39084.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907072039.27811.hselasky>