summaryrefslogtreecommitdiff
path: root/drivers/net/sky2.h
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-09-06 23:44:53 +0400
committerJeff Garzik <jeff@garzik.org>2006-09-13 21:27:44 +0400
commitb89165f2b75ba0a79eb5ed60924835cf3c54c51a (patch)
tree6ed4af3b2746c94416858753449f74310cb5407c /drivers/net/sky2.h
parent2eaba1a280b6380f5b1238c53ce62e4381fc5f97 (diff)
downloadlinux-b89165f2b75ba0a79eb5ed60924835cf3c54c51a.tar.xz
[PATCH] sky2: fiber support
Fix the support for fiber connected gigabit boards. Allow half duplex gigabit to be configured. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sky2.h')
-rw-r--r--drivers/net/sky2.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
index a27194c874fc..be464636f07a 100644
--- a/drivers/net/sky2.h
+++ b/drivers/net/sky2.h
@@ -1318,6 +1318,14 @@ enum {
};
/* for Yukon-2 Gigabit Ethernet PHY (88E1112 only) */
+/***** PHY_MARV_PHY_CTRL (page 1) 16 bit r/w Fiber Specific Ctrl *****/
+enum {
+ PHY_M_FIB_FORCE_LNK = 1<<10,/* Force Link Good */
+ PHY_M_FIB_SIGD_POL = 1<<9, /* SIGDET Polarity */
+ PHY_M_FIB_TX_DIS = 1<<3, /* Transmitter Disable */
+};
+
+/* for Yukon-2 Gigabit Ethernet PHY (88E1112 only) */
/***** PHY_MARV_PHY_CTRL (page 2) 16 bit r/w MAC Specific Ctrl *****/
enum {
PHY_M_MAC_MD_MSK = 7<<7, /* Bit 9.. 7: Mode Select Mask */
@@ -1880,7 +1888,7 @@ struct sky2_hw {
int pm_cap;
u8 chip_id;
u8 chip_rev;
- u8 copper;
+ u8 pmd_type;
u8 ports;
struct sky2_status_le *st_le;
@@ -1892,6 +1900,11 @@ struct sky2_hw {
wait_queue_head_t msi_wait;
};
+static inline int sky2_is_copper(const struct sky2_hw *hw)
+{
+ return !(hw->pmd_type == 'L' || hw->pmd_type == 'S' || hw->pmd_type == 'P');
+}
+
/* Register accessor for memory mapped device */
static inline u32 sky2_read32(const struct sky2_hw *hw, unsigned reg)
{