Atheros NIC not detected

I have an Atheros AR9380 Mini PCIE NIC connected to the carried board’s pcie x4 port via a mini pcie to pcie x1 adapter. But, the NIC does not show up in lspci. The output from sudo lspci -vvv is empty and dmesg does not show any error messages or anything, it is as if the card was not connected. I am running L4T 28.2.1, I also build and installed ath9k driver. I tested the NIC with the adapter on a desktop and it works fine. I also tried using another TX2 and got the same issue.

Is it possible to share the links where you purchased this card (&adapter) from?
Can you please share the output of ‘dmesg | grep -i pci’?

Got the following from ‘dmesg | grep -i pci’

PCI I/O : 0xffffffbffae00000 - 0xffffffbffbe00000   (    16 MB)
[    0.141751] node /plugin-manager/fragment-500-pcie-config match with board >=3310-1000-500
[    0.142465] node /plugin-manager/fragment-500-e3325-pcie match with board >=3310-1000-500
[    0.260618] iommu: Adding device 10003000.pcie-controller to group 50
[    0.403357] PCI: CLS 0 bytes, default 128
[    7.806343] tegra-pcie 10003000.pcie-controller: 4x1, 1x1 configuration
[    7.819085] tegra-pcie 10003000.pcie-controller: PCIE: Enable power rails
[    7.828443] tegra-pcie 10003000.pcie-controller: probing port 0, using 4 lanes
[    7.839712] tegra-pcie 10003000.pcie-controller: probing port 2, using 1 lanes
[    8.270119] tegra-pcie 10003000.pcie-controller: link 0 down, retrying
[    8.676142] tegra-pcie 10003000.pcie-controller: link 0 down, retrying
[    9.086122] tegra-pcie 10003000.pcie-controller: link 0 down, retrying
[    9.088157] tegra-pcie 10003000.pcie-controller: link 0 down, ignoring
[    9.478110] tegra-pcie 10003000.pcie-controller: link 2 down, retrying
[    9.876125] tegra-pcie 10003000.pcie-controller: link 2 down, retrying
[   10.262099] tegra-pcie 10003000.pcie-controller: link 2 down, retrying
[   10.272625] tegra-pcie 10003000.pcie-controller: link 2 down, ignoring
[   10.281032] tegra-pcie 10003000.pcie-controller: PCIE: no end points detected
[   10.290630] tegra-pcie 10003000.pcie-controller: PCIE: Disable power rails

I got this NIC and this has some more details about the NIC

I tried using the following two adapters, neither of them worked

Link is down. I’m afraid debugging this issue needs to have a card locally available. we’ll see if we can procure the card for debugging, hence it might take a little while

On some of the Atheros WiFi cards, we found that there is a pull-down resistance because of which Tegra’s 47K pull-up resistance is not effective in pulling the pex_rst high.
Can you please measure voltage on pex-rst line for both asserted and de-asserted states?

I am not sure which pins I am supposed to measure the voltage for. Can you give me any references for measuring the voltage on the pex_rst line?

you can use as a reference. pex_rst signal is A11 pin

I measured the voltage, at the beginning of boot its 0 then it goes to about 3.12v for a second and then returns to 0.

3.12V seems to be the expected value.
Can you please try with the following patch which will make sure that you would at least see the root port, and after you get the console, please try ‘sudo lspci -vv | grep -i dlactive’ and give the output?

diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index fd74130505a2..b5a5af9bb2b9 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -2539,6 +2539,9 @@ static void tegra_pcie_check_ports(struct tegra_pcie *pcie)
+               } else {
+                       port->status = 1;
+                       pcie->num_ports++;
                port->ep_status = 0;
                dev_info(pcie->dev, "link %u down, ignoring\n", port->index);

Also, if you happen to see ‘DLActive+’ instead of ‘DLActive-’ for the root port, it means that link is eventually coming up and rootport is not waiting for enough time. To solve this issue, you can apply following patch.

diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index fd74130505a2..e70edff3da69 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -2159,7 +2159,7 @@ EXPORT_SYMBOL(tegra_pcie_port_disable_per_pdev);
  * can result in the increase of the bootup time as there are big timeout
  * loops.
-#define TEGRA_PCIE_LINKUP_TIMEOUT      200     /* up to 1.2 seconds */
+#define TEGRA_PCIE_LINKUP_TIMEOUT      1000    /* up to 1.2 seconds */
 static bool tegra_pcie_port_check_link(struct tegra_pcie_port *port)
        struct device *dev = port->pcie->dev;

Even with all this, if you still see ‘DLActive-’, let us know, we’ll see what else debugging can be done.

Got the following:

LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-

There is no entry for the NIC.

OK. So, even after increasing the delay, there is no link up with endpoint. I think at this point, we need to connect PCIe protocol analyzer and see what is happening on the link. If you have access to one, would you be able to share the trace?

I don’t have access to a PCIe protocol analyzer.

Not sure what the issue is, but I switched out the AR9380 with a AR9590 NIC. The new NIC works fine with the ath9k driver.