aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/skge.h
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-10-05 15:49:52 -0700
committerJeff Garzik <jeff@garzik.org>2006-10-11 04:06:09 -0400
commit5d5c8e03786691d0d083142b922edce8609c0fd5 (patch)
treea821bad020b3a961e9af512803aca9804169fcd1 /drivers/net/skge.h
parent[PATCH] skge: pause mapping for fiber (diff)
downloadlinux-dev-5d5c8e03786691d0d083142b922edce8609c0fd5.tar.xz
linux-dev-5d5c8e03786691d0d083142b922edce8609c0fd5.zip
[PATCH] skge: better flow control negotiation
Do flow control negotiation properly. Don't let auto negotiation status limit renegotiation. Separate desired pause values from the result of auto negotiation. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to '')
-rw-r--r--drivers/net/skge.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/net/skge.h b/drivers/net/skge.h
index 9cc955c12503..537c0aaa1db8 100644
--- a/drivers/net/skge.h
+++ b/drivers/net/skge.h
@@ -2427,13 +2427,24 @@ struct skge_hw {
struct mutex phy_mutex;
};
-enum {
- FLOW_MODE_NONE = 0, /* No Flow-Control */
- FLOW_MODE_LOC_SEND = 1, /* Local station sends PAUSE */
- FLOW_MODE_REM_SEND = 2, /* Symmetric or just remote */
+enum pause_control {
+ FLOW_MODE_NONE = 1, /* No Flow-Control */
+ FLOW_MODE_LOC_SEND = 2, /* Local station sends PAUSE */
FLOW_MODE_SYMMETRIC = 3, /* Both stations may send PAUSE */
+ FLOW_MODE_SYM_OR_REM = 4, /* Both stations may send PAUSE or
+ * just the remote station may send PAUSE
+ */
+};
+
+enum pause_status {
+ FLOW_STAT_INDETERMINATED=0, /* indeterminated */
+ FLOW_STAT_NONE, /* No Flow Control */
+ FLOW_STAT_REM_SEND, /* Remote Station sends PAUSE */
+ FLOW_STAT_LOC_SEND, /* Local station sends PAUSE */
+ FLOW_STAT_SYMMETRIC, /* Both station may send PAUSE */
};
+
struct skge_port {
u32 msg_enable;
struct skge_hw *hw;
@@ -2446,9 +2457,10 @@ struct skge_port {
struct net_device_stats net_stats;
struct work_struct link_thread;
+ enum pause_control flow_control;
+ enum pause_status flow_status;
u8 rx_csum;
u8 blink_on;
- u8 flow_control;
u8 wol;
u8 autoneg; /* AUTONEG_ENABLE, AUTONEG_DISABLE */
u8 duplex; /* DUPLEX_HALF, DUPLEX_FULL */