Lines Matching +full:tp +full:- +full:link
5 Written/copyright 1994-2001 by Donald Becker.
21 struct tulip_private *tp = netdev_priv(dev); in pnic_do_nway() local
22 void __iomem *ioaddr = tp->base_addr; in pnic_do_nway()
27 if (phy_reg & 0x20000000) dev->if_port = 5; in pnic_do_nway()
28 else if (phy_reg & 0x40000000) dev->if_port = 3; in pnic_do_nway()
29 else if (phy_reg & 0x10000000) dev->if_port = 4; in pnic_do_nway()
30 else if (phy_reg & 0x08000000) dev->if_port = 0; in pnic_do_nway()
31 tp->nwayset = 1; in pnic_do_nway()
32 new_csr6 = (dev->if_port & 1) ? 0x01860000 : 0x00420000; in pnic_do_nway()
33 iowrite32(0x32 | (dev->if_port & 1), ioaddr + CSR12); in pnic_do_nway()
34 if (dev->if_port & 1) in pnic_do_nway()
37 tp->full_duplex = 1; in pnic_do_nway()
42 phy_reg, medianame[dev->if_port]); in pnic_do_nway()
43 if (tp->csr6 != new_csr6) { in pnic_do_nway()
44 tp->csr6 = new_csr6; in pnic_do_nway()
46 tulip_restart_rxtx(tp); in pnic_do_nway()
54 struct tulip_private *tp = netdev_priv(dev); in pnic_lnk_change() local
55 void __iomem *ioaddr = tp->base_addr; in pnic_lnk_change()
59 netdev_dbg(dev, "PNIC link changed state %08x, CSR5 %08x\n", in pnic_lnk_change()
66 if (tulip_media_cap[dev->if_port] & MediaIsMII) in pnic_lnk_change()
68 if (! tp->nwayset || time_after(jiffies, dev_trans_start(dev) + 1*HZ)) { in pnic_lnk_change()
69 tp->csr6 = 0x00420000 | (tp->csr6 & 0x0000fdff); in pnic_lnk_change()
70 iowrite32(tp->csr6, ioaddr + CSR6); in pnic_lnk_change()
76 if (tulip_media_cap[dev->if_port] & MediaIsMII) { in pnic_lnk_change()
77 spin_lock(&tp->lock); in pnic_lnk_change()
79 spin_unlock(&tp->lock); in pnic_lnk_change()
89 struct tulip_private *tp = from_timer(tp, t, timer); in pnic_timer() local
90 struct net_device *dev = tp->dev; in pnic_timer()
91 void __iomem *ioaddr = tp->base_addr; in pnic_timer()
98 * his link partner. in pnic_timer()
103 if (tulip_media_cap[dev->if_port] & MediaIsMII) { in pnic_timer()
104 spin_lock_irq(&tp->lock); in pnic_timer()
107 spin_unlock_irq(&tp->lock); in pnic_timer()
110 int new_csr6 = tp->csr6 & ~0x40C40200; in pnic_timer()
116 phy_reg, medianame[dev->if_port], csr5); in pnic_timer()
117 if (phy_reg & 0x04000000) { /* Remote link fault */ in pnic_timer()
120 tp->nwayset = 0; in pnic_timer()
124 } else if (csr5 & TPLnkFail) { /* 100baseTx link beat */ in pnic_timer()
126 netdev_dbg(dev, "%s link beat failed, CSR12 %04x, CSR5 %08x, PHY %03x\n", in pnic_timer()
127 medianame[dev->if_port], in pnic_timer()
132 if (tp->medialock) { in pnic_timer()
133 } else if (tp->nwayset && (dev->if_port & 1)) { in pnic_timer()
135 } else if (dev->if_port == 0) { in pnic_timer()
136 dev->if_port = 3; in pnic_timer()
141 dev->if_port = 0; in pnic_timer()
146 if (tp->csr6 != new_csr6) { in pnic_timer()
147 tp->csr6 = new_csr6; in pnic_timer()
149 tulip_restart_rxtx(tp); in pnic_timer()
152 dev_info(&dev->dev, in pnic_timer()
153 "Changing PNIC configuration to %s %s-duplex, CSR6 %08x\n", in pnic_timer()
154 medianame[dev->if_port], in pnic_timer()
155 tp->full_duplex ? "full" : "half", in pnic_timer()
161 mod_timer(&tp->timer, RUN_AT(next_tick)); in pnic_timer()
164 dev_info(&dev->dev, "sw timer wakeup\n"); in pnic_timer()
165 disable_irq(dev->irq); in pnic_timer()
167 enable_irq(dev->irq); in pnic_timer()
168 iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ioaddr + CSR7); in pnic_timer()