> Yep, registering multiple interfaces is wrong. The first board I tested > against only had a single MAC enabled (they can be disabled/hidden via > straps) so it just happened to work.
Hi Steve Can you hide any/all via straps, or is 00.0 always guaranteed to exist? > The Intel C3xxx family of SoCs have up to four ixgbe MACs. These are > structured as two devices of two functions each on fixed internal root > ports. > > from lspci: > <snip> > +-16.0-[05]--+-00.0 > | \-00.1 > +-17.0-[06]--+-00.0 > | \-00.1 > <snip> Is there any other hardware resource which is shared between the MAC interfaces? I'm just wondering if the driver has already solved this once. Is there an EEPROM per interface for the MAC address, or one shared EEPROM? Ah, how about using the 'cards_found' found variable. It is not perfect, in that it is not decremented in ixgb_remove(), and i wonder about race conditions since there does not appear to be any lock when it is incremented. But if cards_found == 0, register the MDIO bus. Andrew