bringingup two ethernet interfaces on BeagleBoard running 2.6.29 kernel

Hi,

  I am trying to bringup two ethernet interfaces on Beagle board
running 2.6.29 kernel.
Ethernet connected through USB HUB, since there is no builtin
ETHERNET support on Beagle Board( REV B5)

1) Only one ethernet interface connected to USB HUB works at a time
(comes up as eth0).

2) The moment i connect one more ethernet interface , it crashes
giving following dump

     WARNING: at drivers/usb/musb/musb_host.c:128 musb_h_tx_flush_fifo
+0x94/0xcc()
Could not flush host TX0 fifo: csr: 000a
Modules linked in:
[<c002ee78>] (dump_stack+0x0/0x14) from [<c004f318>] (warn_slowpath
+0x70/0x8c)
[<c004f2a8>] (warn_slowpath+0x0/0x8c) from [<c0225df4>]
(musb_h_tx_flush_fifo+0x94/0xcc)
r3:00000000 r2:c038fd70
r7:ffffffff r6:d80ab100 r5:0000000a r4:0000000a
[<c0225d60>] (musb_h_tx_flush_fifo+0x0/0xcc) from [<c0226b1c>]
(musb_cleanup_urb+0xc0/0x10c)
[<c0226a5c>] (musb_cleanup_urb+0x0/0x10c) from [<c022715c>]
(musb_urb_dequeue+0x180/0x1bc)
[<c0226fdc>] (musb_urb_dequeue+0x0/0x1bc) from [<c02093a8>]
(unlink1+0xa0/0xac)
[<c0209308>] (unlink1+0x0/0xac) from [<c0209cc4>] (usb_hcd_unlink_urb
+0x58/0x74)
r9:00000000 r8:c6df3cc4 r7:fffffffe r6:c7880ee0 r5:00000000
r4:60000013
[<c0209c6c>] (usb_hcd_unlink_urb+0x0/0x74) from [<c020a870>]
(usb_kill_urb+0x50/0xf0)
r7:c7880ee0 r6:c7880eec r5:c6df3c80 r4:00000000
[<c020a820>] (usb_kill_urb+0x0/0xf0) from [<c020b864>]
(usb_start_wait_urb+0x80/0xac)
r7:00001388 r6:c7880ee0 r5:c6df3c80 r4:00000000
[<c020b7e4>] (usb_start_wait_urb+0x0/0xac) from [<c020ba74>]
(usb_control_msg+0xc8/0xec)
r8:00000040 r7:00000000 r6:00000000 r5:00000000 r4:c78f66c0
[<c020b9ac>] (usb_control_msg+0x0/0xec) from [<c01e0830>]
(asix_write_cmd+0x8c/0xa4)
[<c01e07a4>] (asix_write_cmd+0x0/0xa4) from [<c01e0e80>]
(asix_mdio_read+0x48/0xcc)
[<c01e0e38>] (asix_mdio_read+0x0/0xcc) from [<c01cf584>]
(mii_ethtool_gset+0x11c/0x258)
r8:0000c004 r7:c78ce000 r6:0000c004 r5:c78ce440 r4:c6df3dac
[<c01cf468>] (mii_ethtool_gset+0x0/0x258) from [<c01e08dc>]
(ax88772_link_reset+0x34/0x74)
[<c01e08a8>] (ax88772_link_reset+0x0/0x74) from [<c01e8138>]
(usbnet_open+0x74/0x244)
r5:c02f6ab0 r4:c78ce360
[<c01e80c4>] (usbnet_open+0x0/0x244) from [<c025ae8c>] (dev_open
+0xa0/0xfc)
r8:c78af1c0 r7:00001002 r6:c78ce2f8 r5:c78ce030 r4:c78ce000
[<c025adec>] (dev_open+0x0/0xfc) from [<c0259efc>] (dev_change_flags
+0x98/0x168)
r7:00001002 r6:00001043 r5:00000041 r4:c78ce000
[<c0259e64>] (dev_change_flags+0x0/0x168) from [<c02978cc>]
(devinet_ioctl+0x370/0x778)
r7:c6df3e78 r6:00000000 r5:c6d751a0 r4:00008914
[<c029755c>] (devinet_ioctl+0x0/0x778) from [<c0298548>] (inet_ioctl
+0xcc/0xf4)
[<c029847c>] (inet_ioctl+0x0/0xf4) from [<c024bc0c>] (sock_ioctl
+0x1d8/0x228)
[<c024ba34>] (sock_ioctl+0x0/0x228) from [<c00aaeb4>] (vfs_ioctl
+0x34/0x78)
r7:c782a620 r6:00000003 r5:beff89a8 r4:00008914
[<c00aae80>] (vfs_ioctl+0x0/0x78) from [<c00ab3fc>] (do_vfs_ioctl
+0x4d8/0x51c)
r5:beff89a8 r4:c782a620
[<c00aaf24>] (do_vfs_ioctl+0x0/0x51c) from [<c00ab480>] (sys_ioctl
+0x40/0x64)
[<c00ab440>] (sys_ioctl+0x0/0x64) from [<c002ad60>] (ret_fast_syscall
+0x0/0x2c)
r7:00000036 r6:000001c3 r5:00000004 r4:000a030f
---[ end trace 72e1ac4fbdea52fc ]---
eth1: Failed to enable software MII access

please reply with your suggestions or solution

Thanks & Regards,
Manoj

I have a number of usb-ethernet dongles so I can run a quick test tomorrow to see if its MUSB or your ethernet dongle driver…

I seem to recall there being a bug with the endpoint scheduling code. It
showed up on another MUSB implementation. I don't have that code handy but
IIRC, the fix had to do with some of the bits in the CSR register not being
cleared properly on the completion of a transfer in the shared point case
which would cause the hardware endpoint to wedge as shown in the trace.

Unless it has changed or I am confusing implementations, the code will use a
single hardware end point for the bulk transfers. Using 2 ethernet interfaces
would require scheduling of the hardware bulk transfer endpoint between the 2
devices.

FWIW: I have never tried two 802.3 ethernet dongles (as I have only
one), but I had a situation where I had one 802.3 dongle and two
802.11 dongles. This was on something like C0 I think (could also have
been C2). It has been a while since I did that :slight_smile: