From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 815C5C2D0EA for ; Thu, 9 Apr 2020 06:15:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 426D82072F for ; Thu, 9 Apr 2020 06:15:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=de.bosch.com header.i=@de.bosch.com header.b="WW8ZeOFu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726082AbgDIGPS (ORCPT ); Thu, 9 Apr 2020 02:15:18 -0400 Received: from de-out1.bosch-org.com ([139.15.230.186]:50304 "EHLO de-out1.bosch-org.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726052AbgDIGPS (ORCPT ); Thu, 9 Apr 2020 02:15:18 -0400 Received: from fe0vm1649.rbesz01.com (unknown [139.15.230.188]) by fe0vms0186.rbdmz01.com (Postfix) with ESMTPS id 48yW8d2Th1z1XLGvC; Thu, 9 Apr 2020 08:15:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=de.bosch.com; s=key3-intmail; t=1586412913; bh=QQnWX1HHy6PykuHJlNj2nWQVf1g9ixSCCO3f33fTj/w=; l=10; h=From:Subject:From:Reply-To:Sender; b=WW8ZeOFuycTa/lK64mX/fqtKm+QgabpINodcNNlsWc0kJO0fDXiflTevu+xvsvTo1 MIPISBHu0Yv9ZQjY+Wc3M0OuTzUW7jlb4Z35t01uCxrCQlq1jJQUjLH91za+YMQMmo WjiTrg9cWUtwtGCFDZfPMAmPfXF480FZZyb8l8AM= Received: from si0vm02576.rbesz01.com (unknown [10.58.172.176]) by fe0vm1649.rbesz01.com (Postfix) with ESMTPS id 48yW8d1zdTz2cb; Thu, 9 Apr 2020 08:15:13 +0200 (CEST) X-AuditID: 0a3aad0d-8f3ff700000068f0-7f-5e8ebd719086 Received: from si0vm1949.rbesz01.com ( [10.58.173.29]) (using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by si0vm02576.rbesz01.com (SMG Outbound) with SMTP id B0.6D.26864.17DBE8E5; Thu, 9 Apr 2020 08:15:13 +0200 (CEST) Received: from SI-HUB2000.de.bosch.com (si-hub2000.de.bosch.com [10.4.103.108]) by si0vm1949.rbesz01.com (Postfix) with ESMTPS id 48yW8d0mPhz6CjZNv; Thu, 9 Apr 2020 08:15:13 +0200 (CEST) Received: from HI-Z0EVG.hi.de.bosch.com (10.34.218.219) by SI-HUB2000.de.bosch.com (10.4.103.108) with Microsoft SMTP Server id 15.1.1979.3; Thu, 9 Apr 2020 08:15:12 +0200 From: Dirk Behme To: , Sergei Shtylyov CC: , , Julia Lawall Subject: [PATCH] ravb: Fix RAVB_RXTSTAMP_TYPE_ALL value Date: Thu, 9 Apr 2020 08:15:09 +0200 Message-ID: <20200409061509.13385-1-dirk.behme@de.bosch.com> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.34.218.219] X-Brightmail-Tracker: H4sIAAAAAAAAA22Sa0xTZxjH+/a0cFo5cCi3xyqihRgk4yLjFsaMMkiIt0zCFmNG8UCPbbFc 1hYE9wFEQrBDbg65DZgKEZFrjY4GNmJxGBiNSMiwzAsgzMqYU8EwlMh6VpB+2Lf/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Nm4uYHHoWmy8Ihksb7qaWYD 71Z0K3aHd8B7tGm8OC+yN+Iv+wH/Us0fmTsu7t/uWp8+62UInT60lBO7M0malCR5GBLlb9/x YNzkdfSGsW4ppzH1ros8uiXdsYqFH/x9WecUG0R59XckTs8Z1Ljvz3tEHJWM2u2DKVXUv2jV BH67BAAA Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org In the function ravb_hwtstamp_get() in ravb_main.c with the existing values for RAVB_RXTSTAMP_TYPE_V2_L2_EVENT (0x2) and RAVB_RXTSTAMP_TYPE_ALL (0x6) if (priv->tstamp_rx_ctrl & RAVB_RXTSTAMP_TYPE_V2_L2_EVENT) config.rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT; else if (priv->tstamp_rx_ctrl & RAVB_RXTSTAMP_TYPE_ALL) config.rx_filter = HWTSTAMP_FILTER_ALL; if the test on RAVB_RXTSTAMP_TYPE_ALL should be true, it will never be reached. Correct this by changing RAVB_RXTSTAMP_TYPE_ALL to 0x4. While at it, drop two unused macros. Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") Reported-by: Julia Lawall Suggested-by: Sergei Shtylyov Signed-off-by: Dirk Behme --- drivers/net/ethernet/renesas/ravb.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h index 9f88b5db4f89..5a05b74a6fe6 100644 --- a/drivers/net/ethernet/renesas/ravb.h +++ b/drivers/net/ethernet/renesas/ravb.h @@ -35,13 +35,11 @@ #define RAVB_ALIGN 128 /* Hardware time stamp */ -#define RAVB_TXTSTAMP_VALID 0x00000001 /* TX timestamp valid */ #define RAVB_TXTSTAMP_ENABLED 0x00000010 /* Enable TX timestamping */ -#define RAVB_RXTSTAMP_VALID 0x00000001 /* RX timestamp valid */ #define RAVB_RXTSTAMP_TYPE 0x00000006 /* RX type mask */ #define RAVB_RXTSTAMP_TYPE_V2_L2_EVENT 0x00000002 -#define RAVB_RXTSTAMP_TYPE_ALL 0x00000006 +#define RAVB_RXTSTAMP_TYPE_ALL 0x00000004 #define RAVB_RXTSTAMP_ENABLED 0x00000010 /* Enable RX timestamping */ enum ravb_reg { -- 2.20.0