From owner-freebsd-current@FreeBSD.ORG Sat Sep 19 18:13:39 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 0DF3A106566C for ; Sat, 19 Sep 2009 18:13:39 +0000 (UTC) (envelope-from gcr+freebsd-current@tharned.org) Received: from roadkill.tharned.org (roadkill.tharned.org [75.145.12.185]) by mx1.freebsd.org (Postfix) with ESMTP id D82408FC18 for ; Sat, 19 Sep 2009 18:13:38 +0000 (UTC) Received: from blue.tharned.org (blue.tharned.org [10.10.10.8]) (authenticated bits=0) by roadkill.tharned.org (8.14.3/8.14.3) with ESMTP id n8JIDY7V059260 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 19 Sep 2009 13:13:35 -0500 (CDT) (envelope-from gcr+freebsd-current@tharned.org) Date: Sat, 19 Sep 2009 13:13:33 -0500 (CDT) From: Greg Rivers To: Hans Petter Selasky In-Reply-To: <200909191553.12645.hselasky@c2i.net> Message-ID: References: <200909191553.12645.hselasky@c2i.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (roadkill.tharned.org [75.145.12.185]); Sat, 19 Sep 2009 13:13:35 -0500 (CDT) Cc: freebsd-current@freebsd.org Subject: Re: USB-to-serial adapter no longer working in 8.0-RC1 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, 19 Sep 2009 18:13:39 -0000 On Sat, 19 Sep 2009, Hans Petter Selasky wrote: > On Saturday 19 September 2009 05:40:28 Greg Rivers wrote: >> Last May, Hans Petter Selasky fixed up the umct driver for 8.0-CURRENT >> (http://lists.freebsd.org/pipermail/freebsd-current/2009-May/007125.html). >> After updating to 8.0-RC1 I find that the driver has a new problem. >> >> Testing with cu(1) and a modem, I can see by watching the lights on the >> modem and on the usb-serial adapter that it still asserts DTR and sends >> and receives characters properly, but no characters reach the terminal. >> That seems to be the only problem: characters from the attached serial >> device seem to disappear before reaching whatever program has the serial >> device open. But strangely enough, power cycling the modem results in a >> few "line noise" characters appearing. Perhaps the driver is no longer >> responding appropriately to DSR? >> >> Any insight or troubleshooting clues would be much appreciated. > > Hi, > > You need to provide debug output from: > > sysctl hw.usb.ucom.debug=15 > > and > > sysctl hw.usb.umct.debug=15 > > If it exists. > hw.usb.umct does not exist, but hw.usb.ucom does. Here's debug output with hw.usb.ucom.debug set to 15. I tested with a modem because it's easy to interact with. Attach USB-serial adapter to USB port: ugen1.2: at usbus1 umct0: on usbus1 ucom_attach_tty:317: tp = 0xc5644200, unit = 0 ucom_attach_tty:346: ttycreate: U0 Open /dev/cuaU0 via 'cu -l cuaU0 -s 115200 dir': ucom_open:554: tp = 0xc5644200 ucom_dtr:827: onoff = 1 ucom_line_state:799: on=0x01, off=0x00 ucom_rts:838: onoff = 1 ucom_line_state:799: on=0x02, off=0x00 ucom_break:816: onoff = 0 ucom_line_state:799: on=0x00, off=0x04 ucom_status_change:901: ucom_param:950: sc = 0xc5433230 ucom_dtr:827: onoff = 1 ucom_line_state:799: on=0x01, off=0x00 ucom_rts:838: onoff = 1 ucom_line_state:799: on=0x02, off=0x00 ucom_cfg_open:520: ucom_ioctl:653: cmd = 0x402c7413 ucom_ioctl:653: cmd = 0x802c7416 ucom_ioctl:653: cmd = 0x2000740d ucom_ioctl:653: cmd = 0x402c7413 ucom_ioctl:653: cmd = 0x802c7416 ucom_param:950: sc = 0xc5433230 ucom_ioctl:653: cmd = 0x8004667e ucom_ioctl:653: cmd = 0x8004667d ucom_get_data:1064: cnt=0 Type "atz" (modem resets, responds with "OK"): ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_status_change:901: Type "atdt" (modem goes off hook, finds no dial tone, prints "NO DIALTONE", hangs up): ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_status_change:901: last message repeated 2 times Type "atz" (modem resets, responds with "OK"): ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 ucom_status_change:901: Type "~." to exit cu: ucom_ioctl:653: cmd = 0x2000740e ucom_ioctl:653: cmd = 0x2000740e ucom_close:623: tp=0xc5644200 ucom_shutdown:446: ucom_dtr:827: onoff = 0 ucom_line_state:799: on=0x00, off=0x01 ucom_rts:838: onoff = 1 ucom_line_state:799: on=0x02, off=0x00 ucom_cfg_close:605: Detach USB-serial adapter from USB port: ugen1.2: at usbus1 (disconnected) umct0: at uhub0, port 1, addr 2 (disconnected) ucom_detach_tty:358: sc = 0xc5433230, tp = 0xc5644200 ucom_close:623: tp=0xc5644200 ucom_close:626: tp=0xc5644200 already closed Note that none of the characters output by the modem made it to cu. Each sequence of ucom_outwakeup:1009: sc = 0xc5433230 ucom_get_data:1064: cnt=1 ucom_get_data:1064: cnt=0 corresponds to me typing a character. There are no debug lines corresponding to characters output by the modem, so they must be getting dropped prior to reaching the ucom driver. I also tested with a 8.0-BETA2 system from July 18; it has the same problem. But I know that it was working on 8.0-CURRENT as recently as the first week of June. It still works fine on recent 7.2-STABLE. -- Greg Rivers