14 #include <linux/kernel.h>
24 u32 new_csr6 = tp->
csr6 & ~0x40C40200;
26 if (phy_reg & 0x78000000) {
27 if (phy_reg & 0x20000000) dev->
if_port = 5;
28 else if (phy_reg & 0x40000000) dev->
if_port = 3;
29 else if (phy_reg & 0x10000000) dev->
if_port = 4;
30 else if (phy_reg & 0x08000000) dev->
if_port = 0;
32 new_csr6 = (dev->
if_port & 1) ? 0x01860000 : 0x00420000;
36 if (phy_reg & 0x30000000) {
38 new_csr6 |= 0x00000200;
41 netdev_dbg(dev,
"PNIC autonegotiated status %08x, %s\n",
43 if (tp->
csr6 != new_csr6) {
46 tulip_restart_rxtx(tp);
59 netdev_dbg(dev,
"PNIC link changed state %08x, CSR5 %08x\n",
69 tp->
csr6 = 0x00420000 | (tp->
csr6 & 0x0000fdff);
79 spin_unlock(&tp->
lock);
92 int next_tick = 60*
HZ;
100 goto too_good_connection;
104 spin_lock_irq(&tp->
lock);
107 spin_unlock_irq(&tp->
lock);
110 int new_csr6 = tp->
csr6 & ~0x40C40200;
115 netdev_dbg(dev,
"PNIC timer PHY status %08x, %s CSR5 %08x\n",
117 if (phy_reg & 0x04000000) {
121 }
else if (phy_reg & 0x78000000) {
126 netdev_dbg(dev,
"%s link beat failed, CSR12 %04x, CSR5 %08x, PHY %03x\n",
135 }
else if (dev->
if_port == 0) {
138 new_csr6 = 0x01860000;
143 new_csr6 = 0x00420000;
146 if (tp->
csr6 != new_csr6) {
149 tulip_restart_rxtx(tp);
153 "Changing PNIC configuration to %s %s-duplex, CSR6 %08x\n",