aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2007-07-20 20:46:39 +0000
committerGabor Juhos <juhosg@openwrt.org>2007-07-20 20:46:39 +0000
commit9539ee8010ab8cf2561afc65b26bf2b555cad580 (patch)
treee8e7c78885ef3c7294fa2fd8a60110396012bbb3
parent3c7aec61854254868b560e9ab5631910c1ebbebb (diff)
downloadupstream-9539ee8010ab8cf2561afc65b26bf2b555cad580.tar.gz
upstream-9539ee8010ab8cf2561afc65b26bf2b555cad580.tar.bz2
upstream-9539ee8010ab8cf2561afc65b26bf2b555cad580.zip
fix switch driver, force all packets from all the ports are low priority
SVN-Revision: 8083
-rw-r--r--target/linux/adm5120-2.6/files/drivers/net/adm5120sw.c3
-rw-r--r--target/linux/adm5120-2.6/files/drivers/net/adm5120sw.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/adm5120-2.6/files/drivers/net/adm5120sw.c b/target/linux/adm5120-2.6/files/drivers/net/adm5120sw.c
index 744a2da357..2714577c8e 100644
--- a/target/linux/adm5120-2.6/files/drivers/net/adm5120sw.c
+++ b/target/linux/adm5120-2.6/files/drivers/net/adm5120sw.c
@@ -537,6 +537,9 @@ static int __init adm5120_sw_init(void)
adm5120_set_reg(ADM5120_PHY_CNTL3, adm5120_get_reg(ADM5120_PHY_CNTL3) |
ADM5120_PHY_NTH);
+ /* Force all the packets from all ports are low priority */
+ adm5120_set_reg(ADM5120_PRI_CNTL, 0);
+
adm5120_set_reg(ADM5120_INT_MASK, ADM5120_INTMASKALL);
adm5120_set_reg(ADM5120_INT_ST, ADM5120_INTMASKALL);
diff --git a/target/linux/adm5120-2.6/files/drivers/net/adm5120sw.h b/target/linux/adm5120-2.6/files/drivers/net/adm5120sw.h
index 4d32f91eea..a3b4ec0179 100644
--- a/target/linux/adm5120-2.6/files/drivers/net/adm5120sw.h
+++ b/target/linux/adm5120-2.6/files/drivers/net/adm5120sw.h
@@ -50,6 +50,7 @@
#define ADM5120_AUTOMDIX 0x3e000000 /* Auto MDIX */
#define ADM5120_PHY_CNTL3 0x80
#define ADM5120_PHY_NTH 0x00000400
+#define ADM5120_PRI_CNTL 0x84
#define ADM5120_INT_ST 0xb0
#define ADM5120_INT_RXH 0x0000004
#define ADM5120_INT_RXL 0x0000008