From patchwork Sat Feb 6 14:47:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 8242621 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5A1FABEEE5 for ; Sat, 6 Feb 2016 14:47:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B61B720211 for ; Sat, 6 Feb 2016 14:47:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0983520204 for ; Sat, 6 Feb 2016 14:47:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751939AbcBFOr0 (ORCPT ); Sat, 6 Feb 2016 09:47:26 -0500 Received: from mail-lf0-f51.google.com ([209.85.215.51]:33775 "EHLO mail-lf0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751414AbcBFOrZ (ORCPT ); Sat, 6 Feb 2016 09:47:25 -0500 Received: by mail-lf0-f51.google.com with SMTP id m1so74413046lfg.0 for ; Sat, 06 Feb 2016 06:47:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=inbrDbULltSYkR2fCt/GhRAv6hR5GtmUqX6cwIcmZEA=; b=P407QHeQtPRPWr4MneRUhkzMnAhiB5LxnWDW3yvKATSF2N73JAFThj9N+U8M+gW3V/ DmzVpiJMuAHzCfnecQZH8erHnwBSVRJdScoTxZMpXZfbrNDMZ9wrvMOzshnY/fTPT2Fg Snf0kypy/hCGJNQdGritPWp7VE/vQWQM9Ijl06FM3TMQmKqydReKoSMSqfctoYvDr/5m cArYxK3cfP+qvnL7nmdC98OVr+8nn13jwsu7enWn8A284or/BuKEOOmFjy04fh04GnS4 Ur2EvXQ0iv6l/qqol6ZC0FQjf1fUCqzj6/GQYFeT9kPVEvapQrYnkGFC8hxxwumzR4yk d1ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=inbrDbULltSYkR2fCt/GhRAv6hR5GtmUqX6cwIcmZEA=; b=M0BSmngFG5i08SpKBdN7REpaAEprfyKvn+5cJxGRb0j8fMN3MjrMV9moTfRiQIBb0g la7McZGE5180M0YyAIztgETlcK5b3AsRhyhgwZxQ1S1MOYjFqlCt4vDVksjTWahv1I// QtDVUCKmqBB+vftIEMPlj34s7ks1mDvjmCujm2JLNYkULkYjNzxUfd3IOBmqag6lLu8n fJ0ViNr7xhHpeTF1rdVP6rxAdAYuga5cPgHyi+A16f0wX8IeblgbevdubqwkJ+Y+uAHI xJE5sclvfwC7urbju6ggvrNy5EwLrTyrQwxjbLacq7k0E59Ju7h+pvfwjaDKI6Uqxci0 PPWg== X-Gm-Message-State: AG10YOQmK04FqDnhdWh8MDgLL5sDJO+tCJxFSB6gGw7oNoYkXCve9bFwVaMqRzP4FveViQ== X-Received: by 10.25.154.14 with SMTP id c14mr2089533lfe.35.1454770044426; Sat, 06 Feb 2016 06:47:24 -0800 (PST) Received: from wasted.cogentembedded.com ([195.16.111.103]) by smtp.gmail.com with ESMTPSA id dm7sm2805120lbc.32.2016.02.06.06.47.23 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 06 Feb 2016 06:47:23 -0800 (PST) From: Sergei Shtylyov To: netdev@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org Subject: [PATCH 2/2] ravb: skip gPTP start/stop on R-Car gen3 Date: Sat, 06 Feb 2016 17:47:22 +0300 Message-ID: <1661604.7YJiO2yUKB@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.10 (Linux/4.2.8-200.fc22.x86_64; KDE/4.14.14; x86_64; ; ) In-Reply-To: <15000430.RmSAhz5Ejy@wasted.cogentembedded.com> References: <15000430.RmSAhz5Ejy@wasted.cogentembedded.com> MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When adding support for the R-Car gen3 gPTP active in configuration mode, some call sites of ravb_ptp_{init|stop}() were missed due to an oversight. Add checks for the R-Car gen2 SoCs around these... Fixes: f5d7837f96e5 ("ravb: ptp: Add CONFIG mode support") Signed-off-by: Sergei Shtylyov --- drivers/net/ethernet/renesas/ravb_main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) Index: net/drivers/net/ethernet/renesas/ravb_main.c =================================================================== --- net.orig/drivers/net/ethernet/renesas/ravb_main.c +++ net/drivers/net/ethernet/renesas/ravb_main.c @@ -1139,7 +1139,8 @@ static int ravb_set_ringparam(struct net if (netif_running(ndev)) { netif_device_detach(ndev); /* Stop PTP Clock driver */ - ravb_ptp_stop(ndev); + if (priv->chip_id == RCAR_GEN2) + ravb_ptp_stop(ndev); /* Wait for DMA stopping */ error = ravb_stop_dma(ndev); if (error) { @@ -1170,7 +1171,8 @@ static int ravb_set_ringparam(struct net ravb_emac_init(ndev); /* Initialise PTP Clock driver */ - ravb_ptp_init(ndev, priv->pdev); + if (priv->chip_id == RCAR_GEN2) + ravb_ptp_init(ndev, priv->pdev); netif_device_attach(ndev); } @@ -1298,7 +1300,8 @@ static void ravb_tx_timeout_work(struct netif_tx_stop_all_queues(ndev); /* Stop PTP Clock driver */ - ravb_ptp_stop(ndev); + if (priv->chip_id == RCAR_GEN2) + ravb_ptp_stop(ndev); /* Wait for DMA stopping */ ravb_stop_dma(ndev); @@ -1311,7 +1314,8 @@ static void ravb_tx_timeout_work(struct ravb_emac_init(ndev); /* Initialise PTP Clock driver */ - ravb_ptp_init(ndev, priv->pdev); + if (priv->chip_id == RCAR_GEN2) + ravb_ptp_init(ndev, priv->pdev); netif_tx_start_all_queues(ndev); }