Lines Matching refs:net
65 if (netif_carrier_ok(dev->net) != link) { in asix_status()
67 netdev_dbg(dev->net, "Link Status is: %d\n", link); in asix_status()
74 memcpy(dev->net->dev_addr, addr, ETH_ALEN); in asix_set_netdev_dev_addr()
76 netdev_info(dev->net, "invalid hw address, using random\n"); in asix_set_netdev_dev_addr()
77 eth_hw_addr_random(dev->net); in asix_set_netdev_dev_addr()
90 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1); in asix_get_phyid()
103 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID2); in asix_get_phyid()
112 static u32 asix_get_link(struct net_device *net) in asix_get_link() argument
114 struct usbnet *dev = netdev_priv(net); in asix_get_link()
119 static int asix_ioctl (struct net_device *net, struct ifreq *rq, int cmd) in asix_ioctl() argument
121 struct usbnet *dev = netdev_priv(net); in asix_ioctl()
144 static void ax88172_set_multicast(struct net_device *net) in ax88172_set_multicast() argument
146 struct usbnet *dev = netdev_priv(net); in ax88172_set_multicast()
150 if (net->flags & IFF_PROMISC) { in ax88172_set_multicast()
152 } else if (net->flags & IFF_ALLMULTI || in ax88172_set_multicast()
153 netdev_mc_count(net) > AX_MAX_MCAST) { in ax88172_set_multicast()
155 } else if (netdev_mc_empty(net)) { in ax88172_set_multicast()
168 netdev_for_each_mc_addr(ha, net) { in ax88172_set_multicast()
195 netdev_dbg(dev->net, "ax88172_link_reset() speed: %u duplex: %d setting mode to 0x%04x\n", in ax88172_link_reset()
219 asix_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, reset_bits); in asix_phy_reset()
226 if (asix_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR) in asix_phy_reset()
233 netdev_err(dev->net, "BMCR_RESET timeout on phy_id %d\n", in asix_phy_reset()
263 netdev_dbg(dev->net, "read AX_CMD_READ_NODE_ID failed: %d\n", in ax88172_bind()
271 dev->mii.dev = dev->net; in ax88172_bind()
278 dev->net->netdev_ops = &ax88172_netdev_ops; in ax88172_bind()
279 dev->net->ethtool_ops = &ax88172_ethtool_ops; in ax88172_bind()
280 dev->net->needed_headroom = 4; /* cf asix_tx_fixup() */ in ax88172_bind()
281 dev->net->needed_tailroom = 4; /* cf asix_tx_fixup() */ in ax88172_bind()
284 asix_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, in ax88172_bind()
324 netdev_dbg(dev->net, "ax88772_link_reset() speed: %u duplex: %d setting mode to 0x%04x\n", in ax88772_link_reset()
338 ether_addr_copy(data->mac_addr, dev->net->dev_addr); in ax88772_reset()
375 netdev_dbg(dev->net, "Select PHY #1 failed: %d\n", ret); in ax88772_hw_reset()
405 if (in_pm && (!asix_mdio_read_nopm(dev->net, dev->mii.phy_id, in ax88772_hw_reset()
423 netdev_dbg(dev->net, "Write IPG,IPG1,IPG2 failed: %d\n", ret); in ax88772_hw_reset()
428 ether_addr_copy(data->mac_addr, dev->net->dev_addr); in ax88772_hw_reset()
440 netdev_dbg(dev->net, "RX_CTL is 0x%04x after all initializations\n", in ax88772_hw_reset()
444 netdev_dbg(dev->net, in ax88772_hw_reset()
470 netdev_dbg(dev->net, "Select PHY #1 failed: %d\n", ret); in ax88772a_hw_reset()
497 if (in_pm && (!asix_mdio_read_nopm(dev->net, dev->mii.phy_id, in ax88772a_hw_reset()
512 netdev_dbg(dev->net, "Write BQ setting failed: %d\n", in ax88772a_hw_reset()
518 phy14h = asix_mdio_read_nopm(dev->net, dev->mii.phy_id, in ax88772a_hw_reset()
520 phy15h = asix_mdio_read_nopm(dev->net, dev->mii.phy_id, in ax88772a_hw_reset()
522 phy16h = asix_mdio_read_nopm(dev->net, dev->mii.phy_id, in ax88772a_hw_reset()
525 netdev_dbg(dev->net, in ax88772a_hw_reset()
531 asix_mdio_write_nopm(dev->net, dev->mii.phy_id, in ax88772a_hw_reset()
535 asix_mdio_write_nopm(dev->net, dev->mii.phy_id, in ax88772a_hw_reset()
539 asix_mdio_write_nopm(dev->net, dev->mii.phy_id, in ax88772a_hw_reset()
548 netdev_dbg(dev->net, "Write IPG,IPG1,IPG2 failed: %d\n", ret); in ax88772a_hw_reset()
553 memcpy(data->mac_addr, dev->net->dev_addr, ETH_ALEN); in ax88772a_hw_reset()
574 netdev_dbg(dev->net, "RX_CTL is 0x%04x after all initializations\n", in ax88772a_hw_reset()
578 netdev_dbg(dev->net, in ax88772a_hw_reset()
610 netdev_dbg(dev->net, "ax88772_suspend: medium=0x%04x\n", in ax88772_suspend()
615 asix_mdio_read_nopm(dev->net, dev->mii.phy_id, MII_BMCR); in ax88772_suspend()
619 asix_mdio_read_nopm(dev->net, dev->mii.phy_id, MII_ADVERTISE); in ax88772_suspend()
639 asix_mdio_write_nopm(dev->net, dev->mii.phy_id, MII_ADVERTISE, in ax88772_restore_phy()
643 asix_mdio_write_nopm(dev->net, dev->mii.phy_id, MII_BMCR, in ax88772_restore_phy()
708 netdev_dbg(dev->net, "Failed to read MAC address: %d\n", ret); in ax88772_bind()
715 dev->mii.dev = dev->net; in ax88772_bind()
722 dev->net->netdev_ops = &ax88772_netdev_ops; in ax88772_bind()
723 dev->net->ethtool_ops = &ax88772_ethtool_ops; in ax88772_bind()
724 dev->net->needed_headroom = 4; /* cf asix_tx_fixup() */ in ax88772_bind()
725 dev->net->needed_tailroom = 4; /* cf asix_tx_fixup() */ in ax88772_bind()
735 netdev_dbg(dev->net, "PHYID=0x%08x\n", phyid); in ax88772_bind()
788 netdev_dbg(dev->net, "marvell_phy_init()\n"); in marvell_phy_init()
790 reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_MARVELL_STATUS); in marvell_phy_init()
791 netdev_dbg(dev->net, "MII_MARVELL_STATUS = 0x%04x\n", reg); in marvell_phy_init()
793 asix_mdio_write(dev->net, dev->mii.phy_id, MII_MARVELL_CTRL, in marvell_phy_init()
797 reg = asix_mdio_read(dev->net, dev->mii.phy_id, in marvell_phy_init()
799 netdev_dbg(dev->net, "MII_MARVELL_LED_CTRL (1) = 0x%04x\n", reg); in marvell_phy_init()
803 asix_mdio_write(dev->net, dev->mii.phy_id, in marvell_phy_init()
806 reg = asix_mdio_read(dev->net, dev->mii.phy_id, in marvell_phy_init()
808 netdev_dbg(dev->net, "MII_MARVELL_LED_CTRL (2) = 0x%04x\n", reg); in marvell_phy_init()
819 netdev_dbg(dev->net, "rtl8211cl_phy_init()\n"); in rtl8211cl_phy_init()
821 asix_mdio_write (dev->net, dev->mii.phy_id, 0x1f, 0x0005); in rtl8211cl_phy_init()
822 asix_mdio_write (dev->net, dev->mii.phy_id, 0x0c, 0); in rtl8211cl_phy_init()
823 asix_mdio_write (dev->net, dev->mii.phy_id, 0x01, in rtl8211cl_phy_init()
824 asix_mdio_read (dev->net, dev->mii.phy_id, 0x01) | 0x0080); in rtl8211cl_phy_init()
825 asix_mdio_write (dev->net, dev->mii.phy_id, 0x1f, 0); in rtl8211cl_phy_init()
828 asix_mdio_write (dev->net, dev->mii.phy_id, 0x1f, 0x0002); in rtl8211cl_phy_init()
829 asix_mdio_write (dev->net, dev->mii.phy_id, 0x1a, 0x00cb); in rtl8211cl_phy_init()
830 asix_mdio_write (dev->net, dev->mii.phy_id, 0x1f, 0); in rtl8211cl_phy_init()
838 u16 reg = asix_mdio_read(dev->net, dev->mii.phy_id, MARVELL_LED_MANUAL); in marvell_led_status()
840 netdev_dbg(dev->net, "marvell_led_status() read 0x%04x\n", reg); in marvell_led_status()
856 netdev_dbg(dev->net, "marvell_led_status() writing 0x%04x\n", reg); in marvell_led_status()
857 asix_mdio_write(dev->net, dev->mii.phy_id, MARVELL_LED_MANUAL, reg); in marvell_led_status()
872 netdev_dbg(dev->net, "GPIO Status: 0x%04x\n", status); in ax88178_reset()
878 netdev_dbg(dev->net, "EEPROM index 0x17 is 0x%04x\n", eeprom); in ax88178_reset()
889 netdev_dbg(dev->net, "GPIO0: %d, PhyMode: %d\n", gpio0, data->phymode); in ax88178_reset()
899 netdev_dbg(dev->net, "gpio phymode == 1 path\n"); in ax88178_reset()
906 netdev_dbg(dev->net, "PHYID=0x%08x\n", phyid); in ax88178_reset()
926 asix_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, in ax88178_reset()
928 asix_mdio_write(dev->net, dev->mii.phy_id, MII_CTRL1000, in ax88178_reset()
935 memcpy(data->mac_addr, dev->net->dev_addr, ETH_ALEN); in ax88178_reset()
955 netdev_dbg(dev->net, "ax88178_link_reset()\n"); in ax88178_link_reset()
976 netdev_dbg(dev->net, "ax88178_link_reset() speed: %u duplex: %d setting mode to 0x%04x\n", in ax88178_link_reset()
1012 if (dev->net->mtu > 1500) in ax88178_set_mfb()
1022 static int ax88178_change_mtu(struct net_device *net, int new_mtu) in ax88178_change_mtu() argument
1024 struct usbnet *dev = netdev_priv(net); in ax88178_change_mtu()
1025 int ll_mtu = new_mtu + net->hard_header_len + 4; in ax88178_change_mtu()
1027 netdev_dbg(dev->net, "ax88178_change_mtu() new_mtu=%d\n", new_mtu); in ax88178_change_mtu()
1035 net->mtu = new_mtu; in ax88178_change_mtu()
1036 dev->hard_mtu = net->mtu + net->hard_header_len; in ax88178_change_mtu()
1067 netdev_dbg(dev->net, "Failed to read MAC address: %d\n", ret); in ax88178_bind()
1074 dev->mii.dev = dev->net; in ax88178_bind()
1082 dev->net->netdev_ops = &ax88178_netdev_ops; in ax88178_bind()
1083 dev->net->ethtool_ops = &ax88178_ethtool_ops; in ax88178_bind()