Bug 6286 - USBLAN is broken for Motorola Linux phones
USBLAN is broken for Motorola Linux phones
Status: REJECTED DOCUMENTED
Product: Drivers
Classification: Unclassified
Component: USB
i386 Linux
: P2 normal
Assigned To: Greg Kroah-Hartman
:
Depends on:
Blocks: USB
  Show dependency treegraph
 
Reported: 2006-03-26 14:30 UTC by Dmitry Nezhevenko
Modified: 2006-05-11 01:20 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.16
Tree: Mainline
Regression: ---


Attachments
tweak MTU for BLAN mode (2.05 KB, patch)
2006-05-04 15:08 UTC, David Brownell
Details | Diff

Description Dmitry Nezhevenko 2006-03-26 14:30:43 UTC
Most recent kernel where this bug did not occur: 2.6.13
Distribution: Debian
Hardware Environment: i386, nForce2 chipset
Problem Description:

usblan is broken for recent 2.6 kernel's for Motorola Linux phones. I use 
E680i (22b8:600c). On recent kernels ( 2.6.14 - 2.6.16 ) after pluging phone 
and executing ifup usb0, new interface is working, while transfer rate is not 
high (for example telnet access). But if transfer rate is high (for example 
cat bigfile in telnet or browsing samba shares ) connection is not closed, but 
no data is transfered. There are no additionall messages in syslog when this 
happen. Here is lsusb -v output for phone:

Bus 002 Device 002: ID 22b8:600c Motorola PCS A768i GSM Phone
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            2 Communications
  bDeviceSubClass         2 Abstract (modem)
  bDeviceProtocol         0 None
  bMaxPacketSize0        16
  idVendor           0x22b8 Motorola PCS
  idProduct          0x600c A768i GSM Phone
  bcdDevice            0.00
  iManufacturer           3 Motorola
  iProduct                4 Motorola USBLAN
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           92
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          5 BLAN Net Cfg
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass         2 Communications
      bInterfaceSubClass     10 Mobile Direct Line
      bInterfaceProtocol      0
      iInterface              6 Comm/Data Intf
      CDC Header:
        bcdCDC               1.10
      CDC MDLM:
        bcdCDC               1.00
        bGUID               {bd3df074-c11e-7044-a367-7134c9f55437}
      CDC MDLM detail:
        bGuidDescriptorType  01
        bDetailData          00 01 00
      CDC Ethernet:
        iMacAddress                      1 126098dadcfc
        bmEthernetStatistics    0x00000000
        wMaxSegmentSize               1514
        wNumberMCFilters            0x0000
        bNumberPowerFilters              0
      UNRECOGNIZED:  07 24 0a 00 02 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval              10
Device Status:     0x0001
  Self Powered
Comment 1 Greg Kroah-Hartman 2006-03-26 16:14:49 UTC
David, any ideas?
Comment 2 David Brownell 2006-03-26 21:05:32 UTC
The data transfer paths of the "usbnet" driver haven't 
changed much in ages, and they behave fine with stress 
tests for other peripherals. 
 
Built the USB stack with CONFIG_USB_DEBUG and provide 
the relevant output.  With this phone and this chipset, 
that would include the /sys/class/usb_host/usb_hostN/async 
file at two points:  (a) right after the interface has 
been configured, which should show a queue of RX packets; 
and (b) when it's in this "slow" mode. 
 
My first guess would be that the phone itself has problems, 
since Linux is able to deliver packets faster than some 
peripheral controller drivers are able to handle them. 
 
 
Comment 3 Dmitry Nezhevenko 2006-03-27 03:29:24 UTC
Hi. Thanks for reply. After plugin device and when udev loaded modules this 
file is empty. After executing ifup usb0:

ed/f57be040 fs dev4 ep2in max 64 00401104 DATA0
        td f4cd3000 in 1514 cc=f urb f4beb1a0 (f0140000)
        td f4cd3040 in 1514 cc=f urb f4beba20 (f0140000)
        td f4cd3080 in 1514 cc=f urb f4beb820 (f0140000)
        td f4cd3100 in 1514 cc=f urb f4beb120 (f0140000)

I can see followed messages in syslog:

Mar 27 14:13:18 debian kernel: usb0: rxqlen 0 --> 4
Mar 27 14:13:28 debian kernel: usb0: no IPv6 routers present
Mar 27 14:14:39 debian kernel: ohci_hcd 0000:00:02.1: urb f4beba20 path 2 
ep2in 83160000 cc 8 --> status -75
Mar 27 14:14:39 debian kernel: ohci_hcd 0000:00:02.1: urb f4beb820 path 2 
ep2in 83160000 cc 8 --> status -75
Mar 27 14:14:39 debian kernel: ohci_hcd 0000:00:02.1: urb f4beb120 path 2 
ep2in 83160000 cc 8 --> status -75
Mar 27 14:14:40 debian kernel: ohci_hcd 0000:00:02.1: urb f4beb1a0 path 2 
ep2in 83160000 cc 8 --> status -75
Mar 27 14:14:41 debian kernel: ohci_hcd 0000:00:02.1: urb f4beba20 path 2 
ep2in 83160000 cc 8 --> status -75
Mar 27 14:14:42 debian kernel: ohci_hcd 0000:00:02.1: urb f4beb820 path 2 
ep2in 83160000 cc 8 --> status -75
Mar 27 14:14:46 debian kernel: ohci_hcd 0000:00:02.1: urb f4beb120 path 2 
ep2in 83160000 cc 8 --> status -75
Mar 27 14:14:53 debian kernel: ohci_hcd 0000:00:02.1: urb f4beb1a0 path 2 
ep2in 83160000 cc 8 --> status -75

As i say in my previous post, phone works well with 2.6.13 kernel and I never 
see messages like such before. There are one different: In 2.6.16 kernel udev 
loads 2 modules when i plug phone: cdc_ether and zaurus. But on 2.6.13 kernel 
there is no zaurus module and phone works with usbnet module. 
Comment 4 Dmitry Nezhevenko 2006-04-18 14:56:11 UTC
Looks like this is not kernel bug. It's work after changing MTU to 1000:

usb0      Link encap:Ethernet  HWaddr CE:FE:08:43:E2:5B
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1000  Metric:1
          RX packets:4196 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4329 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:797403 (778.7 KiB)  TX bytes:447712 (437.2 KiB)

So i think, that bug can be closed now.


Comment 5 Greg Kroah-Hartman 2006-04-18 15:13:56 UTC
Ok, thanks for the report, am closing.
Comment 6 David Brownell 2006-05-04 15:08:07 UTC
Created attachment 8026 [details]
tweak MTU for BLAN mode

See if this improves anything.	There were two reports of similar bugs, and on
a closer look I noticed that the BLAN code was not performing some tweaks that
the older code did.
Comment 7 Dmitry Nezhevenko 2006-05-11 01:20:33 UTC
Yes. this patch is useful. After applying and remove MTU=1000 from config file 
i got MTU=1494 and usblan works fine without any problems. 

Note You need to log in before you can comment on or make changes to this bug.