Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5879032pxb; Thu, 27 Jan 2022 01:14:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfZI8vUgu8XX4FEPzUt22k9oA7lRYEAd+DHUcesvQa0urPpsECadULs0kfas8SIn6zI1Kw X-Received: by 2002:a63:5911:: with SMTP id n17mr2134837pgb.59.1643274897734; Thu, 27 Jan 2022 01:14:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643274897; cv=none; d=google.com; s=arc-20160816; b=LP3utyNC9evnQlbOJkRaXFLUmWAGQH2Sl9GHS1joCr8wY/ZVrMEO4ElsrpsHQbpgNI 0U3XFQzeotet4s13cNxFKyY/DltyouYyoTI8wSaDnUJQwAtRlx0sa4vhEu/bvg/KTLeu +zgzMeEXlDsgUf1gZTHjbTn2a3br5OaNe7ULQCvoaWqsijgfsXy1xs0hBB2yp43vNZei GjS9wKwpA4Of/nOh2Ify1R54Gx0v+xUbRnrYtY3QYTQUhfU9SYz22eOzvrPbzo9xnsbA RZfVavCw0i3OG66XRoGON9FViuirUFfzu/pKhgJ6YYjGkgdEFjZCdL0qFMurtx00GxOM LZ7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=zv6kHK8XcIu/9fbhvtq0nRCaxzxKlIOUazyYdUv8qM4=; b=BFHIxS7EpcK79z5bDERCWQedtN0vccVH3CCB7X9VLDTWxw7LVe9eyXMR+14z4o8tMI F/8BapOEf2cmNfwyh/E+X7D/RpEJND0aha+bmShdX+bwhUJUqg+Gucc7vq+ZRQCQfQhO hP9gnv1bDc2piCD6vePLmXqVsSLB6gL1fiy/dqgPUlM0udJRb+RP2QUdvKdTeFkOwwKg rA39NhCHemdg6AfFT0jnPQOAbSeaOgjbQmrq9pnUjYsq6o1sryRKFCJOOJ5KadQ6diMv yPzI7INRKsr11TwwemGs6nhsALC7sM6c2qzpY89/L/AtcXFSMVfRBHaB5d7LvgMbgh9l kE2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=TjhS2njc; 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=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si1750498pgb.114.2022.01.27.01.14.45; Thu, 27 Jan 2022 01:14:57 -0800 (PST) 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; dkim=pass header.i=@mediatek.com header.s=dk header.b=TjhS2njc; 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=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234982AbiA0CUf (ORCPT + 99 others); Wed, 26 Jan 2022 21:20:35 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:53850 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S231582AbiA0CUe (ORCPT ); Wed, 26 Jan 2022 21:20:34 -0500 X-UUID: 311ddb002ece4225a4ff8e7d350586b6-20220127 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:CC:To:Subject; bh=zv6kHK8XcIu/9fbhvtq0nRCaxzxKlIOUazyYdUv8qM4=; b=TjhS2njcPmWcFJ0Q279D9hKa+q+uaHuqx1skB80XpWT0IWnKb3MJ6ZexwdSc6+xZiioP3BM2wYslv4i+VjOdu0rFkR1LngUNsn0uaE5418xiL1TKkxqZ/dJgiFSmIwZLG3lcP3I/IWbBIe2sr7wB2jQEru8PN2V3Q65KBTX2Puc=; X-UUID: 311ddb002ece4225a4ff8e7d350586b6-20220127 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1660428893; Thu, 27 Jan 2022 10:20:31 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Thu, 27 Jan 2022 10:20:29 +0800 Received: from [172.21.84.99] (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 27 Jan 2022 10:20:29 +0800 Subject: Re: [PATCH net-next v2 6/9] net: ethernet: mtk-star-emac: add timing adjustment support To: Biao Huang , David Miller , Rob Herring , Bartosz Golaszewski , "Fabien Parent" CC: Jakub Kicinski , Felix Fietkau , "John Crispin" , Sean Wang , Mark Lee , Matthias Brugger , , , , , , Yinghua Pan , References: <20220127015857.9868-1-biao.huang@mediatek.com> <20220127015857.9868-7-biao.huang@mediatek.com> From: Macpaul Lin Message-ID: Date: Thu, 27 Jan 2022 10:20:29 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20220127015857.9868-7-biao.huang@mediatek.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQpPbiAxLzI3LzIyIDk6NTggQU0sIEJpYW8gSHVhbmcgd3JvdG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