lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <03160a07-0507-f5a9-fb26-5940cae29750@huawei.com>
Date: Tue, 27 Aug 2024 19:15:11 +0800
From: "lihuisong (C)" <lihuisong@...wei.com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>
CC: <xuwei5@...ilicon.com>, <linux-kernel@...r.kernel.org>, <soc@...nel.org>,
	<linux-arm-kernel@...ts.infradead.org>, <krzk@...nel.org>,
	<wanghuiqiang@...wei.com>, <liuyonglong@...wei.com>
Subject: Re: [PATCH v2 4/6] soc: hisilicon: kunpeng_hccs: Fix the 'lane_mode'
 field name in port info structure to 'max_lane_num'


在 2024/8/23 16:40, Jonathan Cameron 写道:
> On Fri, 23 Aug 2024 11:10:57 +0800
> Huisong Li <lihuisong@...wei.com> wrote:
>
>> The lane mode of HCCS port is an information to user, and actually comes
>> from the maximum lane number. But it is good and easy for driver to use
>> the maximum lane number. So fix the 'lane_mode' field name in port info
>> structure to 'max_lane_num'.
>>
>> Signed-off-by: Huisong Li <lihuisong@...wei.com>
> It's unfortunate we missed the ABI in the first place
> as that's still confusingly names, but at least this improves things
> in the driver.
But it is ok for an external interface to use the 'lane_mode' name. It's 
similar to PCIE's x8.
>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
>
>> ---
>>   drivers/soc/hisilicon/kunpeng_hccs.c | 4 ++--
>>   drivers/soc/hisilicon/kunpeng_hccs.h | 4 ++--
>>   2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/soc/hisilicon/kunpeng_hccs.c b/drivers/soc/hisilicon/kunpeng_hccs.c
>> index 6055e5091cbd..418e4ee5d9e5 100644
>> --- a/drivers/soc/hisilicon/kunpeng_hccs.c
>> +++ b/drivers/soc/hisilicon/kunpeng_hccs.c
>> @@ -594,7 +594,7 @@ static int hccs_get_all_port_info_on_die(struct hccs_dev *hdev,
>>   		port = &die->ports[i];
>>   		port->port_id = attrs[i].port_id;
>>   		port->port_type = attrs[i].port_type;
>> -		port->lane_mode = attrs[i].lane_mode;
>> +		port->max_lane_num = attrs[i].max_lane_num;
>>   		port->enable = attrs[i].enable;
>>   		port->die = die;
>>   	}
>> @@ -839,7 +839,7 @@ static ssize_t lane_mode_show(struct kobject *kobj, struct kobj_attribute *attr,
>>   {
>>   	const struct hccs_port_info *port = kobj_to_port_info(kobj);
>>   
>> -	return sysfs_emit(buf, "x%u\n", port->lane_mode);
>> +	return sysfs_emit(buf, "x%u\n", port->max_lane_num);
>>   }
>>   static struct kobj_attribute lane_mode_attr = __ATTR_RO(lane_mode);
>>   
>> diff --git a/drivers/soc/hisilicon/kunpeng_hccs.h b/drivers/soc/hisilicon/kunpeng_hccs.h
>> index c3adbc01b471..5e12a1e1474e 100644
>> --- a/drivers/soc/hisilicon/kunpeng_hccs.h
>> +++ b/drivers/soc/hisilicon/kunpeng_hccs.h
>> @@ -19,7 +19,7 @@
>>   struct hccs_port_info {
>>   	u8 port_id;
>>   	u8 port_type;
>> -	u8 lane_mode;
>> +	u8 max_lane_num;
>>   	bool enable; /* if the port is enabled */
>>   	struct kobject kobj;
>>   	bool dir_created;
>> @@ -113,7 +113,7 @@ struct hccs_die_info_rsp_data {
>>   struct hccs_port_attr {
>>   	u8 port_id;
>>   	u8 port_type;
>> -	u8 lane_mode;
>> +	u8 max_lane_num;
>>   	u8 enable : 1; /* if the port is enabled */
>>   	u16 rsv[2];
>>   };
> .

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