aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/skge.h
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-10-05 18:49:52 -0400
committerJeff Garzik <jeff@garzik.org>2006-10-11 04:06:09 -0400
commit5d5c8e03786691d0d083142b922edce8609c0fd5 (patch)
treea821bad020b3a961e9af512803aca9804169fcd1 /drivers/net/skge.h
parent4b67be999ed5bfb1bfe4cc502d37d59b4f6b6b7f (diff)
[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 'drivers/net/skge.h')
-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 {
2427 struct mutex phy_mutex; 2427 struct mutex phy_mutex;
2428}; 2428};
2429 2429
2430enum { 2430enum pause_control {
2431 FLOW_MODE_NONE = 0, /* No Flow-Control */ 2431 FLOW_MODE_NONE = 1, /* No Flow-Control */
2432 FLOW_MODE_LOC_SEND = 1, /* Local station sends PAUSE */ 2432 FLOW_MODE_LOC_SEND = 2, /* Local station sends PAUSE */
2433 FLOW_MODE_REM_SEND = 2, /* Symmetric or just remote */
2434 FLOW_MODE_SYMMETRIC = 3, /* Both stations may send PAUSE */ 2433 FLOW_MODE_SYMMETRIC = 3, /* Both stations may send PAUSE */
2434 FLOW_MODE_SYM_OR_REM = 4, /* Both stations may send PAUSE or
2435 * just the remote station may send PAUSE
2436 */
2437};
2438
2439enum pause_status {
2440 FLOW_STAT_INDETERMINATED=0, /* indeterminated */
2441 FLOW_STAT_NONE, /* No Flow Control */
2442 FLOW_STAT_REM_SEND, /* Remote Station sends PAUSE */
2443 FLOW_STAT_LOC_SEND, /* Local station sends PAUSE */
2444 FLOW_STAT_SYMMETRIC, /* Both station may send PAUSE */
2435}; 2445};
2436 2446
2447
2437struct skge_port { 2448struct skge_port {
2438 u32 msg_enable; 2449 u32 msg_enable;
2439 struct skge_hw *hw; 2450 struct skge_hw *hw;
@@ -2446,9 +2457,10 @@ struct skge_port {
2446 struct net_device_stats net_stats; 2457 struct net_device_stats net_stats;
2447 2458
2448 struct work_struct link_thread; 2459 struct work_struct link_thread;
2460 enum pause_control flow_control;
2461 enum pause_status flow_status;
2449 u8 rx_csum; 2462 u8 rx_csum;
2450 u8 blink_on; 2463 u8 blink_on;
2451 u8 flow_control;
2452 u8 wol; 2464 u8 wol;
2453 u8 autoneg; /* AUTONEG_ENABLE, AUTONEG_DISABLE */ 2465 u8 autoneg; /* AUTONEG_ENABLE, AUTONEG_DISABLE */
2454 u8 duplex; /* DUPLEX_HALF, DUPLEX_FULL */ 2466 u8 duplex; /* DUPLEX_HALF, DUPLEX_FULL */