Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2927688pxj; Sun, 6 Jun 2021 19:48:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwf1DkBWdkKM2OOp4AhhRzUTl0fA7c3t2FrHxJNuUyy5bbFj1yNLPW/ZKGty9Wa0UCJmYxP X-Received: by 2002:a05:6402:1a:: with SMTP id d26mr17984440edu.105.1623034094699; Sun, 06 Jun 2021 19:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623034094; cv=none; d=google.com; s=arc-20160816; b=d0MtY6g4DDeIQlW3hNJnqfCWxmSTA/ehvtnHoXPm2eackRE7KBtfNn0cgtdG4KwUfA 8Stkegx6u+B1QiK7TP4hA5FFuq17O/3uQDKkR1JSg+LCZJYMlJYKLnvE4akRpEyyvFFg H25TNpX/KgHCxBkyESO15xmcvhL7hj2UKVuJ7BPpT4bn8PeIn72/8C4+Y8MNaD9WFnk1 xqtJgZiZPNHv7+PwZ7h6nxMM1kmomIBpmXuA8tbj3SC3qfLdedfDlW6zy1p3pRVKX/5C g4Of1yBVhBzwgKkVWzGgvujdjIktKj92M8TgPjYy2YaMRbAQlLo/mVR0hb3qFsLC8LSK XWxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=5BcXsraPxbZAQ4Jz2Mpl8F0BeHrp8OUMkFDhO/LPuMg=; b=gDyXdKdyCTQRC4B4qnSSi6PH/8GBY1QSGfsVnAv5L1gAukstyilJFRhcVRidYfaqnl 06OqJTuAJjvlnToMDCKIXXsn6HZUfTJKht8cJpA6PwDwumz6IB2UtZjcqeH5qyE2IAga j28+VM0k4ByPETTzr0OkPPceNsiTKKrZG21aeXsbCeJpgNoYDV6LTmvVdcfWrUUi4WN3 5OFi+M+e2r2WgtE9We1hy7NObo1N9JBcWUtHb0/y1aeZZL2vG8cig5t3I5KiUNSFbvte smMGxnwVQzA5QALkkqZ16Zpx5g35xW/3KitflQ/YL1D+s7a6/mn7xaMD7BcoRIycul3q zdfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t1si11704348edf.285.2021.06.06.19.47.52; Sun, 06 Jun 2021 19:48:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230196AbhFGCqY (ORCPT + 99 others); Sun, 6 Jun 2021 22:46:24 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:4326 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230127AbhFGCqX (ORCPT ); Sun, 6 Jun 2021 22:46:23 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4FyyJG59W1z1BJkL; Mon, 7 Jun 2021 10:39:42 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Mon, 7 Jun 2021 10:44:31 +0800 Received: from [10.67.102.67] (10.67.102.67) by dggemi759-chm.china.huawei.com (10.1.198.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Mon, 7 Jun 2021 10:44:30 +0800 Subject: Re: [RESEND net-next 1/2] net: hns3: add support for PTP To: Richard Cochran CC: , , , , , , References: <1622602664-20274-1-git-send-email-huangguangbin2@huawei.com> <1622602664-20274-2-git-send-email-huangguangbin2@huawei.com> <20210603132237.GC6216@hoboy.vegasvil.org> <20210605155330.GB10328@localhost> From: "huangguangbin (A)" Message-ID: <47805689-2c52-ea26-49a6-3fbe3aa22a88@huawei.com> Date: Mon, 7 Jun 2021 10:44:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20210605155330.GB10328@localhost> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.67] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/6/5 23:53, Richard Cochran wrote: > On Sat, Jun 05, 2021 at 06:37:19PM +0800, huangguangbin (A) wrote: >>> Need mutex or spinlock to protest against concurrent access. >>> >> Ok, thank you. Is it better to add mutex or spinlock in the public place, like ptp_clock_adjtime()? >> Then there's no need to add mutex or spinlock in all the drives. > > No, that is a terrible idea. The class layer has no idea about the > hardware implementation. Only the driver knows that. > > Thanks, > Richard > . > Ok, thanks. We will add mutex or spinlock as your idea, and repost a new version after we test ok.