spidernet: autoneg support for Celleb
Add auto negotiation support for Celleb. Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:

committed by
Jeff Garzik

parent
d406eafee8
commit
abdb66b566
@@ -50,6 +50,8 @@ extern char spider_net_driver_name[];
|
||||
#define SPIDER_NET_TX_DESCRIPTORS_MAX 512
|
||||
|
||||
#define SPIDER_NET_TX_TIMER (HZ/5)
|
||||
#define SPIDER_NET_ANEG_TIMER (HZ)
|
||||
#define SPIDER_NET_ANEG_TIMEOUT 2
|
||||
|
||||
#define SPIDER_NET_RX_CSUM_DEFAULT 1
|
||||
|
||||
@@ -104,6 +106,7 @@ extern char spider_net_driver_name[];
|
||||
|
||||
#define SPIDER_NET_GMACOPEMD 0x00000100
|
||||
#define SPIDER_NET_GMACLENLMT 0x00000108
|
||||
#define SPIDER_NET_GMACST 0x00000110
|
||||
#define SPIDER_NET_GMACINTEN 0x00000118
|
||||
#define SPIDER_NET_GMACPHYCTRL 0x00000120
|
||||
|
||||
@@ -333,9 +336,12 @@ enum spider_net_int2_status {
|
||||
/* We rely on flagged descriptor interrupts */
|
||||
#define SPIDER_NET_RXINT ( (1 << SPIDER_NET_GDAFDCINT) )
|
||||
|
||||
#define SPIDER_NET_LINKINT ( 1 << SPIDER_NET_GMAC2INT )
|
||||
|
||||
#define SPIDER_NET_ERRINT ( 0xffffffff & \
|
||||
(~SPIDER_NET_TXINT) & \
|
||||
(~SPIDER_NET_RXINT) )
|
||||
(~SPIDER_NET_RXINT) & \
|
||||
(~SPIDER_NET_LINKINT) )
|
||||
|
||||
#define SPIDER_NET_GPREXEC 0x80000000
|
||||
#define SPIDER_NET_GPRDAT_MASK 0x0000ffff
|
||||
@@ -442,6 +448,8 @@ struct spider_net_card {
|
||||
struct spider_net_descr_chain rx_chain;
|
||||
struct spider_net_descr *low_watermark;
|
||||
|
||||
int aneg_count;
|
||||
struct timer_list aneg_timer;
|
||||
struct timer_list tx_timer;
|
||||
struct work_struct tx_timeout_task;
|
||||
atomic_t tx_timeout_task_counter;
|
||||
|
Reference in New Issue
Block a user