Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jun 2014 17:10:22 +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:  <20140616151022.GA1657@La-Habana>
In-Reply-To: <539EC2A1.6040803@selasky.org>
References:  <20140616054141.GA1358@La-Habana> <539E87EF.9080404@selasky.org> <20140616065050.GA1552@La-Habana> <539E94C5.50405@selasky.org> <20140616083302.GA1790@La-Habana> <539EB3D7.7040802@selasky.org> <20140616091858.GA1945@La-Habana> <539EBB4B.2070401@selasky.org> <20140616100709.GA2201@La-Habana> <539EC2A1.6040803@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
El día Monday, June 16, 2014 a las 12:10:41PM +0200, Hans Petter Selasky escribió:

> What happens if you revert that patch, and do a read first, instead of a 
> write?

I have revert both patches, i.e. the code is now as it was, but has some
DPRINTF statements at the beginning of the fuctions; here is what
happens on plug-in, read and write to the device:

plug-in USB cable:

Jun 16 14:28:33 La-Habana root: Unknown USB device: vendor 0x0c45 product 0x62c0 bus uhub3
Jun 16 14:28:33 La-Habana root: Unknown USB device: vendor 0x0c45 product 0x62c0 bus uhub3
Jun 16 14:29:18 La-Habana kernel: ugen1.2: <Prlific Technology Inc.> at usbus1
Jun 16 14:29:18 La-Habana kernel: ulpt_probe: 
Jun 16 14:29:18 La-Habana kernel: ulpt_probe: 
Jun 16 14:29:18 La-Habana kernel: ulpt_attach: sc=0xc6c48900
Jun 16 14:29:18 La-Habana kernel: ulpt0: <Prlific Technology Inc. IEEE-1284 Controller, class 0/0, rev 1.00/2.00, addr 2> on usbus1
Jun 16 14:29:18 La-Habana kernel: ulpt_attach: setting alternate config number: 1
Jun 16 14:29:18 La-Habana kernel: ulpt0: using bi-directional mode
Jun 16 14:29:18 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:19 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:19 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:20 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:20 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:21 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:22 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:22 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:23 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:24 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:24 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:25 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:26 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:26 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:27 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:28 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:28 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:29 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:29 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:30 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:30 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:31 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:31 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:32 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:32 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:33 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:33 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:34 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:34 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT

issued command 'cat < /dev/unlpt0'

Jun 16 14:29:35 La-Habana kernel: unlpt_open: debugging ulpt.c: unlpt_open()
Jun 16 14:29:35 La-Habana kernel: ulpt_start_read: debugging ulpt.c: ulpt_start_read()
Jun 16 14:29:35 La-Habana kernel: ulpt_read_callback: state=0x0
Jun 16 14:29:35 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:36 La-Habana kernel: ulpt0: at uhub1, port 1, addr 2 (disconnected)
Jun 16 14:29:36 La-Habana kernel: ulpt_detach: sc=0xc6c48900
Jun 16 14:29:36 La-Habana kernel: ulpt_stop_read: debugging ulpt.c: ulpt_stop_read()
Jun 16 14:29:36 La-Habana kernel: ulpt_read_callback: state=0x2
Jun 16 14:29:38 La-Habana kernel: ulpt_probe: 
Jun 16 14:29:38 La-Habana kernel: ulpt_probe: 
Jun 16 14:29:38 La-Habana kernel: ulpt_attach: sc=0xc6c48680
Jun 16 14:29:38 La-Habana kernel: ulpt0: <Prlific Technology Inc. IEEE-1284 Controller, class 0/0, rev 1.00/2.00, addr 2> on usbus1
Jun 16 14:29:38 La-Habana kernel: ulpt_attach: setting alternate config number: 1
Jun 16 14:29:38 La-Habana kernel: ulpt0: using bi-directional mode
Jun 16 14:29:38 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()


switching to 'date > /dev/unlpt0'

Jun 16 14:29:39 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:39 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:40 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:40 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:41 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:41 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:42 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:42 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:43 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:43 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:44 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:44 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:45 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:46 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:46 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:47 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:29:48 La-Habana kernel: unlpt_open: debugging ulpt.c: unlpt_open()
Jun 16 14:29:48 La-Habana kernel: ulpt_start_write: debugging ulpt.c: ulpt_start_write()
Jun 16 14:29:48 La-Habana kernel: ulpt_write_callback: state=0x0 actlen=0
Jun 16 14:29:48 La-Habana kernel: ulpt_start_write: debugging ulpt.c: ulpt_start_write()
Jun 16 14:29:48 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:29:48 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:30:14 La-Habana last message repeated 26 times
Jun 16 14:30:15 La-Habana kernel: ulpt_stop_write: debugging ulpt.c: ulpt_stop_write()
Jun 16 14:30:15 La-Habana kernel: ulpt0: at uhub1, port 1, addr 2 (disconnected)
Jun 16 14:30:15 La-Habana kernel: ulpt_detach: sc=0xc6c48680
Jun 16 14:30:15 La-Habana kernel: ulpt_write_callback: state=0x2 actlen=0
Jun 16 14:30:16 La-Habana kernel: ulpt_probe: 
Jun 16 14:30:16 La-Habana kernel: ulpt_probe: 
Jun 16 14:30:16 La-Habana kernel: ulpt_attach: sc=0xc5529600
Jun 16 14:30:16 La-Habana kernel: ulpt0: <Prlific Technology Inc. IEEE-1284 Controller, class 0/0, rev 1.00/2.00, addr 2> on usbus1
Jun 16 14:30:16 La-Habana kernel: ulpt_attach: setting alternate config number: 1
Jun 16 14:30:16 La-Habana kernel: ulpt0: using bi-directional mode
Jun 16 14:30:16 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:30:16 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:30:16 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:30:18 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:30:18 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:30:19 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:30:19 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:30:20 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:30:20 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:30:21 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:30:21 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:30:22 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:30:23 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:30:23 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:30:24 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:30:24 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:30:25 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:30:25 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:30:26 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:30:27 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:30:27 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:30:28 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:30:28 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()
Jun 16 14:30:29 La-Habana kernel: ulpt_status_callback: error=USB_ERR_TIMEOUT
Jun 16 14:30:29 La-Habana kernel: ulpt_watchdog: debugging ulpt.c: ulpt_watchdog()

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?20140616151022.GA1657>