Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1694065imu; Wed, 28 Nov 2018 13:34:50 -0800 (PST) X-Google-Smtp-Source: AFSGD/V5sMlxTsmC+vCCTUBdc+jKzq/aNxr4bVk0oG2qk2gb3JR5fY7xfpsvrEfrMgX8mcdFj7Z2 X-Received: by 2002:a63:b105:: with SMTP id r5mr34956321pgf.442.1543440890906; Wed, 28 Nov 2018 13:34:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543440890; cv=none; d=google.com; s=arc-20160816; b=Dwk6pV45ih1HtKztmdasAI/fkQbBnGNHlR5kun8kYcEF5BIevFXYUx/I1QbG5iVdEw cLKoZuy3S4qqJ8Kx8VmZ9iM+SYwX6yc4RYrViwifdqWtykHpoKiZIPS6rcnNkFA/NUSv qjNyZd+RQlfgXZ+E9a07vb66Iw/haIGYKyeIlbpH0laYPHQ2UNF6I6jmcPke54sfkp4G JzrNeEfAu1GK37uOgj3lUuz9RmcKLkRPISq61ZXrHSPdBzY1jpkjuxlGguQEzhkVJAOx fvYGaO7Vi706X6pFNh3yTvIzZRsfWiBwNKs46/MptnRP8Pmo/1HwL+uIszUyugNmTbTb p0cg== 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=0jua4ohHarymDilJvf+9N1OGOxVFDeJYtrC99WQES18=; b=ThVK8a1lLIn8BdWYU/fg+6gsl4XhJpR5fE9z7iaUIYt7oW2bGKk3J2HiwAvM52850P dgkb30JHHHhDeDmypigSasoUkM2tXvQJxybqk8lYc82aWOXGxesI/sSudbMi3fAGevFD TIlV4PPF84gHvd53441JfC3PqwaE8rGyKaoz667zUAbP8/tBr6KvOQghgb8l6vUIhusr /igOqS596WvzvLuOtPlTqGu+zygEBrurzwlrcxN+irkmDZzmU7xdOYvfN/xAmlpvs5W3 T4JOdJIr6Av9Lw7otn24YdfXbiDd9SXOzAlBktiEKnZi9CYc/EsS3dbgy6AeR3+zS/61 swEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AvwQPkc4; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1si8400847plt.44.2018.11.28.13.34.33; Wed, 28 Nov 2018 13:34:50 -0800 (PST) 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=pass header.i=@gmail.com header.s=20161025 header.b=AvwQPkc4; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726413AbeK2Ig4 (ORCPT + 99 others); Thu, 29 Nov 2018 03:36:56 -0500 Received: from mail-wr1-f50.google.com ([209.85.221.50]:36377 "EHLO mail-wr1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726283AbeK2Ig4 (ORCPT ); Thu, 29 Nov 2018 03:36:56 -0500 Received: by mail-wr1-f50.google.com with SMTP id t3so27797725wrr.3; Wed, 28 Nov 2018 13:33:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0jua4ohHarymDilJvf+9N1OGOxVFDeJYtrC99WQES18=; b=AvwQPkc4n2QM4meiCabWuExt/hYJ7TCsp57ICtVn+846l5JySAWOXIroKL5PWlHy0W vDvHnfpprmUWv0wZX6wUJHNQHOUtuYrMMHm8Rea2IQNHuw1PXnjk8HmCO8ZZqVxjPowU R8NtJifa4G/GL4ekUgY0LEBo76GGNhQSsawNp5eipnzBpLGk8f6B1l/iN6zbr5hYYEWX B7zppXf7EupXGe9rMhzX/jgKy6zdxdq3AjSKmzWbAiUqktPp7DVOwlJR9wFevIP3ksy3 7+xvw7cLYihVfzDXBZNNd4/xBYmnI5pRFIHmfnQceEWCZdj5zAnOMwaexh+nYXlHj/wS /PeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0jua4ohHarymDilJvf+9N1OGOxVFDeJYtrC99WQES18=; b=NRC5/fKni+uTBbMClLlugE01jFWZbl8Yj7UNlnGumwkP6wmgPXE4ZYdqsxECltQqmd zb0dL2QvHXOsY12ylSG6f/3rsYCefBkgvGHRPFNt6KLnKVCL06W9M3AEGNTGpMbyylu9 /wPC9bX0WP7n2TyHsnDRuVDNj8BWkTfZYKmZfDOzowgXJEkuXNDyWZyllECzcwVHRS01 drV+KW7T4lrudU8Ca+tqtMR6zRAqAwssn9UORbHKCg+o2+sCw5NfvIfLeUB/k8Zrjmuo KnSklphfluiAXYxeIHe7ViakMj9miVvFPHnPVvthkXkto8ChAw+YwEACjDwsz40oFrtN E+rw== X-Gm-Message-State: AA+aEWaIFU57zYtLGbtKh2HuRf7QWmJ+D6kCZIva9A9mPsP+5suycFa6 +XZ+1RVF2Jk3iCtpzWdn5B8= X-Received: by 2002:a5d:4f10:: with SMTP id c16mr33567976wru.177.1543440833113; Wed, 28 Nov 2018 13:33:53 -0800 (PST) Received: from [10.0.2.15] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id h62sm95924wmf.11.2018.11.28.13.33.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Nov 2018 13:33:52 -0800 (PST) Subject: Re: macb: probe of 10090000.ethernet failed with error -110 To: Atish Patra , Andreas Schwab , Nicolas Ferre Cc: "netdev@vger.kernel.org" , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Andrew Lunn , hkallweit1@gmail.com References: From: Florian Fainelli Message-ID: <2e17bba6-d932-37b2-5dca-0963fc50f5e6@gmail.com> Date: Wed, 28 Nov 2018 13:33:47 -0800 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 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +Andrew, Heiner, On 11/28/18 10:15 AM, Atish Patra wrote: > On 11/28/18 2:11 AM, Andreas Schwab wrote: >> The PHY probing of the macb driver appears to be rather unreliable. >> Most of the time it doesn't work the first time, I have to reload the >> module several times to let it succeed. >> >> [   40.530000] macb: GEM doesn't support hardware ptp. >> [   40.530000] libphy: MACB_mii_bus: probed >> [   41.450000] macb 10090000.ethernet (unnamed net_device) >> (uninitialized): Could not attach to PHY >> [   41.510000] macb: probe of 10090000.ethernet failed with error -110 >> [ 1354.400000] macb: GEM doesn't support hardware ptp. >> [ 1354.410000] libphy: MACB_mii_bus: probed >> [ 1355.260000] macb 10090000.ethernet (unnamed net_device) >> (uninitialized): Could not attach to PHY >> [ 1355.300000] macb: probe of 10090000.ethernet failed with error -110 >> [ 1358.100000] macb: GEM doesn't support hardware ptp. >> [ 1358.110000] libphy: MACB_mii_bus: probed >> [ 1358.310000] Microsemi VSC8541 SyncE 10090000.ethernet-ffffffff:00: >> attached PHY driver [Microsemi VSC8541 SyncE] >> (mii_bus:phy_addr=10090000.ethernet-ffffffff:00, irq=POLL) >> [ 1358.320000] macb 10090000.ethernet eth0: Cadence GEM rev 0x10070109 >> at 0x10090000 irq 12 (70:b3:d5:92:f1:07) >> >> This is 4.20-rc4 on a HiFive-U. >> >> Andreas. >> > > Here is my previous analysis on the issue. > http://lists.infradead.org/pipermail/linux-riscv/2018-September/001503.html > > Not sure if you have tried the hack already. But here it is anyways. > https://github.com/atishp04/riscv-linux/commit/aa230e7dc2ab01db5b630f427e57297ffc25c884 Andrew and I were discussing about this and we would recommend that you localize the workaround within the Vitesse PHY driver and within the driver's probe function. In order to avoid a chicken and egg problem though, you might have to change the PHY's compatible string in the Device Tree to include its PHY OUI, e.g: compatible = "ethernet-phy-1234.5678" which will force the OF layer registering MDIO/PHY devices to probe to the specific driver that matches that PHY. Let us know if this does not work, in which case we might have to introduce another DT property that indicate a "double reset" is required. -- Florian