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: g...@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
_______________________________________________
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Reply via email to