Lines Matching refs:tp

32 	struct tulip_private *tp = (struct tulip_private *)dev->priv;  in t21142_timer()  local
44 } else if (tp->nwayset) { in t21142_timer()
49 } else if (tp->medialock) { in t21142_timer()
83 if (new_csr6 != (tp->csr6 & ~0x00D5)) { in t21142_timer()
84 tp->csr6 &= 0x00D5; in t21142_timer()
85 tp->csr6 |= new_csr6; in t21142_timer()
87 tulip_restart_rxtx(tp); in t21142_timer()
95 mod_timer(&tp->timer, RUN_AT(next_tick)); in t21142_timer()
101 struct tulip_private *tp = (struct tulip_private *)dev->priv; in t21142_start_nway() local
103 int csr14 = ((tp->sym_advertise & 0x0780) << 9) | in t21142_start_nway()
104 ((tp->sym_advertise & 0x0020) << 1) | 0xffbf; in t21142_start_nway()
107 tp->nway = tp->mediasense = 1; in t21142_start_nway()
108 tp->nwayset = tp->lpar = 0; in t21142_start_nway()
115 tp->csr6 = 0x82420000 | (tp->sym_advertise & 0x0040 ? FullDuplex : 0); in t21142_start_nway()
116 outl(tp->csr6, ioaddr + CSR6); in t21142_start_nway()
117 if (tp->mtable && tp->mtable->csr15dir) { in t21142_start_nway()
118 outl(tp->mtable->csr15dir, ioaddr + CSR15); in t21142_start_nway()
119 outl(tp->mtable->csr15val, ioaddr + CSR15); in t21142_start_nway()
129 struct tulip_private *tp = (struct tulip_private *)dev->priv; in t21142_lnk_change() local
138 if (tp->nway && !tp->nwayset && (csr12 & 0x7000) == 0x5000) { in t21142_lnk_change()
140 int negotiated = tp->sym_advertise & (csr12 >> 16); in t21142_lnk_change()
141 tp->lpar = csr12 >> 16; in t21142_lnk_change()
142 tp->nwayset = 1; in t21142_lnk_change()
148 tp->nwayset = 0; in t21142_lnk_change()
149 if ((csr12 & 2) == 0 && (tp->sym_advertise & 0x0180)) in t21142_lnk_change()
152 tp->full_duplex = (tulip_media_cap[dev->if_port] & MediaAlwaysFD) ? 1:0; in t21142_lnk_change()
155 if (tp->nwayset) in t21142_lnk_change()
158 dev->name, medianame[dev->if_port], tp->sym_advertise, in t21142_lnk_change()
159 tp->lpar, negotiated); in t21142_lnk_change()
166 if (tp->mtable) { in t21142_lnk_change()
168 for (i = 0; i < tp->mtable->leafcount; i++) in t21142_lnk_change()
169 if (tp->mtable->mleaf[i].media == dev->if_port) { in t21142_lnk_change()
170 int startup = ! ((tp->chip_id == DC21143 && tp->revision == 65)); in t21142_lnk_change()
171 tp->cur_index = i; in t21142_lnk_change()
178 tp->csr6 = (dev->if_port & 1 ? 0x838E0000 : 0x82420000) | (tp->csr6 & 0x20ff); in t21142_lnk_change()
179 if (tp->full_duplex) in t21142_lnk_change()
180 tp->csr6 |= 0x0200; in t21142_lnk_change()
184 outl(tp->csr6 | RxOn, ioaddr + CSR6); in t21142_lnk_change()
189 tulip_start_rxtx(tp); in t21142_lnk_change()
192 dev->name, tp->csr6, inl(ioaddr + CSR6), in t21142_lnk_change()
194 } else if ((tp->nwayset && (csr5 & 0x08000000) in t21142_lnk_change()
197 (tp->nway && (csr5 & (TPLnkFail)))) { in t21142_lnk_change()
199 del_timer_sync(&tp->timer); in t21142_lnk_change()
201 tp->timer.expires = RUN_AT(3*HZ); in t21142_lnk_change()
202 add_timer(&tp->timer); in t21142_lnk_change()
208 if ((csr12 & 2) && ! tp->medialock) { in t21142_lnk_change()
209 del_timer_sync(&tp->timer); in t21142_lnk_change()
211 tp->timer.expires = RUN_AT(3*HZ); in t21142_lnk_change()
212 add_timer(&tp->timer); in t21142_lnk_change()
224 } else if (tp->nwayset) { in t21142_lnk_change()
227 dev->name, medianame[dev->if_port], tp->csr6); in t21142_lnk_change()
233 tp->csr6 = 0x838E0000 | (tp->csr6 & 0x20ff); in t21142_lnk_change()
236 tulip_restart_rxtx(tp); in t21142_lnk_change()