From owner-freebsd-current@FreeBSD.ORG Sun Jul 12 07:52:57 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 CD6471065670 for ; Sun, 12 Jul 2009 07:52:57 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe13.swipnet.se [212.247.155.129]) by mx1.freebsd.org (Postfix) with ESMTP id 388048FC1A for ; Sun, 12 Jul 2009 07:52:56 +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=8kQB0OdkAAAA:8 a=9Eg03mg4IpTrjiMqdb0A:9 a=3X4t0oIlXPIjjnBGBnsA:7 a=6nXHILMoMogo6J7HlinSUZUP5rAA:4 a=9aOQ2cSd83gA:10 Received: from [62.113.132.61] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe13.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 888306885; Sun, 12 Jul 2009 09:52:52 +0200 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Sun, 12 Jul 2009 09:52:29 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA1; KDE/4.2.4; i386; ; ) References: <20090703172600.1971111e@baby-jane.lamaiziere.net> <200907072039.27811.hselasky@c2i.net> <20090711232635.24b28f1f@baby-jane.lamaiziere.net> In-Reply-To: <20090711232635.24b28f1f@baby-jane.lamaiziere.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200907120952.30158.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: Sun, 12 Jul 2009 07:52:58 -0000 On Saturday 11 July 2009 23:26:35 Patrick Lamaiziere wrote: > Le Tue, 7 Jul 2009 20:39:26 +0200, > > Hans Petter Selasky a =E9crit : > > There was a small bug in my patch. Could you post-patching edit > > /sys/dev/serial/ulpt.c > > > > urlpt_open(struct usb_fifo *fifo, int fflags) > > ulpt_open(struct usb_fifo *fifo, int fflags) > > Well, as I must use the unlpt device, I think this does not change > anything. > > If I understand well, with /dev/unlpt0, ulpt.c calls unlpt_open(), not > ulpt_open() nor unlpt_open()? > > Just in case, I've tried to change unlpt_open() with > static int > unlpt_open(struct usb_fifo *fifo, int fflags) > { > struct ulpt_softc *sc =3D usb_fifo_softc(fifo); > > if (sc->sc_fflags & fflags) { > return (EBUSY); > } > > /* set defrag write mode */ > > if (fflags & FWRITE) { > printf("unlpt_open: using defrag write mode\n"); > usb_fifo_set_write_defrag(fifo, 1); > } > ... > > But the printer hangs after the first job (the data led on the printer > stay on): > unlpt_open: using defrag write mode > ulpt_write_callback:237: state=3D0x0 actlen=3D0 > ulpt_write_callback:237: state=3D0x1 actlen=3D32768 > ulpt_write_callback:237: state=3D0x1 actlen=3D32768 > ulpt_write_callback:237: state=3D0x1 actlen=3D32768 > The prints look good. Did you restart/repower the printer, before trying to print? What document format is being used on /dev/ulpt? Maybe you have to use anot= her=20 format. Did you use the correct PPD file for your printer? I have a brother= =20 printer here which uses USB, and claims to support PCL 6, but whenever I pr= int=20 something in PCL 6, it's not recognized. I found out I had to download a=20 special PPD file, and install foomatic-rip, for cups. Then it worked using = the=20 GDI protocol. =2D-HPS