mii: Allow NIC drivers to pass more information to MII probe
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 1 Jul 2012 23:17:30 +0000 (07:17 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 1 Jul 2012 23:29:01 +0000 (07:29 +0800)
commit6435039f813dc3fe6fb867625f1b7e0fd76fec7d
tree70da4d7f2375ba1640200a25ee98306a0d713b4a
parent22127a072b3437717894d25dff7a1dc620f3ba2f
mii: Allow NIC drivers to pass more information to MII probe

- mii_capmask, which is used to mask out uninstended BMSR bits.
- At which PHYs that MII should perform probing and attching
  (mii_probe_args.mii_probemask).
- mii_flags, which will be used for future mii flow control support.

Th he above information could only be passed using new mii_probe(),
it should be used in the following way:

struct mii_probe_args mii_args;

mii_probe_args_init(&mii_args, ifmedia_upd, ifmedia_sts);
/*
 * Adjust mii_args if necessary
 */
error = mii_probe(dev, &mii_dev, &mii_args);

Inspired-by: FreeBSD 213878
sys/dev/netif/mii_layer/mii.c
sys/dev/netif/mii_layer/miivar.h