<div dir="ltr">Ayuj and Jogarao you might also be interested to look at this one.</div><div class="gmail_extra"><br><div class="gmail_quote">On 1 December 2017 at 22:20, Radoslaw Biernacki <span dir="ltr"><<a href="mailto:radoslaw.biernacki@linaro.org" target="_blank">radoslaw.biernacki@linaro.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Asking for link speed for ThunderX Ethernet controller is not reliable<br>
since driver report error when the link is down. In fact we dont need<br>
to ask for link speed as Ethernet controllers can be easily identified<br>
by device name from lspci. The mapping will fuhrer filter out the PF<br>
and VF interfaces which does not have the interface name assigned.<br>
<br>
Fixes: 150716d93f5e ("framework crb: Appending only 10G devices for cavium")<br>
<br>
Signed-off-by: Radoslaw Biernacki <<a href="mailto:radoslaw.biernacki@linaro.org">radoslaw.biernacki@linaro.org</a><wbr>><br>
---<br>
 framework/crb.py | 11 ++---------<br>
 1 file changed, 2 insertions(+), 9 deletions(-)<br>
<br>
diff --git a/framework/crb.py b/framework/crb.py<br>
index dd29a8b..36b1ffe 100644<br>
--- a/framework/crb.py<br>
+++ b/framework/crb.py<br>
@@ -268,20 +268,13 @@ class Crb(object):<br>
         Look for the NIC's information (PCI Id and card type).<br>
         """<br>
         out = self.send_expect(<br>
-            "lspci -Dnn | grep -i eth", "# ", alt_session=True)<br>
+            "lspci -Dnn | grep -i 'Ethernet controller'", "# ", alt_session=True)<br>
         rexp = r"([\da-f]{4}:[\da-f]{2}:[\da-<wbr>f]{2}.\d{1}) .*Eth.*?ernet .*?([\da-f]{4}:[\da-f]{4})"<br>
         pattern = re.compile(rexp)<br>
         match = pattern.findall(out)<br>
         self.pci_devices_info = []<br>
         for i in range(len(match)):<br>
-            #check if device is cavium and check its linkspeed, append only if it is 10G<br>
-            if "177d:" in match[i][1]:<br>
-                linkspeed = "10000"<br>
-                nic_linkspeed = self.send_command("cat /sys/bus/pci/devices/%s/net/*/<wbr>speed" % match[i][0])<br>
-                if nic_linkspeed == linkspeed:<br>
-                    self.pci_devices_info.append((<wbr>match[i][0], match[i][1]))<br>
-            else:<br>
-                self.pci_devices_info.append((<wbr>match[i][0], match[i][1]))<br>
+            self.pci_devices_info.append((<wbr>match[i][0], match[i][1]))<br>
<br>
     def pci_devices_information_<wbr>uncached_freebsd(self):<br>
         """<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.4<br>
<br>
</font></span></blockquote></div><br></div>