Lines Matching refs:tp

81 	struct tulip_private *tp = from_timer(tp, t, timer);  in pnic2_timer()  local
82 struct net_device *dev = tp->dev; in pnic2_timer()
83 void __iomem *ioaddr = tp->base_addr; in pnic2_timer()
91 mod_timer(&tp->timer, RUN_AT(next_tick)); in pnic2_timer()
98 struct tulip_private *tp = netdev_priv(dev); in pnic2_start_nway() local
99 void __iomem *ioaddr = tp->base_addr; in pnic2_start_nway()
111 if (tp->sym_advertise & 0x0100) csr14 |= 0x00020000; in pnic2_start_nway()
114 if (tp->sym_advertise & 0x0080) csr14 |= 0x00010000; in pnic2_start_nway()
117 if (tp->sym_advertise & 0x0020) csr14 |= 0x00000040; in pnic2_start_nway()
130 tp->nway = tp->mediasense = 1; in pnic2_start_nway()
131 tp->nwayset = tp->lpar = 0; in pnic2_start_nway()
135 tp->csr6 = ioread32(ioaddr + CSR6); in pnic2_start_nway()
137 netdev_dbg(dev, "On Entry to Nway, csr6=%08x\n", tp->csr6); in pnic2_start_nway()
142 tp->csr6 = tp->csr6 & 0xfe3bd1fd; in pnic2_start_nway()
146 if (tp->sym_advertise & 0x0040) tp->csr6 |= 0x00000200; in pnic2_start_nway()
152 tp->csr6 |= 0x01000000; in pnic2_start_nway()
154 iowrite32(tp->csr6, ioaddr + CSR6); in pnic2_start_nway()
172 struct tulip_private *tp = netdev_priv(dev); in pnic2_lnk_change() local
173 void __iomem *ioaddr = tp->base_addr; in pnic2_lnk_change()
187 if (tp->nway && !tp->nwayset) { in pnic2_lnk_change()
204 int negotiated = ((csr12 >> 16) & 0x01E0) & tp->sym_advertise; in pnic2_lnk_change()
205 tp->lpar = (csr12 >> 16); in pnic2_lnk_change()
206 tp->nwayset = 1; in pnic2_lnk_change()
216 csr12, tp->sym_advertise); in pnic2_lnk_change()
217 tp->nwayset = 0; in pnic2_lnk_change()
219 if ((csr12 & 2) == 0 && (tp->sym_advertise & 0x0180)) in pnic2_lnk_change()
224 tp->full_duplex = 0; in pnic2_lnk_change()
226 tp->full_duplex = 1; in pnic2_lnk_change()
229 if (tp->nwayset) in pnic2_lnk_change()
233 tp->sym_advertise, tp->lpar, in pnic2_lnk_change()
253 tp->csr6 = (ioread32(ioaddr + CSR6) & 0xfe3bd1fd); in pnic2_lnk_change()
261 if (dev->if_port & 1) tp->csr6 |= 0x01840000; in pnic2_lnk_change()
262 else tp->csr6 |= 0x00400000; in pnic2_lnk_change()
265 if (tp->full_duplex) tp->csr6 |= 0x00000200; in pnic2_lnk_change()
271 tp->csr6, in pnic2_lnk_change()
278 tulip_start_rxtx(tp); in pnic2_lnk_change()
301 tp->nway = 0; in pnic2_lnk_change()
302 tp->nwayset = 1; in pnic2_lnk_change()
307 tp->csr6 = (ioread32(ioaddr + CSR6) & 0xfe3bd1fd); in pnic2_lnk_change()
308 tp->csr6 |= 0x00400000; in pnic2_lnk_change()
310 tulip_restart_rxtx(tp); in pnic2_lnk_change()
317 if ((tp->nwayset && (csr5 & 0x08000000) && in pnic2_lnk_change()
319 (csr12 & 2) == 2) || (tp->nway && (csr5 & (TPLnkFail)))) { in pnic2_lnk_change()
326 del_timer_sync(&tp->timer); in pnic2_lnk_change()
328 tp->timer.expires = RUN_AT(3*HZ); in pnic2_lnk_change()
329 add_timer(&tp->timer); in pnic2_lnk_change()
346 tp->nway = 0; in pnic2_lnk_change()
347 tp->nwayset = 1; in pnic2_lnk_change()
350 if ((csr12 & 2) && ! tp->medialock) { in pnic2_lnk_change()
351 del_timer_sync(&tp->timer); in pnic2_lnk_change()
353 tp->timer.expires = RUN_AT(3*HZ); in pnic2_lnk_change()
354 add_timer(&tp->timer); in pnic2_lnk_change()
370 tp->nway = 0; in pnic2_lnk_change()
371 tp->nwayset = 1; in pnic2_lnk_change()
374 if ((csr12 & 4) && ! tp->medialock) { in pnic2_lnk_change()
375 del_timer_sync(&tp->timer); in pnic2_lnk_change()
377 tp->timer.expires = RUN_AT(3*HZ); in pnic2_lnk_change()
378 add_timer(&tp->timer); in pnic2_lnk_change()
398 tp->csr6 = (ioread32(ioaddr + CSR6) & 0xfe3bd1fd); in pnic2_lnk_change()
399 tp->csr6 |= 0x00400000; in pnic2_lnk_change()
401 tulip_restart_rxtx(tp); in pnic2_lnk_change()