summaryrefslogtreecommitdiff
path: root/drivers/net/cxgb3/adapter.h
diff options
context:
space:
mode:
authorDivy Le Ray <divy@chelsio.com>2009-07-07 19:48:43 +0000
committerDavid S. Miller <davem@davemloft.net>2009-07-08 10:54:23 -0700
commit5e659515569220701bfe3c8936dcab67554cc286 (patch)
treeb8ecba536862e83ff0792e777d949e6f750b793c /drivers/net/cxgb3/adapter.h
parentcfe2462c6af309ee70e4aeefa55cae976071b9e2 (diff)
cxgb3: AEL2020 phy support update
We don't always see the link status update interrupt when we come out of reset and the peer is up. Check and report the link status right before enabling interrupts. Also fix LED settings, to get a consistent link status. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb3/adapter.h')
-rw-r--r--drivers/net/cxgb3/adapter.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/cxgb3/adapter.h b/drivers/net/cxgb3/adapter.h
index 1694fad38720..bfa312d43d86 100644
--- a/drivers/net/cxgb3/adapter.h
+++ b/drivers/net/cxgb3/adapter.h
@@ -276,6 +276,14 @@ static inline struct port_info *adap2pinfo(struct adapter *adap, int idx)
return netdev_priv(adap->port[idx]);
}
+static inline int phy2portid(struct cphy *phy)
+{
+ struct adapter *adap = phy->adapter;
+ struct port_info *port0 = adap2pinfo(adap, 0);
+
+ return &port0->phy == phy ? 0 : 1;
+}
+
#define OFFLOAD_DEVMAP_BIT 15
#define tdev2adap(d) container_of(d, struct adapter, tdev)