From patchwork Wed Feb 1 21:02:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9550665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2B58F60236 for ; Wed, 1 Feb 2017 21:06:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E2CB28496 for ; Wed, 1 Feb 2017 21:06:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12ED1284A5; Wed, 1 Feb 2017 21:06:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C675E28496 for ; Wed, 1 Feb 2017 21:06:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cZ277-0006ik-9g; Wed, 01 Feb 2017 21:06:49 +0000 Received: from mail-wj0-f194.google.com ([209.85.210.194]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cZ273-0006gy-QX for linux-amlogic@lists.infradead.org; Wed, 01 Feb 2017 21:06:47 +0000 Received: by mail-wj0-f194.google.com with SMTP id kq3so14286647wjc.3 for ; Wed, 01 Feb 2017 13:06:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=K89aFyJOZ8iUShPaI0rcX/MfScGM8+pTQXZJK99Y7cE=; b=BtPQDdKBz/Hn37pP00O6uTjbz44mUVs1fnQyvaeqRPe9KwZ4GU1t5eBsTTNXqPxRAf JYwzVhZczMq1obqXQq5lnn2R7FcyuRNLgbZykxg2q35OD/uo9obbo1H2g9+XpmUiJ4iR r4p+tTFmQiP95PBO7dgNFdFpSit55m1clY57HOHZg8nXRjwxtNz6RByIJr4E/6a8im9+ SSTj7Zq5e8obq/ugC7jEkVHB8rij5qJ8uWTU9K6wwDgkQkawsOefw/h9xa40iTFtwdoy 6CgT9zjmL2njkKAgQt4pvHKNQawUbc7bitof/l6Nn/vchOQF+rNr8Q7XiCtuHynGcrIZ lJxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=K89aFyJOZ8iUShPaI0rcX/MfScGM8+pTQXZJK99Y7cE=; b=jbqr4Kpp5/5SeTlEi4g4zA/b5VsPuzfP86jG+1DcBq9BseOiEA98oA7JgGIkgUht/J ipm86AIOD/5Yrwy4VzB6JzHiq8tneA0+uUco20c7AaA7aV5ZU/cxQ4PzwyUsUfJQOVgD OHmUXLdoYWHSLZJwQrMNKl8WmfXYSukkzU70OoIP5R1YMFnlXXG8ybWsIt4TiZGjry6n FH+ocdYv+PACicOuf+MSR3h/KoCcLqrgGB/54gyGZ2MJOGiy7cGErjB7HEtEtCQXKujQ 3Hj/t2FwRB49mvtnbja1ViMavmT7mj1lj3ECGIuBHVHYoyNLuDlYbrO+rpbHTThTMo+g hJRQ== X-Gm-Message-State: AIkVDXIvZZCKe14eisAEikwz1lO/BLd67GGLYWxNeREEd6iVwTEaV5blhDoe+UXcPhHLxQ== X-Received: by 10.223.171.65 with SMTP id r1mr4376723wrc.38.1485983123399; Wed, 01 Feb 2017 13:05:23 -0800 (PST) Received: from ?IPv6:2003:c6:ebc5:6c00:7c0d:c568:586a:c33c? (p200300C6EBC56C007C0DC568586AC33C.dip0.t-ipconnect.de. [2003:c6:ebc5:6c00:7c0d:c568:586a:c33c]) by smtp.googlemail.com with ESMTPSA id i73sm31650939wmd.11.2017.02.01.13.05.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Feb 2017 13:05:22 -0800 (PST) To: David Miller From: Heiner Kallweit Subject: [PATCH] net: stmmac: add separate warning for PTP not being supported by HW Message-ID: <0983485b-418d-5c9b-e94b-8f4edc9f13cf@gmail.com> Date: Wed, 1 Feb 2017 22:02:02 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170201_130646_022733_B5DF9650 X-CRM114-Status: UNSURE ( 9.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "netdev@vger.kernel.org" , linux-amlogic@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Chips like Amlogic S905GXBB are supported by this driver but don't have support for PTP. Add a separate warning for missing HW support to differentiate it from other actual failures. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 26a2185f..bd83bf9e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1726,8 +1726,10 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp) if (init_ptp) { ret = stmmac_init_ptp(priv); - if (ret) - netdev_warn(priv->dev, "fail to init PTP.\n"); + if (ret == -EOPNOTSUPP) + netdev_warn(priv->dev, "PTP not supported by HW\n"); + else if (ret) + netdev_warn(priv->dev, "PTP init failed\n"); } #ifdef CONFIG_DEBUG_FS