USB Ethernet

USB Ethernet

Post by vsyn » Sat, 29 Apr 2000 04:00:00



I just got FreeBSD up and running on my i-opener.  I haven't used
FreeBSD in several years, so this is somewhat of an adventure.  =)

I am trying to set up network access with Inland's USB Ethernet
adapter.  I recompiled the kernel, adding in UHCI hub support and kue
USB Ethernet support.  The message "ugen0: USB-Ethernet <blah blah>"
now appears in the dmesg log.

I can't get the interface to activate, however...  Typing "ifconfig
kue0" and "ifconfig ugen0" both gave me "no such interface" or
similar.  I did notice that ugen? is the /dev entry for generic USB
devices, so it probably wouldn't be the interface name, right?

Is there another step?  A different interface name?  Help...

--
vsync
http://quadium.net/
Orjner.

 
 
 

USB Ethernet

Post by Dan McGrego » Sat, 29 Apr 2000 04:00:00



Quote:> Is there another step?  A different interface name?  Help...

Try a "/sbin/ifconfig -a" and see what appears.  You should see something
like this:
-- Note I am on a NetBSD system right now,  so this may not be accurate
for FreeBSD --

ep0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:10:5a:04:b5:8f
        media: Ethernet 10baseT
        inet 24.66.252.226 netmask 0xffffff00 broadcast 255.255.255.255

This is a 3Com Etherlink III (3c509).

ne0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:00:21:b8:86:60
        media: Ethernet manual
        inet 10.13.100.1 netmask 0xff000000 broadcast 10.255.255.255

This is a generic NE2000 compatible card.

lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 32976
        inet 127.0.0.1 netmask 0xff000000

This is my loopback interface

ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
ppp1: flags=8010<POINTOPOINT,MULTICAST> mtu 1500

These are kernel ppp interfaces

sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 296
sl1: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 296

These are slip interfaces

strip0: flags=0<> mtu 1100
strip1: flags=0<> mtu 1100

These are an interface for a packet radio system which I don't own.

tun0: flags=10<POINTOPOINT> mtu 1500
tun1: flags=10<POINTOPOINT> mtu 1500

These are tunnel devices, used for User-PPP.

gre0: flags=8010<POINTOPOINT,MULTICAST> mtu 1450
gre1: flags=8010<POINTOPOINT,MULTICAST> mtu 1450

Some form of IP tunneling.

ipip0: flags=8010<POINTOPOINT,MULTICAST>
ipip1: flags=8010<POINTOPOINT,MULTICAST>

IP in IP tunnel devices

eon0: flags=3<UP,BROADCAST> mtu 1500

I have no idea, and there is no manual page for "eon"

But anyway, look for what could be a USB Nic in there.  It should stick
out like a sore thumb, because there is only one of them.


---
My brother-in-law has found a way to make ends meet.  He goes around
with his head stuck up his ass.

 
 
 

USB Ethernet

Post by vsyn » Sat, 29 Apr 2000 04:00:00




> > Is there another step?  A different interface name?  Help...

> Try a "/sbin/ifconfig -a" and see what appears.  You should see something
> like this:

Tried this.  As I recall (since that box is off now), I had the
loopback, ppp, several tunnels, and IP over parallel.  Nothing
different between when the adapter is plugged in or not.

--
vsync
http://quadium.net/
Orjner.

 
 
 

USB Ethernet

Post by Mikko Tyolajar » Sat, 29 Apr 2000 04:00:00





>> > Is there another step?  A different interface name?  Help...

>> Try a "/sbin/ifconfig -a" and see what appears.  You should see something
>> like this:
>Tried this.  As I recall (since that box is off now), I had the
>loopback, ppp, several tunnels, and IP over parallel.  Nothing
>different between when the adapter is plugged in or not.

Is "usbd" running?  (usbd_enable="YES" in /etc/rc.conf).

   /Mikko
--

 RSA Security

 
 
 

USB Ethernet

Post by vsyn » Sat, 29 Apr 2000 04:00:00






> >> > Is there another step?  A different interface name?  Help...

> >> Try a "/sbin/ifconfig -a" and see what appears.  You should see something
> >> like this:

> >Tried this.  As I recall (since that box is off now), I had the
> >loopback, ppp, several tunnels, and IP over parallel.  Nothing
> >different between when the adapter is plugged in or not.

> Is "usbd" running?  (usbd_enable="YES" in /etc/rc.conf).

Yes, and messages appear when I connect and disconnect devices.  My
USB Zip250 drive is also working flawlessly.

--
vsync
http://quadium.net/
Orjner.

 
 
 

USB Ethernet

Post by vsyn » Sun, 30 Apr 2000 04:00:00



> You have to have, in your kernel, the -correct- driver for the
> USB-Ethernet converter.  If the device is a Kawasaki converter, then
> you need to apply a patch to usbdevs.h and usbdevs_data.h.  See
> http://www.freebsd.org/cgi/query-pr.cgi?pr=17815.  I had trouble with
> this diff patch, so instead I did minor surgery to the files if_kue.c,
> usbdevs, usbdevs.h, and usbdevs_data.h.  I'll send them in case of
> need.

