From owner-freebsd-current@FreeBSD.ORG Sat Jul 11 21:26:33 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 133AD106568A for ; Sat, 11 Jul 2009 21:26:33 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from smtp.lamaiziere.net (net.lamaiziere.net [91.121.44.19]) by mx1.freebsd.org (Postfix) with ESMTP id C8F2F8FC2F for ; Sat, 11 Jul 2009 21:26:32 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from baby-jane.lamaiziere.net (105.10.87-79.rev.gaoland.net [79.87.10.105]) by smtp.lamaiziere.net (Postfix) with ESMTPA id 5E51E63317E; Sat, 11 Jul 2009 23:26:31 +0200 (CEST) Received: from baby-jane.lamaiziere.net (localhost [127.0.0.1]) by baby-jane.lamaiziere.net (Postfix) with ESMTP id 12E7FBF01; Sat, 11 Jul 2009 23:26:37 +0200 (CEST) Date: Sat, 11 Jul 2009 23:26:35 +0200 From: Patrick Lamaiziere To: Hans Petter Selasky Message-ID: <20090711232635.24b28f1f@baby-jane.lamaiziere.net> In-Reply-To: <200907072039.27811.hselasky@c2i.net> References: <20090703172600.1971111e@baby-jane.lamaiziere.net> <20090706161154.06abb3cd@baby-jane.lamaiziere.net> <200907061750.39084.hselasky@c2i.net> <200907072039.27811.hselasky@c2i.net> X-Mailer: Claws Mail 3.7.1 (GTK+ 2.16.2; i386-portbld-freebsd7.2) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org 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: Sat, 11 Jul 2009 21:26:33 -0000 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=20 > /sys/dev/serial/ulpt.c >=20 > 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.=20 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 Thanks.