Bug 138659 - [usb8][uftdi] driver broken in RELENG_8/CURRENT
Summary: [usb8][uftdi] driver broken in RELENG_8/CURRENT
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-usb (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-09 13:40 UTC by Tomas Verbaitis
Modified: 2018-03-04 17:58 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Verbaitis 2009-09-09 13:40:00 UTC
www/kannel use to run perfectly with two, three or four Teltonika ModemUSB/G10 USB modems connected. uftdi(4) driver was attaching to these modems.

after i upgraded one of the machines to then 8-CURRENT on Aug 19 2009, i noticed the following problems:
 - only single device appears to be responsive right after start of kannel
 - even that device is answering requests slower and slower until it stalls completely within 1 hour

Fix: 

no idea :(

7.x still worked ok, so i suspect, that it must be related to USB2
How-To-Repeat: run www/kannel with 1 or 2 Teltonika ModemUSB/G10 attached to a machine running FreeBSD RELENG_8 or CURRENT
Comment 1 Hans Petter Selasky 2009-09-09 15:34:00 UTC
On Wednesday 09 September 2009 14:32:22 Tomas Verbaitis wrote:
>  - even that device is answering requests slower and slower until it stalls
> completely within 1 hour

What is printed in dmesg?

Try enabling uftdi debugging:

sysctl hw.usb.uftdi.debug=15

Any errors?

--HPS
Comment 2 Tomas Verbaitis 2009-09-10 13:52:54 UTC
On Wed, Sep 09, 2009 at 04:34:00PM +0200, Hans Petter Selasky wrote:
> On Wednesday 09 September 2009 14:32:22 Tomas Verbaitis wrote:
> >  - even that device is answering requests slower and slower until it stalls
> > completely within 1 hour
> What is printed in dmesg?

Without enabling uftdi debugging, the dmesg only notes device
connections and removals (btw, the old usb stack would crash the system,
if attached uftdi deviced was removed and the cuaU* was accessed, so,
yes, there is an improvement ,))

Sep  9 15:49:46 sklepas kernel: ugen0.2: <Teltonika> at usbus0
Sep  9 15:49:46 sklepas kernel: uftdi0: <Teltonika ModemUSB/G10> on usbus0
Sep  9 15:56:08 sklepas kernel: ugen0.2: <Teltonika> at usbus0 (disconnected)
Sep  9 15:56:08 sklepas kernel: uftdi0: at uhub0, port 1, addr 2 (disconnected)
Sep  9 15:56:25 sklepas kernel: ugen0.2: <Teltonika> at usbus0
Sep  9 15:56:26 sklepas kernel: uftdi0: <Teltonika ModemUSB/G10> on usbus0
Sep  9 15:56:33 sklepas kernel: ugen0.2: <Teltonika> at usbus0 (disconnected)
Sep  9 15:56:33 sklepas kernel: uftdi0: at uhub0, port 1, addr 2 (disconnected)
Sep  9 15:56:41 sklepas kernel: ugen0.2: <Teltonika> at usbus0
Sep  9 15:56:41 sklepas kernel: uftdi0: <Teltonika ModemUSB/G10> on usbus0

> Try enabling uftdi debugging:
> sysctl hw.usb.uftdi.debug=15

after enabling debug it went like this:

* modem attached

Sep 10 15:38:30 sklepas kernel: ugen0.2: <Teltonika> at usbus0
Sep 10 15:38:30 sklepas kernel: uftdi0: <Teltonika ModemUSB/G10> on usbus0
Sep 10 15:38:30 sklepas kernel: uftdi_attach:284:

* kannel started -- it initialized the modem ok and tried to send an sms

Sep 10 15:40:25 sklepas kernel: uftdi_pre_param:653: 
Sep 10 15:40:25 sklepas kernel: uftdi_cfg_open:354: uftdi_pre_param:653: 
Sep 10 15:40:25 sklepas kernel: uftdi_pre_param:653: 
Sep 10 15:40:25 sklepas kernel: uftdi_read_callback:459: status change msr=0x90 (0x00) lsr=0x60 (0x00)
Sep 10 15:40:25 sklepas kernel: uftdi_cfg_get_status:705: msr=0x90 lsr=0x60
Sep 10 15:40:25 sklepas kernel: uftdi_cfg_param:672: 
Sep 10 15:40:26 sklepas kernel: uftdi_cfg_param:672: 
Sep 10 15:40:26 sklepas kernel: uftdi_cfg_get_status:705: msr=0x90 lsr=0x60
Sep 10 15:40:28 sklepas kernel: uftdi_pre_param:653: 
Sep 10 15:40:28 sklepas kernel: uftdi_cfg_open:354: uftdi_pre_param:653: 
Sep 10 15:40:28 sklepas kernel: uftdi_cfg_get_status:705: msr=0x90 lsr=0x60
Sep 10 15:40:28 sklepas kernel: uftdi_cfg_param:672: 
Sep 10 15:40:28 sklepas kernel: uftdi_cfg_param:672: 
Sep 10 15:40:28 sklepas kernel: uftdi_pre_param:653: 
Sep 10 15:40:28 sklepas kernel: uftdi_cfg_param:672: 
Sep 10 15:40:29 sklepas kernel: uftdi_read_callback:459: status change msr=0x10 (0x90) lsr=0x60 (0x60)
Sep 10 15:40:29 sklepas kernel: uftdi_cfg_get_status:705: msr=0x10 lsr=0x60
Sep 10 15:40:31 sklepas kernel: uftdi_read_callback:459: status change msr=0x30 (0x10) lsr=0x60 (0x60)
Sep 10 15:40:31 sklepas kernel: uftdi_cfg_get_status:705: msr=0x30 lsr=0x60
Sep 10 15:40:31 sklepas kernel: uftdi_read_callback:459: status change msr=0x10 (0x30) lsr=0x00 (0x60)
Sep 10 15:40:31 sklepas kernel: uftdi_cfg_get_status:705: msr=0x10 lsr=0x00

* the sms did not get sent, at least the modem did not acknowledge that
as the communication with it stalled for ca. 4 minutes

* i disconnected the modem and stopped kannel

Sep 10 15:44:06 sklepas kernel: ugen0.2: <Teltonika> at usbus0 (disconnected)
Sep 10 15:44:06 sklepas kernel: uftdi0: at uhub0, port 2, addr 2 (disconnected)

* kannel stopped only after modem removal, as, apparently it was still
trying to say at least an ATZ to the modem

* repeated the same again:

Sep 10 15:44:28 sklepas kernel: ugen0.2: <Teltonika> at usbus0
Sep 10 15:44:28 sklepas kernel: uftdi0: <Teltonika ModemUSB/G10> on usbus0
Sep 10 15:44:28 sklepas kernel: uftdi_attach:284: 
Sep 10 15:44:39 sklepas kernel: uftdi_pre_param:653: 
Sep 10 15:44:39 sklepas kernel: uftdi_cfg_open:354: uftdi_pre_param:653: 
Sep 10 15:44:39 sklepas kernel: uftdi_pre_param:653: 
Sep 10 15:44:39 sklepas kernel: uftdi_read_callback:459: status change msr=0x90 (0x00) lsr=0x60 (0x00)
Sep 10 15:44:39 sklepas kernel: uftdi_cfg_get_status:705: msr=0x90 lsr=0x60
Sep 10 15:44:39 sklepas kernel: uftdi_cfg_param:672: 
Sep 10 15:44:39 sklepas kernel: uftdi_cfg_param:672: 
Sep 10 15:44:40 sklepas kernel: uftdi_cfg_get_status:705: msr=0x90 lsr=0x60
Sep 10 15:44:41 sklepas kernel: uftdi_pre_param:653: 
Sep 10 15:44:41 sklepas kernel: uftdi_cfg_open:354: uftdi_pre_param:653: 
Sep 10 15:44:41 sklepas kernel: uftdi_cfg_get_status:705: msr=0x90 lsr=0x60
Sep 10 15:44:41 sklepas kernel: uftdi_cfg_param:672: 
Sep 10 15:44:41 sklepas kernel: uftdi_cfg_param:672: 
Sep 10 15:44:41 sklepas kernel: uftdi_pre_param:653: 
Sep 10 15:44:41 sklepas kernel: uftdi_cfg_param:672: 
Sep 10 15:44:42 sklepas kernel: uftdi_read_callback:459: status change msr=0x10 (0x90) lsr=0x60 (0x60)
Sep 10 15:44:42 sklepas kernel: uftdi_cfg_get_status:705: msr=0x10 lsr=0x60
Sep 10 15:44:44 sklepas kernel: uftdi_read_callback:459: status change msr=0x30 (0x10) lsr=0x60 (0x60)
Sep 10 15:44:44 sklepas kernel: uftdi_cfg_get_status:705: msr=0x30 lsr=0x60
Sep 10 15:44:44 sklepas kernel: uftdi_read_callback:459: status change msr=0x10 (0x30) lsr=0x00 (0x60)
Sep 10 15:44:44 sklepas kernel: uftdi_cfg_get_status:705: msr=0x10 lsr=0x00
Sep 10 15:45:15 sklepas kernel: ugen0.2: <Teltonika> at usbus0 (disconnected)
Sep 10 15:45:15 sklepas kernel: uftdi0: at uhub0, port 2, addr 2 (disconnected)


hope this helps. thank you for quick reaction!


-- 
Tomas "Verbaitis" Verbaitis ** http://megalogika.lt
Comment 3 Tomas Verbaitis 2011-02-22 09:29:23 UTC
This problem can not be reproduced on usb/138659: [usb8][uftdi] driver 
broken in RELENG_8/CURRENT

I think this PR can be now closed.

--
Tomas Verbaitis
tomasv@megalogika.lt
+37069953201
skype:verbaitis
Comment 4 Tomas Verbaitis 2011-02-22 12:36:24 UTC
A correction:

this problem can not be reproduced anymore on
	FreeBSD 8.2-PRERELEASE #12: Thu Feb 17 20:18:33 EET 2011

The conclusion still stands -- this PR can now be closed.
--
Tomas Verbaitis
tomasv@megalogika.lt
+37069953201
skype:verbaitis
Comment 5 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:12 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 6 Ian Lepore freebsd_committer freebsd_triage 2018-03-04 17:58:26 UTC
The originator reported that the problem is fixed, and requested that this PR be closed in comment #4.  Better late than never. :)