Lines Matching refs:dev

19 void pnic_do_nway(struct net_device *dev)  in pnic_do_nway()  argument
21 struct tulip_private *tp = netdev_priv(dev); 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()
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()
41 netdev_dbg(dev, "PNIC autonegotiated status %08x, %s\n", in pnic_do_nway()
42 phy_reg, medianame[dev->if_port]); in pnic_do_nway()
47 netif_trans_update(dev); in pnic_do_nway()
52 void pnic_lnk_change(struct net_device *dev, int csr5) in pnic_lnk_change() argument
54 struct tulip_private *tp = netdev_priv(dev); 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()
73 netif_trans_update(dev); in pnic_lnk_change()
76 if (tulip_media_cap[dev->if_port] & MediaIsMII) { in pnic_lnk_change()
78 tulip_check_duplex(dev); in pnic_lnk_change()
81 pnic_do_nway(dev); in pnic_lnk_change()
90 struct net_device *dev = tp->dev; in pnic_timer() local
103 if (tulip_media_cap[dev->if_port] & MediaIsMII) { in pnic_timer()
105 if (tulip_check_duplex(dev) > 0) in pnic_timer()
115 netdev_dbg(dev, "PNIC timer PHY status %08x, %s CSR5 %08x\n", in pnic_timer()
116 phy_reg, medianame[dev->if_port], csr5); in pnic_timer()
122 pnic_do_nway(dev); 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()
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()
150 netif_trans_update(dev); in pnic_timer()
152 dev_info(&dev->dev, in pnic_timer()
154 medianame[dev->if_port], in pnic_timer()
164 dev_info(&dev->dev, "sw timer wakeup\n"); in pnic_timer()
165 disable_irq(dev->irq); in pnic_timer()
166 tulip_refill_rx(dev); in pnic_timer()
167 enable_irq(dev->irq); in pnic_timer()