aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/netxen/netxen_nic_hdr.h
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2008-08-01 03:14:55 -0700
committerJeff Garzik <jgarzik@redhat.com>2008-08-07 02:11:07 -0400
commit24a7a45511f89959b4f1dc60a66260d09777901a (patch)
treeef48a3f9c6f65ba98f047b38937f71baef4a95ed /drivers/net/netxen/netxen_nic_hdr.h
parent4ad7a018cf4ac3cbad661c28c0f783ee0a6e3bf6 (diff)
netxen: fix link status, link speed
For NX3031, the phy is managed by firmware, so driver should avoid setting any phy registers. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_hdr.h')
-rw-r--r--drivers/net/netxen/netxen_nic_hdr.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/netxen/netxen_nic_hdr.h b/drivers/net/netxen/netxen_nic_hdr.h
index 3ce13e451aa..ccf6d70064b 100644
--- a/drivers/net/netxen/netxen_nic_hdr.h
+++ b/drivers/net/netxen/netxen_nic_hdr.h
@@ -724,6 +724,13 @@ enum {
#define XG_LINK_STATE_P3(pcifn,val) \
(((val) >> ((pcifn) * 4)) & XG_LINK_STATE_P3_MASK)
+#define P3_LINK_SPEED_MHZ 100
+#define P3_LINK_SPEED_MASK 0xff
+#define P3_LINK_SPEED_REG(pcifn) \
+ (CRB_PF_LINK_SPEED_1 + (((pcifn) / 4) * 4))
+#define P3_LINK_SPEED_VAL(pcifn, reg) \
+ (((reg) >> (8 * ((pcifn) & 0x3))) & P3_LINK_SPEED_MASK)
+
#define NETXEN_CAM_RAM_BASE (NETXEN_CRB_CAM + 0x02000)
#define NETXEN_CAM_RAM(reg) (NETXEN_CAM_RAM_BASE + (reg))
#define NETXEN_FW_VERSION_MAJOR (NETXEN_CAM_RAM(0x150))