Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757083AbcK2Kvp (ORCPT ); Tue, 29 Nov 2016 05:51:45 -0500 Received: from hqemgate15.nvidia.com ([216.228.121.64]:9347 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756034AbcK2Kvh (ORCPT ); Tue, 29 Nov 2016 05:51:37 -0500 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 29 Nov 2016 02:51:35 -0800 Subject: Re: [PATCH v3 3/5] net: asix: Fix AX88772x resume failures To: , , , , , , , , , , , , , , , , , , References: <77fa76d6-ef63-47db-a316-93b3a0c0705b@nvidia.com> <00e501d23e54$337d4b70$9a77e250$@asix.com.tw> <010d01d23e5b$d8993130$89cb9390$@asix.com.tw> <1fff2d2a-7bbe-298c-3d27-7dc44df08675@nvidia.com> <6aebd7f5-188a-f6b0-7eb0-75b764e069d3@nvidia.com> <014301d24a1e$34513fe0$9cf3bfa0$@asix.com.tw> From: Jon Hunter Message-ID: Date: Tue, 29 Nov 2016 10:51:20 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <014301d24a1e$34513fe0$9cf3bfa0$@asix.com.tw> X-Originating-IP: [10.21.132.139] X-ClientProxiedBy: DRUKMAIL101.nvidia.com (10.25.59.19) To UKMAIL101.nvidia.com (10.26.138.13) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1414 Lines: 45 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 Cheers Jon -- nvpublic