Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1908731ima; Mon, 22 Oct 2018 00:17:39 -0700 (PDT) X-Google-Smtp-Source: AJdET5fP8WnzSZEFHcWfSs49oT5us0/OT9TPnqGLF4uxqG+hHxa3s/2x4lABZRiKC/QAhkzmUgGH X-Received: by 2002:a17:902:bf41:: with SMTP id u1-v6mr5902642pls.10.1540192659216; Mon, 22 Oct 2018 00:17:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540192659; cv=none; d=google.com; s=arc-20160816; b=Lg6ZNSovpEhAJ9cK17/7AsFkvMN3cRadA3p80Oc9MIuDePbh5ijAWpbuV8+l9/D9dk rExyb3MariGOpgBe74Ce12SlUocEQXN01AuZuO7pZtErPjsWdkMAt3kq0Cc24Jzbc898 WVotEro0IAw9lYIxBeiqrxg2T4ga6h+LVStdYmz3EcMnw2vomeW2RY4XYgndi0m2QEW/ q8l+NkxWdS0KnALVmig7R4Houak7qWXAsTjTvSHgh2bqK9MyvmcDj8V6xrblhqEAf76p w8FEB0In+Tn2XpsqR6sY78C8dVVfBMYaoVRWymPLXBLSBEbK+G/UfbxlUt9Ozd1/Eg5c JcJg== 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:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=N082TBwdItqOjWCvJaTKJOyv8lwH8iRH9kctVLZxqjg=; b=dzeNFuFnoJkp/Zk0H4AFdk94EjJg8Sp/j7X/qbF0JhHJ2cfgXwcNmcWMb8W6ZHSlhf NDOEoq1va44ZwvxYJ7k1z3w1Mlknj5cwUdqGTz0onnxMNnBaNP3w/bMLKe7wI3QhkkPi yCpozHi4nwgeFuY4LogiScLWyMaIyK1lj4iFNo9RqFETUZsNHVpqVfqv0RKcHCcc3eFK eamJkQakBkf+ijJTD8ee0qkbsUtL0lQQnys7ChumBJAX2uJJxV2GKA7bcaZGGtLv5eGo kG/Nxb2zgDQSUYoUf4mspcBpQ0yEL13GG1RyBG0t6LAq90s0Oyfx0f3yMtyEekBsV6iA 5oKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@as-electronics.de header.s=strato-dkim-0002 header.b=VK0eIs9S; 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 w15-v6si32532907pgg.529.2018.10.22.00.17.23; Mon, 22 Oct 2018 00:17:38 -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=VK0eIs9S; 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 S1727709AbeJVPcW (ORCPT + 99 others); Mon, 22 Oct 2018 11:32:22 -0400 Received: from mo4-p05-ob.smtp.rzone.de ([81.169.146.181]:33351 "EHLO mo4-p05-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727521AbeJVPcW (ORCPT ); Mon, 22 Oct 2018 11:32:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1540192501; s=strato-dkim-0002; d=as-electronics.de; h=In-Reply-To:Date:Message-ID:From:References:Cc:To:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=N082TBwdItqOjWCvJaTKJOyv8lwH8iRH9kctVLZxqjg=; b=VK0eIs9S2lO2NNP90rmprLoQixIoO6xIhqHwvEM2w9soKHNHcdkmg301yOKgZhZNFr 5SugyUEuty6KH8yb2c86ZGMYvM3/oCrDRm1vXD9WUMfycaopWsHpso/e7744+sdy0Tv2 7hjcaB6jNBY7OdiuqQ165iVOtjqh5Gs5U9oDR9L8pI+97u4q+uExJyoV9l4UljJVYZHP 7CV2V0vbWCg4dBD+im69l2ejVlI22/jPBC+wX0qmnMZ4lO9Wl0ast3aLGMJgXIvbqvMw C+lo6tYnXqwsx+yHQd8nOap3vv2oLpMtdwQ1YlsN6fU4z1fHjhBjjPk9h0BR52dIzn9F 2epA== X-RZG-AUTH: ":LX8JdEmkW/4tAFwMkcNJIloh1hrA5u3owhPk7bdT5Fx2zAOrX/r2ZbrrxoyMly7vtKoBCSu4zR9/f0shzjGSYbJY5KbsbrlTGd0CtJA=" X-RZG-CLASS-ID: mo05 Received: from [IPv6:2003:a:e7a:6200:246c:2a8b:f45a:a33d] by smtp.strato.de (RZmta 44.3 AUTH) with ESMTPSA id j097e4u9M7EkQXQ (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); Mon, 22 Oct 2018 09:14:46 +0200 (CEST) Subject: Re: SMSC9730 Autosuspend/Resume Questions To: Nisar.Sayed@microchip.com, steve.glendinning@shawell.net, UNGLinuxDriver@microchip.com, davem@davemloft.net, netdev@vger.kernel.org Cc: oneukum@suse.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <69e14429-a4d9-dd5c-5e70-c22086490cc0@exceet.de> From: Frieder Schrempf Message-ID: Date: Mon, 22 Oct 2018 09:14:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: 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 Nisar, On 22.10.18 09:03, Nisar.Sayed@microchip.com wrote: > Hi Frieder, > >> 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? >> > > Link status bit is latch low register and needs to be read twice. You may get wrong Link status with this fix. Ok, thanks for the information. I guess I'll have to do some more debugging to find out why the second read fails in my case. Frieder