Lines Matching refs:tp
30 struct tulip_private *tp = in t21142_media_task() local
32 struct net_device *dev = tp->dev; in t21142_media_task()
33 void __iomem *ioaddr = tp->base_addr; in t21142_media_task()
53 } else if (tp->nwayset) { in t21142_media_task()
59 } else if (tp->medialock) { in t21142_media_task()
95 if (new_csr6 != (tp->csr6 & ~0x00D5)) { in t21142_media_task()
96 tp->csr6 &= 0x00D5; in t21142_media_task()
97 tp->csr6 |= new_csr6; in t21142_media_task()
99 tulip_restart_rxtx(tp); in t21142_media_task()
107 mod_timer(&tp->timer, RUN_AT(next_tick)); in t21142_media_task()
113 struct tulip_private *tp = netdev_priv(dev); in t21142_start_nway() local
114 void __iomem *ioaddr = tp->base_addr; in t21142_start_nway()
115 int csr14 = ((tp->sym_advertise & 0x0780) << 9) | in t21142_start_nway()
116 ((tp->sym_advertise & 0x0020) << 1) | 0xffbf; in t21142_start_nway()
119 tp->nway = tp->mediasense = 1; in t21142_start_nway()
120 tp->nwayset = tp->lpar = 0; in t21142_start_nway()
127 tp->csr6 = 0x82420000 | (tp->sym_advertise & 0x0040 ? FullDuplex : 0); in t21142_start_nway()
128 iowrite32(tp->csr6, ioaddr + CSR6); in t21142_start_nway()
129 if (tp->mtable && tp->mtable->csr15dir) { in t21142_start_nway()
130 iowrite32(tp->mtable->csr15dir, ioaddr + CSR15); in t21142_start_nway()
131 iowrite32(tp->mtable->csr15val, ioaddr + CSR15); in t21142_start_nway()
141 struct tulip_private *tp = netdev_priv(dev); in t21142_lnk_change() local
142 void __iomem *ioaddr = tp->base_addr; in t21142_lnk_change()
155 if (tp->nway && !tp->nwayset && (csr12 & 0x7000) == 0x5000) { in t21142_lnk_change()
157 int negotiated = tp->sym_advertise & (csr12 >> 16); in t21142_lnk_change()
158 tp->lpar = csr12 >> 16; in t21142_lnk_change()
159 tp->nwayset = 1; in t21142_lnk_change()
167 tp->nwayset = 0; in t21142_lnk_change()
168 if ((csr12 & 2) == 0 && (tp->sym_advertise & 0x0180)) in t21142_lnk_change()
171 tp->full_duplex = (tulip_media_cap[dev->if_port] & MediaAlwaysFD) ? 1:0; in t21142_lnk_change()
174 if (tp->nwayset) in t21142_lnk_change()
178 tp->sym_advertise, tp->lpar, in t21142_lnk_change()
186 if (tp->mtable) { in t21142_lnk_change()
188 for (i = 0; i < tp->mtable->leafcount; i++) in t21142_lnk_change()
189 if (tp->mtable->mleaf[i].media == dev->if_port) { in t21142_lnk_change()
190 int startup = ! ((tp->chip_id == DC21143 && (tp->revision == 48 || tp->revision == 65))); in t21142_lnk_change()
191 tp->cur_index = i; in t21142_lnk_change()
198 tp->csr6 = (dev->if_port & 1 ? 0x838E0000 : 0x82420000) | (tp->csr6 & 0x20ff); in t21142_lnk_change()
199 if (tp->full_duplex) in t21142_lnk_change()
200 tp->csr6 |= 0x0200; in t21142_lnk_change()
204 iowrite32(tp->csr6 | RxOn, ioaddr + CSR6); in t21142_lnk_change()
209 tulip_start_rxtx(tp); in t21142_lnk_change()
212 tp->csr6, ioread32(ioaddr + CSR6), in t21142_lnk_change()
214 } else if ((tp->nwayset && (csr5 & 0x08000000) && in t21142_lnk_change()
217 (tp->nway && (csr5 & (TPLnkFail)))) { in t21142_lnk_change()
219 del_timer_sync(&tp->timer); in t21142_lnk_change()
221 tp->timer.expires = RUN_AT(3*HZ); in t21142_lnk_change()
222 add_timer(&tp->timer); in t21142_lnk_change()
228 if ((csr12 & 2) && ! tp->medialock) { in t21142_lnk_change()
229 del_timer_sync(&tp->timer); in t21142_lnk_change()
231 tp->timer.expires = RUN_AT(3*HZ); in t21142_lnk_change()
232 add_timer(&tp->timer); in t21142_lnk_change()
242 } else if (tp->nwayset) { in t21142_lnk_change()
245 medianame[dev->if_port], tp->csr6); in t21142_lnk_change()
250 tp->csr6 = 0x838E0000 | (tp->csr6 & 0x20ff); in t21142_lnk_change()
253 tulip_restart_rxtx(tp); in t21142_lnk_change()