I've posted a webrev of my MII work here:
http://cr.opensolaris.org/~gdamore/mii/
This is fully functional -- at least it appears to be with the devices
I've tested -- afe, iprb, nxge. I've also converted elxl, but it turns
out that my elxl device doesn't use MII -- its an old 10Base-T only
device. :-(
Obviously the code for iprb and elxl are closed. Nothing I can do about
that.
So, apart from removing a *lot* of code from drivers (and it doesn't
look like much yet, because I've only barely scratched the surface for
drivers), it also brings some big benefts:
* automatic support for SunVTS netlbtest loopback test (I tested
this with afe... very cool. I'll do iprb on Monday. :-) This will
broaden the reach of sunvts by a lot. (Hmmm.... I need to go make some
loopback cables!)
* automatic support for the various ndd, dladm, etc. tunables. Full
Brussels support! This means that drivers like iprb, which used to be a
boot-time-only configuration thing (well, you could update_drv(1M) --
now get full support for dynamic run time configuration.
* automatic support for a bunch of kstats
* greatly simplified logic for the pause/asymmetric pause handling.
(It took me quite a while to figure this out -- the Brussels APIs for
these are *not* obvious. I don't think mere mortals were meant to
understand how configuration of pause and asymmetric pause work. :-p
So, the review is not final. I still have to do something about dnet --
I'll probably just copy over the original mii.c and headers into dnet's
private directory. (Too much trouble to properly convert it right now
-- especially since Steve Stallion has a GLDv3 conversion in the
wings.) And I need to get packaging done, and probably convert a few
more drivers (hme would be *very* nice, but rtls and dmfe would be high
yield for very small effort -- especially rtls.)
I'm very interested in getting review comments -- but please focus on
architectural concerns or considerations. The API for MAC drivers is in
sys/mii.h, and the API for vendor specific PHYs (not nearly as well
documented) is in miipriv.h.
Thanks!
- Garrett
_______________________________________________
networking-discuss mailing list
[email protected]