Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp89255ybz; Tue, 28 Apr 2020 18:55:10 -0700 (PDT) X-Google-Smtp-Source: APiQypLFJnPq2yhpV9X7H/DKVOY3e/ljrM4i2HZrJmDFBoqiQb92RWU6g08gk/GuWdz/iP9PaR1T X-Received: by 2002:a50:fc06:: with SMTP id i6mr489206edr.110.1588125310275; Tue, 28 Apr 2020 18:55:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588125310; cv=none; d=google.com; s=arc-20160816; b=jrQHFbAUYFO6a3GlwrNtajttptjZMQxeCM5yTqxDoDixKP7VJro2QMm8EdAlqMRxjk 2eSTPISh9bayJpeOC7C5P1DcRyEz/nFaUtShF3yTj750czJyj8IGVuO2i6JVl7u23D9W hi5btYJxQ1oLVGpeRVjo/LR+5TZS0cuRJpUxTrzgr5X79Qvb1of0pY42mvaa8jbwA93m JFeF9QLPwRL8knjzVbxmvW9mVEG0irSmmFWyiBLWs5uabqxiXV1T1gj4qESXb9smlrpL gRpzhi0/Ds1SSCCFAi5ncOFmK5o2+2dZOph6BVPtm/ESitsbpEDVWQtazoQJNdNl/GgR sr+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Ow/WjuTQfIIyw8f6HCiq6cEusOQnnVqY6nhrFimCML4=; b=h60ojx11YU6KGLR1urHyYJI/zkKNDTnacNdPs9xL+J1BFUa45VJoyug/wPemxrvbG7 0Dd3XsETGxg7PoOIaRey8cpxCMKJsHvUVOVJ9NKSJXYXy3OTk3AWRJLMouK+l3Yhbxob VAkHTKMLA/zp8qSiSP90yp/IAuZx9dmk8wBxsh71Fz3nhRGAe3rmqMBOPFkIa58WAlkv EYDB+DRO2AqQ0FT+jcaM2qxesusl2AJMK+XiPU1Crp4wfMJJrn14ugLKVpFxBT+DX0NN 9f04OJs9S/Q6r6IsUJu1jTHiaFj9nLZkZ7wVfKnvrRSee+hEvr3yImQimq/DUwY6vO1J EAMQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ot21si3015800ejb.351.2020.04.28.18.54.47; Tue, 28 Apr 2020 18:55:10 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726587AbgD2Bui (ORCPT + 99 others); Tue, 28 Apr 2020 21:50:38 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3331 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726158AbgD2Bui (ORCPT ); Tue, 28 Apr 2020 21:50:38 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 301E229E52E30D02CF9B; Wed, 29 Apr 2020 09:50:36 +0800 (CST) Received: from [127.0.0.1] (10.74.149.191) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Wed, 29 Apr 2020 09:50:25 +0800 Subject: Re: [PATCH net-next] net: hns3: adds support for reading module eeprom info To: Jakub Kicinski CC: , , , , , , Yonglong Liu References: <1588075105-52158-1-git-send-email-tanhuazhong@huawei.com> <20200428114910.7cc5182e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: tanhuazhong Message-ID: Date: Wed, 29 Apr 2020 09:50:25 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20200428114910.7cc5182e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.74.149.191] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/4/29 2:49, Jakub Kicinski wrote: > On Tue, 28 Apr 2020 19:58:25 +0800 Huazhong Tan wrote: >> From: Yonglong Liu >> >> This patch adds support for reading the optical module eeprom >> info via "ethtool -m". >> >> Signed-off-by: Yonglong Liu >> Signed-off-by: Huazhong Tan > >> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c >> index 4d9c85f..8364e1b 100644 >> --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c >> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c >> @@ -12,6 +12,16 @@ struct hns3_stats { >> int stats_offset; >> }; >> >> +#define HNS3_MODULE_TYPE_QSFP 0x0C >> +#define HNS3_MODULE_TYPE_QSFP_P 0x0D >> +#define HNS3_MODULE_TYPE_QSFP_28 0x11 >> +#define HNS3_MODULE_TYPE_SFP 0x03 > > Could you use the SFF8024_ID_* defines from sfp.h here as well? > Yes, will send V2 to do that. > Otherwise looks good to me! > Thanks:) > . >