Re: [PATCH v2 3/4] net: stmmac: add support for Intel Quark X1000

From: David Miller
Date: Wed Sep 17 2014 - 00:55:41 EST


From: "Kweh, Hock Leong" <hock.leong.kweh@xxxxxxxxx>
Date: Wed, 17 Sep 2014 02:41:39 +0000

> Thanks for the pointer. I did a quickly checking on the class number to see if
> I could use it for differentiation the ports number. Whereas I found them
> both have the same class number as well. Below shows the "lspci" dump to
> all the PCI devices on Quark X1000 Galileo board (Ethernet controllers are
> 00:14.6 and 00:14.7). Very unfortunately we are unlikely to use the class
> number as well as pci_device_id for the differentiation.
...
> 00:14.6 "Class 0200" "8086" "0937" "8086" "0937"
> 00:14.7 "Class 0200" "8086" "0937" "8086" "0937"

Are you kidding me? It's a perfect way to identify this device, it
properly uses PCI_CLASS_NETWORK_ETHERNET (0x0200) in both cases and
this will not match any other function on this PCI device at all.

Please do as I suggested and use the PCI class for the differentiation
and matching during probing.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/