From owner-freebsd-usb@FreeBSD.ORG Mon Jun 16 05:42:01 2014 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CD8ECF0 for ; Mon, 16 Jun 2014 05:42:01 +0000 (UTC) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBEBD27BD for ; Mon, 16 Jun 2014 05:42:00 +0000 (UTC) Received: from [89.204.154.191] (helo=localhost.my.domain) by ms-10.1blu.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1WwPfy-0005Od-Ul; Mon, 16 Jun 2014 07:41:51 +0200 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.my.domain (8.14.7/8.14.3) with ESMTP id s5G5fiVI001376; Mon, 16 Jun 2014 07:41:44 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.14.7/8.14.3/Submit) id s5G5fg8h001375; Mon, 16 Jun 2014 07:41:42 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Mon, 16 Jun 2014 07:41:41 +0200 From: Matthias Apitz To: Hans Petter Selasky Subject: Re: Fwd: USB to parallel for printer HP LaserJet 4mL Message-ID: <20140616054141.GA1358@La-Habana> Reply-To: Matthias Apitz 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <539C9181.10304@selasky.org> X-Operating-System: FreeBSD 9.0-CURRENT r214444 (i386) User-Agent: Mutt/1.5.21 (2010-09-15) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 89.204.154.191 Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2014 05:42:01 -0000 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: 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: 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: 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: 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