21 static u16 t21142_csr13[] = { 0x0001, 0x0009, 0x0009, 0x0000, 0x0001, };
23 static u16 t21142_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, };
35 int next_tick = 60*
HZ;
40 if ((csr14 & 0x80) && (csr12 & 0x7000) != 0x5000)
43 dev_info(&dev->
dev,
"21143 negotiation status %08x, %s\n",
57 "Using NWay-set %s media, csr12 %08x\n",
65 "No 21143 100baseTx link beat, %08x, trying NWay\n",
70 }
else if ((csr12 & 0x7000) != 0x5000) {
74 "21143 negotiation failed, status %08x\n",
77 new_csr6 = 0x82420000;
85 new_csr6 = 0x83860000;
95 if (new_csr6 != (tp->
csr6 & ~0x00D5)) {
99 tulip_restart_rxtx(tp);
122 netdev_dbg(dev,
"Restarting 21143 autonegotiation, csr14=%08x\n",
147 if ((csr14 & 0x80) && (csr12 & 0x7000) != 0x5000)
151 "21143 link status interrupt %08x, CSR5 %x, %08x\n",
155 if (tp->
nway && !tp->
nwayset && (csr12 & 0x7000) == 0x5000) {
158 tp->
lpar = csr12 >> 16;
161 if (!(csr12 & 0x8000)) dev->
if_port = 0;
162 else if (negotiated & 0x0100) dev->
if_port = 5;
163 else if (negotiated & 0x0080) dev->
if_port = 3;
164 else if (negotiated & 0x0040) dev->
if_port = 4;
165 else if (negotiated & 0x0020) dev->
if_port = 0;
176 "Switching to %s based on link negotiation %04x & %04x = %04x\n",
182 "Autonegotiation failed, using %s, link beat status %04x\n",
188 for (i = 0; i < tp->
mtable->leafcount; i++)
198 tp->
csr6 = (dev->
if_port & 1 ? 0x838E0000 : 0x82420000) | (tp->
csr6 & 0x20ff);
206 netdev_dbg(dev,
" Restarting Tx and Rx, CSR5 is %08x\n",
209 tulip_start_rxtx(tp);
211 netdev_dbg(dev,
" Setting CSR6 %08x/%x CSR12 %08x\n",
214 }
else if ((tp->
nwayset && (csr5 & 0x08000000) &&
227 (csr12 & 2) ?
"failed" :
"good");
236 if ((csr12 & 4) == 0)
237 dev_info(&dev->
dev,
"21143 10baseT link beat good\n");
238 }
else if (!(csr12 & 4)) {
240 dev_info(&dev->
dev,
"21143 10mbps sensed media\n");
244 dev_info(&dev->
dev,
"21143 using NWay-set %s, csr6 %08x\n",
248 dev_info(&dev->
dev,
"21143 100baseTx sensed media\n");
250 tp->
csr6 = 0x838E0000 | (tp->
csr6 & 0x20ff);
253 tulip_restart_rxtx(tp);