USB ethernet CDC driver

Sam Lawrance boris at brooknet.com.au
Mon May 24 06:51:34 PDT 2004


After having a bit more of a look through the archives and more
searching it's apparent this driver has been written a number of times
over independently by different people (and for different reasons).

I will try to make a bit of a collation effort and sort out the good
bits.

Sam

On Mon, 2004-05-24 at 11:14, Craig Boston wrote:
> On Sunday 23 May 2004 7:25 pm, Sam Lawrance wrote:
> > That would be great, I would love to take a look at it.
> 
> I'll go ahead and copy the list in case anybody else is interested...
> 
> You can grab the source at
> http://www.gank.org/freebsd/cdce.tar.gz
> 
> I'm planning to eventually make a FreeBSD projects page -- I have a few local 
> patches and such I'd like to share.  If and when I ever get time to do that, 
> I'll move this in with it, but the above link should work until then.
> 
> The list archives will have to suffice as documentation until then, here's a 
> few random comments about it:
> 
> * It's set up as a standalone kernel module.  If you have the kernel source on 
> your system it should be as simple as "cd cdce; make all && make install".  
> That will dump it in /boot/kernel/if_cdce.ko, which can be loaded by any of 
> the normal means.
> 
> * When you plug in the device, if all goes well, you should end up with a 
> cdce0 network device.  Just ifconfig it and go.
> 
> * It registers itself as the handler for the CDC Ethernet class.  If your 
> device doesn't report itself as that, you may have to add a specific device 
> ID for it in the cdce_devs[] structure (get the values from usbdevs -v).  If 
> it complains about not being able to find endpoints, try adding it in there 
> with the CDCE_NO_UNION flag.  Linux on the Zaurus seems to be slightly 
> non-conformant to the spec, so it may be similar on the iPaq.
> 
> * The driver generates a random MAC address for the local end rather than 
> trying to read it from the device.  While incorrect for real Ethernet 
> adapters, it seems to be fine (and may even be necessary) for these kinds of 
> point-to-point connections.
> 
> * There is special handling for the Zaurus's nonstandard frame format, but it 
> should be off by default for other devices.  This hasn't been tested yet, 
> though :)
> 
> * The driver is targeted at -CURRENT.  It was originally developed against 
> 5.2-RELEASE sources and should still compile fine on those systems.  It would 
> probably require some work to back-port to stable though.
> 
> * Not entirely sure what to do about the copyright message -- I borrowed 
> heavily from the if_axe and if_aue drivers...
> 
> * BSD license, so feel free to do whatever with it :)
> 
> * Also applies is my standard disclaimer: It works fine on my system, but may 
> cause your toaster to explode.  I used to sometimes get panics on detach, but 
> I think the problem is fixed now.  Haven't had one in quite a while, even if 
> I unplug it while transferring something.
> 
> Good luck!
> 
> Craig
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
> 



More information about the freebsd-hackers mailing list