Lines Matching refs:dev
32 struct net_device *dev = tp->dev; in t21142_media_task() local
43 dev_info(&dev->dev, "21143 negotiation status %08x, %s\n", in t21142_media_task()
44 csr12, medianame[dev->if_port]); in t21142_media_task()
45 if (tulip_media_cap[dev->if_port] & MediaIsMII) { in t21142_media_task()
46 if (tulip_check_duplex(dev) < 0) { in t21142_media_task()
47 netif_carrier_off(dev); in t21142_media_task()
50 netif_carrier_on(dev); in t21142_media_task()
56 dev_info(&dev->dev, in t21142_media_task()
58 medianame[dev->if_port], csr12); in t21142_media_task()
61 } else if (dev->if_port == 3) { in t21142_media_task()
64 dev_info(&dev->dev, in t21142_media_task()
67 t21142_start_nway(dev); in t21142_media_task()
73 dev_info(&dev->dev, in t21142_media_task()
78 dev->if_port = 0; in t21142_media_task()
81 iowrite16(t21142_csr15[dev->if_port], ioaddr + CSR15); in t21142_media_task()
82 iowrite32(t21142_csr13[dev->if_port], ioaddr + CSR13); in t21142_media_task()
86 dev->if_port = 3; in t21142_media_task()
93 dev_info(&dev->dev, "Testing new 21143 media %s\n", in t21142_media_task()
94 medianame[dev->if_port]); in t21142_media_task()
111 void t21142_start_nway(struct net_device *dev) in t21142_start_nway() argument
113 struct tulip_private *tp = netdev_priv(dev); in t21142_start_nway()
118 dev->if_port = 0; in t21142_start_nway()
122 netdev_dbg(dev, "Restarting 21143 autonegotiation, csr14=%08x\n", in t21142_start_nway()
139 void t21142_lnk_change(struct net_device *dev, int csr5) in t21142_lnk_change() argument
141 struct tulip_private *tp = netdev_priv(dev); in t21142_lnk_change()
150 dev_info(&dev->dev, in t21142_lnk_change()
161 if (!(csr12 & 0x8000)) dev->if_port = 0; in t21142_lnk_change()
162 else if (negotiated & 0x0100) dev->if_port = 5; in t21142_lnk_change()
163 else if (negotiated & 0x0080) dev->if_port = 3; in t21142_lnk_change()
164 else if (negotiated & 0x0040) dev->if_port = 4; in t21142_lnk_change()
165 else if (negotiated & 0x0020) dev->if_port = 0; in t21142_lnk_change()
169 dev->if_port = 3; in t21142_lnk_change()
171 tp->full_duplex = (tulip_media_cap[dev->if_port] & MediaAlwaysFD) ? 1:0; in t21142_lnk_change()
175 dev_info(&dev->dev, in t21142_lnk_change()
177 medianame[dev->if_port], in t21142_lnk_change()
181 dev_info(&dev->dev, in t21142_lnk_change()
183 medianame[dev->if_port], csr12); in t21142_lnk_change()
189 if (tp->mtable->mleaf[i].media == dev->if_port) { in t21142_lnk_change()
192 tulip_select_media(dev, startup); in t21142_lnk_change()
198 tp->csr6 = (dev->if_port & 1 ? 0x838E0000 : 0x82420000) | (tp->csr6 & 0x20ff); in t21142_lnk_change()
206 netdev_dbg(dev, " Restarting Tx and Rx, CSR5 is %08x\n", in t21142_lnk_change()
211 netdev_dbg(dev, " Setting CSR6 %08x/%x CSR12 %08x\n", in t21142_lnk_change()
215 (dev->if_port == 3 || dev->if_port == 5) && in t21142_lnk_change()
220 t21142_start_nway(dev); in t21142_lnk_change()
223 } else if (dev->if_port == 3 || dev->if_port == 5) { in t21142_lnk_change()
225 dev_info(&dev->dev, "21143 %s link beat %s\n", in t21142_lnk_change()
226 medianame[dev->if_port], in t21142_lnk_change()
230 t21142_start_nway(dev); in t21142_lnk_change()
233 } else if (dev->if_port == 5) in t21142_lnk_change()
235 } else if (dev->if_port == 0 || dev->if_port == 4) { in t21142_lnk_change()
237 dev_info(&dev->dev, "21143 10baseT link beat good\n"); in t21142_lnk_change()
240 dev_info(&dev->dev, "21143 10mbps sensed media\n"); in t21142_lnk_change()
241 dev->if_port = 0; in t21142_lnk_change()
244 dev_info(&dev->dev, "21143 using NWay-set %s, csr6 %08x\n", in t21142_lnk_change()
245 medianame[dev->if_port], tp->csr6); in t21142_lnk_change()
248 dev_info(&dev->dev, "21143 100baseTx sensed media\n"); in t21142_lnk_change()
249 dev->if_port = 3; in t21142_lnk_change()