]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
NTB: MFV 5ae0beb6: Enable link for Intel root port mode in probe
authorcem <cem@FreeBSD.org>
Tue, 20 Oct 2015 01:46:14 +0000 (01:46 +0000)
committercem <cem@FreeBSD.org>
Tue, 20 Oct 2015 01:46:14 +0000 (01:46 +0000)
We skip actually bringing up Rootport/Transparent configurations, so
most of this doesn't apply.  Original Linux commit log:

Link training should be enabled in the driver probe for root port mode.
We should not have to wait for transport to be loaded for this to
happen.  Otherwise the ntb device will not show up on the transparent
bridge side of the link.

Authored by: Dave Jiang
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

sys/dev/ntb/ntb_hw/ntb_hw.c

index a535f7ff1dbb7804e2c2cd259f8825bc411afa71..0038ac808e5e1a4a28426a9cace07fc246e3c612 100644 (file)
@@ -1481,8 +1481,11 @@ static inline bool
 link_is_up(struct ntb_softc *ntb)
 {
 
-       if (ntb->type == NTB_XEON)
+       if (ntb->type == NTB_XEON) {
+               if (ntb->conn_type == NTB_CONN_TRANSPARENT)
+                       return (true);
                return ((ntb->lnk_sta & NTB_LINK_STATUS_ACTIVE) != 0);
+       }
 
        KASSERT(ntb->type == NTB_SOC, ("ntb type"));
        return ((ntb->ntb_ctl & SOC_CNTL_LINK_DOWN) == 0);