Thanks...  It's all working now!

I have managed to discover the basic ins and outs of this OS the hard
way, as is usual for me...  =)

Quote:> Question for smart people:  how do you run the awk script that
> generates usbdevs.h and usbdevs_data.h?  I fiddled with it and all I
> got is one beep and an error per attempt.  

make -f Makefile.usbdevs

--
vsync
http://quadium.net/ - last updated Fri Apr 28 18:03:25 MDT 2000
Orjner.

 
 
 

USB Ethernet

Post by vsyn » Sun, 30 Apr 2000 04:00:00




> > You have to have, in your kernel, the -correct- driver for the
> > USB-Ethernet converter.  If the device is a Kawasaki converter, then
> > you need to apply a patch to usbdevs.h and usbdevs_data.h.  See
> > http://www.freebsd.org/cgi/query-pr.cgi?pr=17815.  I had trouble with
> > this diff patch, so instead I did minor surgery to the files if_kue.c,
> > usbdevs, usbdevs.h, and usbdevs_data.h.  I'll send them in case of
> > need.

> Thanks...  It's all working now!

Well, it's mostly working...  Every so often I get a message about
'Watchdog failure on kue0', the interface dies, and I have to
disconnect and reconnect the adapter.

Is this a bug?  A really cheap adapter that I should exchange?

--
vsync
http://quadium.net/ - last updated Sat Apr 29 01:17:46 MDT 2000
Orjner.

 
 
 

USB Ethernet

Post by vsyn » Mon, 01 May 2000 04:00:00




> [Context, for those of you who were out drinking while the cartoon was
> running, is enabling USB kue0 on an I-Opener.]

> [snip]

> > Well, it's mostly working...  Every so often I get a message about
> > 'Watchdog failure on kue0', the interface dies, and I have to
> > disconnect and reconnect the adapter.

> > Is this a bug?  A really cheap adapter that I should exchange?

> Apparently it is a bug, and not just a USB or kue0 bug.  Now that you
> have mentioned it I have removed the chicken's foot I suspended over
> the converter.

Okay.  I may still exchange the adapter, though, as it seems to have
difficulties connecting to certain 10/100 hubs.

--
vsync
http://quadium.net/ - last updated Sat Apr 29 23:36:54 MDT 2000
Orjner.

 
 
 

1. Solaris USB driver for Linksys USB Ethernet controller (USB200M)

I have been trying to write a Solaris USB driver for USB200M Linksys
card.
The driver uses GLD for all DLPI related stuff.
The driver seems to work - but there are two problems that are related
to Solaris USB kernel framework and that affect the driver's
performance:

1. USB200M has for endpoints (control, interrupt, bulk out and bulk
in). Both bulk endpoints have MaxPacketSize of 64. If request is made
to receive 64 bytes (or less - SHORT_XFER) from the bulk in pipe, the
driver works fine, albeit very slow, because it has to wait for an
interrupt for each 64 byte message. If you attempt to set Max Packet
Size to ETHERMAX (1514) and try to get a longer message, USB framework
returns only the LAST message block of the message - basically, if you
are supposed to get 257 bytes, you'd get only 1 byte message (257 % 64
= 1). This looks like a defect to me... Looking at the mblk_t and the
linked struct datab does not point to any other mblk_t...
At the same time, sending of 1514 byte messages works just fine. The
end result - data transfer FROM Solaris machine is ~350k/sec, TO
Solaris machine is ~30k/sec.

2. When trying to unload the driver, it calls usb_pipe_close for all
data pipes (bulk in and bulk out). There is almost always a read
request active for the bulk in pipe, to make sure that we do not miss
the incoming data. What happens is that sometimes usb_pipe_close
deadlocks on a condition variable. Using usb_pipe_reset before
usb_pipe_close does not help. Also, attempting to use usb_pipe_abort
before usb_pipe_close also deadlocks the driver, even in the same
stack. All other kernel threads are just waiting for something else,
there are no other threads in the driver's context.

Does anyone have any idea what is going on in the Solaris USB kernel
side? I have tried to get the source code, but to no avail. Sun's SCSL
does not list Solaris anymore.

Comments and suggestions are much appreciated.

2. Printer Scheduling problem

3. USB + Ethernet firewall

4. PCI sound card recommendations?

5. USB Ethernet Adapter PRE Install

6. Satan-1.1.1 from HELL !!!

7. Any Hope for a SMC 2202 USB Ethernet Adapter?

8. Quota question

9. linksys USB ethernet adapter

10. 3Com USB-Ethernet on old laptop

11. USB Ethernet

12. Farallon Netline 10/100 USB Ethernet Adapter(PN796) with RedHat 7.1

13. Help configuring USB ethernet device