Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757165AbcK3Ita (ORCPT ); Wed, 30 Nov 2016 03:49:30 -0500 Received: from asix.com.tw ([113.196.140.82]:16054 "EHLO freebsd2.asix.com.tw" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751382AbcK3ItW (ORCPT ); Wed, 30 Nov 2016 03:49:22 -0500 X-Greylist: delayed 1158 seconds by postgrey-1.27 at vger.kernel.org; Wed, 30 Nov 2016 03:49:18 EST Reply-To: From: "ASIX_Allan [Office]" To: "'Jon Hunter'" , , , , , , , , , , , , , , , , , , Subject: [PATCH] net: asix: Fix AX88772_suspend() USB vendor commands failure issues Date: Wed, 30 Nov 2016 16:29:08 +0800 Organization: ASIX Message-ID: <00d701d24ae3$d4f4f2a0$7eded7e0$@asix.com.tw> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AdJK44Bui2cK2wEXQyuKwckoChCbIQ== Content-Language: zh-tw Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 868 Lines: 27 The change fixes AX88772_suspend() USB vendor commands failure issues. Signed-off-by: Allan Chou Tested-by: Allan Chou Tested-by: Jon Hunter --- --- a/drivers/net/usb/asix_devices.c 2016-11-28 05:08:04.000000000 +0800 +++ b/drivers/net/usb/asix_devices.c 2016-11-30 09:31:54.000000000 +0800 @@ -603,12 +603,12 @@ static void ax88772_suspend(struct usbne 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 =