This is the first in a series of patches to get the CCR2004-1G-2XS-PCIe card working correctly under FreeBSD. Currently, this card does not correctly come up under FreeBSD, does not pass traffic if it does come up, and can corrupt memory leading to hangs of other network drivers.
This patch does not yet allow the card to pass traffic or otherwise function correctly as an NIC, but it is a step in that direction.
This card lies about what it is - it's not actually an Atheros AR8151, but merely (badly) emulates one in firmware. There's no PHY here, and the emulated MDIO doesn't give back a usable answer as to the link speed. This patch skips mii_attach entirely, and reads the link state/speed out of a firmware register on the card that holds the real link speed.