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

From: Kweh, Hock Leong
Date: Tue Sep 16 2014 - 22:43:28 EST


> -----Original Message-----
> From: David Miller [mailto:davem@xxxxxxxxxxxxx]
> Sent: Wednesday, September 17, 2014 3:01 AM
> From: "Kweh, Hock Leong" <hock.leong.kweh@xxxxxxxxx>
> Date: Mon, 15 Sep 2014 12:42:03 +0000
>
> > The only things to differentiate them is PCI BUS DEVICE FUNCTION
> > (Bus:Dev:Func) number which are fix numbers 00:20:6 for port 1 and
> > 00:20:7 for port 2 stated in Quark X1000 datasheet.
>
> Match on the PCI device class, which must be
> PCI_CLASS_NETWORK_ETHERNET or similar.
>
> The pci_device_id used for probing supports matching on this directly.
> .

Hi David,

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.
Thanks.

root@quark:~# lspci -m
00:00.0 "Class 0600" "8086" "0958" "8086" "095e"
00:14.0 "Class 0805" "8086" "08a7" "8086" "08a7"
00:14.1 "Class 0700" "8086" "0936" "8086" "0936"
00:14.2 "Class 0c03" "8086" "0939" "8086" "0939"
00:14.3 "Class 0c03" "8086" "0939" "8086" "0939"
00:14.4 "Class 0c03" "8086" "093a" "8086" "093a"
00:14.5 "Class 0700" "8086" "0936" "8086" "0936"
00:14.6 "Class 0200" "8086" "0937" "8086" "0937"
00:14.7 "Class 0200" "8086" "0937" "8086" "0937"
00:15.0 "Class 0c80" "8086" "0935" "8086" "0935"
00:15.1 "Class 0c80" "8086" "0935" "8086" "0935"
00:15.2 "Class 0c80" "8086" "0934" "8086" "0934"
00:17.0 "Class 0604" "8086" "11c3" "8086" "11c3"
00:17.1 "Class 0604" "8086" "11c4" "8086" "11c4"
00:1f.0 "Class 0601" "8086" "095e" "8086" "095e"
root@quark:~# lspci -k
00:00.0 Class 0600: 8086:0958 iosf_mbi_pci
00:14.0 Class 0805: 8086:08a7 sdhci-pci
00:14.1 Class 0700: 8086:0936 serial
00:14.2 Class 0c03: 8086:0939
00:14.3 Class 0c03: 8086:0939 ehci-pci
00:14.4 Class 0c03: 8086:093a ohci-pci
00:14.5 Class 0700: 8086:0936 serial
00:14.6 Class 0200: 8086:0937 stmmaceth
00:14.7 Class 0200: 8086:0937
00:15.0 Class 0c80: 8086:0935
00:15.1 Class 0c80: 8086:0935
00:15.2 Class 0c80: 8086:0934
00:17.0 Class 0604: 8086:11c3 pcieport
00:17.1 Class 0604: 8086:11c4 pcieport
00:1f.0 Class 0601: 8086:095e
root@quark:~#


Regards,
Wilson

--
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/