]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
net: usb: asix: ax88772: do not poll for PHY before registering it
authorOleksij Rempel <o.rempel@pengutronix.de>
Thu, 22 Jul 2021 07:23:38 +0000 (09:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Jul 2021 07:50:47 +0000 (00:50 -0700)
asix_get_phyid() is used for two reasons here. To print debug message
with the PHY ID and to wait until the PHY is powered up.

After migrating to the phylib, we can read PHYID from sysfs. If polling
for the PHY is really needed, then we will need to handle it in the
phylib as well.

This change was tested with:
- ax88772a + internal PHY
- ax88772b + external PHY

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/asix_devices.c

index 2c115216420a4343f74340ab2a29109b8e4c6d6b..049c20342a0b19a8f5a33f0abef27bf7d1eb36f3 100644 (file)
@@ -714,7 +714,6 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
        u8 buf[ETH_ALEN] = {0}, chipcode = 0;
        struct asix_common_private *priv;
        int ret, i;
-       u32 phyid;
 
        usbnet_get_endpoints(dev, intf);
 
@@ -762,10 +761,6 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
                return ret;
        }
 
-       /* Read PHYID register *AFTER* the PHY was reset properly */
-       phyid = asix_get_phyid(dev);
-       netdev_dbg(dev->net, "PHYID=0x%08x\n", phyid);
-
        /* Asix framing packs multiple eth frames into a 2K usb bulk transfer */
        if (dev->driver_info->flags & FLAG_FRAMING_AX) {
                /* hard_mtu  is still the default - the device does not support