Date: Mon, 16 Jun 2014 07:41:41 +0200 From: Matthias Apitz <guru@unixarea.de> To: Hans Petter Selasky <hps@selasky.org> Cc: freebsd-usb@freebsd.org Subject: Re: Fwd: USB to parallel for printer HP LaserJet 4mL Message-ID: <20140616054141.GA1358@La-Habana> In-Reply-To: <539C9181.10304@selasky.org> References: <20140601175846.GA2104@La-Habana> <538B6C4F.9050205@selasky.org> <20140602150802.GA1950@La-Habana> <538C9A83.7050606@selasky.org> <20140610054403.GA1589@La-Habana> <539964AB.1030909@selasky.org> <20140613184921.GA1748@La-Habana> <539BEE2E.9050108@selasky.org> <20140614181138.GA1598@La-Habana> <539C9181.10304@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
El día Saturday, June 14, 2014 a las 08:16:33PM +0200, Hans Petter Selasky escribió: > Ok, lets try to figure out the: > > in sys/dev/usb/serial/ulpt.c try to comment out: > > #if 0 > if (sc->sc_fflags == 0) > usbd_transfer_start(sc->sc_xfer[ULPT_INTR_DT_RD]); > #endif > > ... The code is now: static void ulpt_watchdog(void *arg) { struct ulpt_softc *sc = arg; mtx_assert(&sc->sc_mtx, MA_OWNED); /* * Only read status while the device is not opened, due to * possible hardware or firmware bug in some printers. */ DPRINTF("debugging ulpt.c: %s\n", "ulpt_watchdog() skiped read status"); #if 0 if (sc->sc_fflags == 0) usbd_transfer_start(sc->sc_xfer[ULPT_INTR_DT_RD]); #endif usb_callout_reset(&sc->sc_watchdog, hz, &ulpt_watchdog, sc); } the added DPRINTF (to make sure that the new code is active) shows up in messages, but nothing else changed, 'date > /dev/ulpt0' and to unlpt0, both hang; here are the messages: Jun 16 07:27:24 La-Habana root: Unknown USB device: vendor 0x0c45 product 0x62c0 bus uhub3 Jun 16 07:27:46 La-Habana last message repeated 3 times Jun 16 07:29:53 La-Habana kernel: ugen1.2: <Prlific Technology Inc.> at usbus1 Jun 16 07:29:53 La-Habana kernel: ulpt_probe: Jun 16 07:29:53 La-Habana kernel: ulpt_probe: Jun 16 07:29:53 La-Habana kernel: ulpt_attach: sc=0xc5839080 Jun 16 07:29:53 La-Habana kernel: ulpt0: <Prlific Technology Inc. IEEE-1284 Controller, class 0/0, rev 1.00/2.00, addr 2> on usbus1 Jun 16 07:29:53 La-Habana kernel: ulpt_attach: setting alternate config number: 1 Jun 16 07:29:53 La-Habana kernel: ulpt0: using bi-directional mode Jun 16 07:29:53 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog() skiped read status Jun 16 07:30:24 La-Habana last message repeated 30 times Jun 16 07:30:30 La-Habana last message repeated 6 times Jun 16 07:30:30 La-Habana kernel: ulpt_write_callback: state=0x0 actlen=0 Jun 16 07:30:31 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog() skiped read status Jun 16 07:31:02 La-Habana last message repeated 30 times Jun 16 07:31:05 La-Habana last message repeated 3 times Jun 16 07:31:05 La-Habana kernel: ulpt0: at uhub1, port 1, addr 2 (disconnected) Jun 16 07:31:05 La-Habana kernel: ulpt_detach: sc=0xc5839080 Jun 16 07:31:05 La-Habana kernel: ulpt_write_callback: state=0x2 actlen=0 Jun 16 07:31:07 La-Habana kernel: ulpt_probe: Jun 16 07:31:07 La-Habana kernel: ulpt_probe: Jun 16 07:31:07 La-Habana kernel: ulpt_attach: sc=0xc5529a00 Jun 16 07:31:07 La-Habana kernel: ulpt0: <Prlific Technology Inc. IEEE-1284 Controller, class 0/0, rev 1.00/2.00, addr 2> on usbus1 Jun 16 07:31:07 La-Habana kernel: ulpt_attach: setting alternate config number: 1 Jun 16 07:31:07 La-Habana kernel: ulpt0: using bi-directional mode Jun 16 07:31:07 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog() skiped read status Jun 16 07:31:12 La-Habana last message repeated 5 times Jun 16 07:31:12 La-Habana kernel: ulpt_reset: Jun 16 07:31:13 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog() skiped read status Jun 16 07:31:16 La-Habana last message repeated 3 times Jun 16 07:31:16 La-Habana kernel: ulpt_write_callback: state=0x0 actlen=0 Jun 16 07:31:17 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog() skiped read status Jun 16 07:31:37 La-Habana last message repeated 20 times Jun 16 07:31:38 La-Habana kernel: ulpt0: at uhub1, port 1, addr 2 (disconnected) Jun 16 07:31:38 La-Habana kernel: ulpt_detach: sc=0xc5529a00 Jun 16 07:31:38 La-Habana kernel: ulpt_write_callback: state=0x2 actlen=0 Jun 16 07:31:40 La-Habana kernel: ulpt_probe: Jun 16 07:31:40 La-Habana kernel: ulpt_probe: Jun 16 07:31:40 La-Habana kernel: ulpt_attach: sc=0xc5839380 Jun 16 07:31:40 La-Habana kernel: ulpt0: <Prlific Technology Inc. IEEE-1284 Controller, class 0/0, rev 1.00/2.00, addr 2> on usbus1 Jun 16 07:31:40 La-Habana kernel: ulpt_attach: setting alternate config number: 1 Jun 16 07:31:40 La-Habana kernel: ulpt0: using bi-directional mode Jun 16 07:31:40 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog() skiped read status Thx matthias -- Matthias Apitz | /"\ ASCII Ribbon Campaign: E-mail: guru@unixarea.de | \ / - No HTML/RTF in E-mail WWW: http://www.unixarea.de/ | X - No proprietary attachments phone: +49-170-4527211 | / \ - Respect for open standards | en.wikipedia.org/wiki/ASCII_Ribbon_Campaign
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140616054141.GA1358>