Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756008AbeAHKcd (ORCPT + 1 other); Mon, 8 Jan 2018 05:32:33 -0500 Received: from mail-bn3nam01on0070.outbound.protection.outlook.com ([104.47.33.70]:3626 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755158AbeAHKca (ORCPT ); Mon, 8 Jan 2018 05:32:30 -0500 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Yangbo Lu To: Claudiu Manoil , Richard Cochran , , CC: Yangbo Lu Subject: [PATCH] net: gianfar_ptp: move set_fipers() to spinlock protecting area Date: Mon, 8 Jan 2018 18:13:11 +0800 Message-ID: <20180108101311.23581-1-yangbo.lu@nxp.com> X-Mailer: git-send-email 2.14.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131598811191870794;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(39860400002)(346002)(396003)(376002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(8656006)(498600001)(53936002)(50226002)(51416003)(59450400001)(36756003)(2906002)(77096006)(305945005)(6666003)(48376002)(8936002)(4326008)(1076002)(68736007)(316002)(110136005)(85426001)(2201001)(5660300001)(39060400002)(105606002)(97736004)(86362001)(81156014)(81166006)(8676002)(50466002)(104016004)(106466001)(16586007)(47776003)(356003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR03MB2693;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD003;1:eCLxmKerkdAa1foKnfAv1m7PQ+JG6SNOISS3Vu7jhjXzI1UIGZ2nZd24VHa4LZIixHkn8NMIcUFv5cDzU6mM+wcIfYdAG0OgPk2OLZcLe2yhFN4xuQ+7TEeqT88dlz6K MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bf01c785-5398-412c-854a-08d556830c6b X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307);SRVR:CY4PR03MB2693; X-Microsoft-Exchange-Diagnostics: 1;CY4PR03MB2693;3:vDKsdX+hyq6nEGP46Tw+Djc9FwWh/MKXFen+yTISPUp/ifoRf7NZ29QR/2V+7FCjWx+9Q8+ub3H+Y4B59uU4jRgSi4wQCK3/RTw2PnFTapEG3V9QJ3Pzg0drjbYcV464UGbs79eg9WHt+b8RM9CQRWHKBt8BYy3wp/sEFO0+ClFT0c9fKcfjX3pOLYGjA+yvMbM+VPfYcBCMHHMUkbtmNH+1vIhAJiaS5/TgYteTi+cqhxMSdb3AU+XGaaH9JoWt9lMKjdVZYSFOqAa80iObKvUbz6Xxy4Kx5u5QlWMkUtyWGSO2YcrBybAaqWhl37wwSu/BDGQZW+3ywBNcgqGOwhU+lkvSTkAahuB0GwGgyyU=;25:Wu2wADnIy6CUiJEVgdduW+QLCxjM6tXEJlfWNCnxCmETkqnzt9CSUaLR+iuR4NpV/BbPG7irjx6NlWZ7wnS5ySNkRobIvGbOWyowN5lnq2Fi3URE1R0oDxBJ19LGMlCycNXo3XXW7P1NYgx8K3MJ2E9h5RUHaA/FcmGn8WYoBcYsdLGmgyxXvWpqeHNQgHA48/z9R96puIoVNTQv14DQOurlNayHEfGuFS/5NVXF1Phebp+shWUs6tDJemDnfONsieQSprfOee5SzcjhBrCjAwxzZoM3BmiXsQMirJl05Ocwru29Kiwq61f0FKXBc9vgZ2gdFiPFCIwkI9r6zopM+g== X-MS-TrafficTypeDiagnostic: CY4PR03MB2693: X-Microsoft-Exchange-Diagnostics: 1;CY4PR03MB2693;31:5A7ppPl7dj4Iuz+nJM2OIa1vTjeZtNkBehSrn1Gfnpmv0zcucAbrVEepYuoe+jZn3AtCtMFciSCq2Vatko7/3xElnO/kGIxaHINz0TdwOKa6pdW0TqInHmwckHJA2PRmuuANN7wDr7aHAFcxQywEkBRr54CV+qpfBW6+GYiX+7ktNih2GU7JG2v+c0Me6n67SSQdCfMcwhbgcEHo5Bo6S6KOvzHTDmrO0taWGOtEwfY=;4:6Hk9V3030Ix/Y5NaIa85qMKMH+FdT+gI4jVlL23z++RHFQoamaoqLN9RjbgOhE2ZNE9quhRwog6NtFkRBRg8nX8ItYE7fkYZ3v6cXhpIndWwBFa6R+FTblvwFb8zbeOMw/IueD52wormB10zivkrREkY6SHh79wMSQLe7qABw6Te5XuhCisad7QBoyr5u9qTQ8Y/T33ujvSFUWkX4a2B5MpyjxEFK6mqMim3v4Ohpn78njajiCTp/jjKELSlGMGjPcrpvk+hLikwL7k2cY4UMR31pSX2UNpPF1OS73PdaAszHdc6Lk2++tcQhxqfg+Y5 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095135)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231023)(944510075)(944921075)(946801075)(946901075)(6055026)(6096035)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123556025)(20161123559100)(20161123565025)(20161123563025)(20161123561025)(201708071742011);SRVR:CY4PR03MB2693;BCL:0;PCL:0;RULEID:(100000803101)(100110400095)(400006);SRVR:CY4PR03MB2693; X-Forefront-PRVS: 054642504A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR03MB2693;23:tACYjjyQ33DDDczHDkTzO3wslacUBq2jc8To03nUt?= =?us-ascii?Q?M65QwveOdEFY8AZcmwCIh7t8zBJVHlbhBAV/o3WCNgLTVaWPpH1GiODi5QTy?= =?us-ascii?Q?i21Uhy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pamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2018 10:31:59.0154 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf01c785-5398-412c-854a-08d556830c6b X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2693 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: set_fipers() calling should be protected by spinlock. This patch is to move set_fipers() to spinlock protecting area in ptp_gianfar_adjtime() function. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/gianfar_ptp.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/gianfar_ptp.c b/drivers/net/ethernet/freescale/gianfar_ptp.c index 5441142..9f8d4f8 100644 --- a/drivers/net/ethernet/freescale/gianfar_ptp.c +++ b/drivers/net/ethernet/freescale/gianfar_ptp.c @@ -319,11 +319,10 @@ static int ptp_gianfar_adjtime(struct ptp_clock_info *ptp, s64 delta) now = tmr_cnt_read(etsects); now += delta; tmr_cnt_write(etsects, now); + set_fipers(etsects); spin_unlock_irqrestore(&etsects->lock, flags); - set_fipers(etsects); - return 0; } -- 1.7.1