[adm5120] fix switch driver, force all packets from all the ports are low priority
authorGabor Juhos <juhosg@openwrt.org>
Fri, 20 Jul 2007 20:46:39 +0000 (20:46 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Fri, 20 Jul 2007 20:46:39 +0000 (20:46 +0000)
SVN-Revision: 8083

target/linux/adm5120-2.6/files/drivers/net/adm5120sw.c
target/linux/adm5120-2.6/files/drivers/net/adm5120sw.h

index 744a2da3575a050f21d8427dd33e9c992d6dca6f..2714577c8e5873b6a4432ab2e71042ec9f6c085a 100644 (file)
@@ -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);
 
index 4d32f91eea57c7c02d2982cd1b2fc7e8c4680eca..a3b4ec0179c7d987612a53a90853f7676a894afc 100644 (file)
@@ -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