Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp791674imm; Wed, 17 Oct 2018 08:22:37 -0700 (PDT) X-Google-Smtp-Source: ACcGV63CbkQtR20vBrqtYF47W33lHjtEs2IKe31gfE9yISnd9+lN8EqCt3G9+2PtUqQkDndHAWxA X-Received: by 2002:a17:902:7e41:: with SMTP id a1-v6mr25911968pln.149.1539789757803; Wed, 17 Oct 2018 08:22:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539789757; cv=none; d=google.com; s=arc-20160816; b=AuzBnEj+msvVoif8veKIK1YoWStbTXn7Q75r45Eh0w0itgPFc9rjbYE7nDQLvBGW91 Q7C5KMrodqsXyr1ckDcmYA6tgh97wJv0l5G0XCukak5wFOFKc38P7qfZ+80nl6qxYzIv 35apXL7K68pyRJru/TZtloUHDfLheLaCgZkhd2DaPaIOJXV4KjExF8dqh7jwY3RV/0g6 A0JLz8g3gr9xv6pocveMdWoq19+akuD2AWWytXWzwfD4LU5xY2j5EtvqwYGQOZvraA1B cJ3GYAntSC7qIkdTeP0jlGq/S2WsLIaEPiRIFti6n3YYS5jIeGyTcpSVzGlf+t9hHlPV XDTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:dkim-signature; bh=C6EY7uOX0QNZR871Nv8ev4y4/7sFWMIzE+oda5L4baU=; b=K1kwhxn41YtDsrlS88atNSvgTpMi9LSYGT3FLVQkOw8JfRt1mYiflBDVBSwKx8ua6L LztZLvgO2zKdoPrk7fUvOb2LKWtcp8s8rm6tLN2cT/wKJYykFayGGSeBcjGqPwXcK2H1 2uyAy1pIQQ+v8GAVRVe/CwwF7Steab1HQShV8xp0xzkf/wZ7IKXSzpcv3Ov+OIF5IE/q w0mv9aAqDRvhuPA3Vh5RLMzMk0ORK5GdYjxxqRQcXx+s4GxtP4q/2SCrGFecvhxJGMu2 Ioj3scOktNk0E8X1CWCHtbBSke6RtUqXwO+BSssWJQpnHc9Pa2rLPh+aD2gt5NA/kjjS X42g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@as-electronics.de header.s=strato-dkim-0002 header.b=j+bnPm8k; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8-v6si18245009plh.376.2018.10.17.08.22.22; Wed, 17 Oct 2018 08:22:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@as-electronics.de header.s=strato-dkim-0002 header.b=j+bnPm8k; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727665AbeJQXRg (ORCPT + 99 others); Wed, 17 Oct 2018 19:17:36 -0400 Received: from mo4-p05-ob.smtp.rzone.de ([85.215.255.132]:35518 "EHLO mo4-p05-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727013AbeJQXRg (ORCPT ); Wed, 17 Oct 2018 19:17:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1539789683; s=strato-dkim-0002; d=as-electronics.de; h=Date:Message-ID:Subject:From:Cc:To:X-RZG-CLASS-ID:X-RZG-AUTH:From: Subject:Sender; bh=C6EY7uOX0QNZR871Nv8ev4y4/7sFWMIzE+oda5L4baU=; b=j+bnPm8kkeNbdip+qcok4YjWhu3jik73/poEmr6rYAjyLR70LTwfCMhk/YHCMSO0MG Owp1Bj0hXl5vxq4oRPdyMJXqQrVmkWwg+QM7WIeY3ZvZWKr90bzljK7QNO0WTDiFw+Xu RiJmmumrV1rni/CN9UsuUlJieS77miJ1IwhbzOqGCBXI5FrCYl785igILmkkHS/JI1aw QuKXpdD0Xq98TTtPA9rFpKahn68zwRpmWg7nMEinr1LyIhAdudjTROZ0dtB+knB0BEeq QYgBWSac9FSyJV3h0uSw8cxuXA0iznbn/LK9ACmVsRxwQcjxWjR6SQlffx7FQb5BRupe vOOQ== X-RZG-AUTH: ":LX8JdEmkW/4tAFwMkcNJIloh1hrA5u3owhPk7bdT5Fx2zAOrX/r2ZbrrxoyOl37jyAS87PDYc9YKfwuBYn/jMBd7vlJpQPmeB0vtXIc5Jks=" X-RZG-CLASS-ID: mo05 Received: from [IPv6:2001:16b8:2486:2400:6544:b26:3ad8:8c5e] by smtp.strato.de (RZmta 44.3 AUTH) with ESMTPSA id j097e4u9HFLCDgg (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Wed, 17 Oct 2018 17:21:12 +0200 (CEST) To: Steve Glendinning , Microchip Linux Driver Support , "David S. Miller" , netdev@vger.kernel.org Cc: Oliver Neukum , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org From: Frieder Schrempf Subject: SMSC9730 Autosuspend/Resume Questions Message-ID: <69e14429-a4d9-dd5c-5e70-c22086490cc0@exceet.de> Date: Wed, 17 Oct 2018 17:21:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I recently tested a board with SMSC9730 connected via USB HSIC to an i.MX6S SOC. I used these patches on top of v4.14-rc8 for the USB HSIC support: [1]. When I turned on autosuspend, the smsc95xx stopped in the middle of the suspending routine and /sys/bus/usb/devices/usb3/3-1/power/runtime_status reported "suspending" forever. With some debug logs I found out, that the last line of code that was executed is [2], after that I didn't get any further messages. Then I applied the following diff and the suspend/resume started to work reliably: @@ -1382,10 +1385,11 @@ static int smsc95xx_link_ok_nopm(struct usbnet *dev) ret = smsc95xx_mdio_read_nopm(dev->net, mii->phy_id, MII_BMSR); if (ret < 0) return ret; - + /* ret = smsc95xx_mdio_read_nopm(dev->net, mii->phy_id, MII_BMSR); if (ret < 0) return ret; + */ return !!(ret & BMSR_LSTATUS); } So it seems like the dummy read, that is commented with "first, a dummy read, needed to latch some MII phys" causes problems in my setup. Do you have an idea what could be the reason? Is this a proper fix? Thanks, Frieder [1] https://patchwork.kernel.org/cover/10643089/ [2] https://github.com/torvalds/linux/blob/bab5c80b211035739997ebd361a679fa85b39465/drivers/net/usb/smsc95xx.c#L1382