Thread (8 messages) flat view 8 messages, 2 authors, 2016-11-29

Re: [PATCH v3 3/5] net: asix: Fix AX88772x resume failures

From: Jon Hunter <jonathanh@nvidia.com>
Date: 2016-11-29 10:51:45
Also in: lkml

Hi Allan,

On 29/11/16 08:54, ASIX_Allan [Office] wrote:
Dear Jon ,

We can reproduce your issue on x86 Linux kernel 4.9.0-rc system in our site
and modified the following code can fix this issue. Please let us know if
you still have problems. Thanks a lot.

static void ax88772_suspend(struct usbnet *dev)
{
        struct asix_common_private *priv = dev->driver_priv;
        u16 medium;

        /* Stop MAC operation */
-       medium = asix_read_medium_status(dev, 0);
+      medium = asix_read_medium_status(dev, 1);
        medium &= ~AX_MEDIUM_RE;
-       asix_write_medium_mode(dev, medium, 0);
+      asix_write_medium_mode(dev, medium, 1);

        netdev_dbg(dev->net, "ax88772_suspend: medium=0x%04x\n",
-                  asix_read_medium_status(dev, 0));
+                 asix_read_medium_status(dev, 1));

        /* Preserve BMCR for restoring */
        priv->presvd_phy_bmcr =
                asix_mdio_read_nopm(dev->net, dev->mii.phy_id, MII_BMCR);

        /* Preserve ANAR for restoring */
        priv->presvd_phy_advertise =
                asix_mdio_read_nopm(dev->net, dev->mii.phy_id,
MII_ADVERTISE);
} 
I gave this a quick test this morning and I can confirm that with the
above change I no longer see the error messages. So feel free to add my ...

Tested-by: Jon Hunter <jonathanh@nvidia.com>

Cheers
Jon

-- 
nvpublic
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help