From a9ee805d450eb132840da68c5fcfe44403b41102 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Tue, 22 Sep 2015 12:56:34 +0000 Subject: [PATCH] arm64 ThunderX PCIe workaround: enumerate only one slot for now Otherwise an em(4) NIC is detected 32 times. Submitted by: wma@semihalf.com Obtained from: Semihalf Differential Revision: https://reviews.freebsd.org/D3706 --- sys/arm64/cavium/thunder_pcie_pem.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/arm64/cavium/thunder_pcie_pem.c b/sys/arm64/cavium/thunder_pcie_pem.c index 23f1446b8d22..f36057b93ff4 100644 --- a/sys/arm64/cavium/thunder_pcie_pem.c +++ b/sys/arm64/cavium/thunder_pcie_pem.c @@ -183,8 +183,16 @@ static int thunder_pem_maxslots(device_t dev) { +#if 0 /* max slots per bus acc. to standard */ return (PCI_SLOTMAX); +#else + /* + * ARM64TODO Workaround - otherwise an em(4) interface appears to be + * present on every PCI function on the bus to which it is connected + */ + return (0); +#endif } static int