Re: [PATCH net-next v2 5/5] hinic: add support to get eeprom information

2020-06-26 Thread luobin (L)
On 2020/6/24 6:02, Jakub Kicinski wrote: > On Tue, 23 Jun 2020 22:24:09 +0800 Luo bin wrote: >> +int hinic_get_sfp_type(struct hinic_hwdev *hwdev, u8 *data0, u8 *data1) >> +{ >> +u8 sfp_data[STD_SFP_INFO_MAX_SIZE]; >> +u16 len; >> +int err; >> + >> +if (!hwdev || !data0 || !data1) >

Re: [PATCH net-next v2 5/5] hinic: add support to get eeprom information

2020-06-23 Thread Jakub Kicinski
On Tue, 23 Jun 2020 22:24:09 +0800 Luo bin wrote: > +int hinic_get_sfp_eeprom(struct hinic_hwdev *hwdev, u8 *data, u16 *len) > +{ > + struct hinic_cmd_get_std_sfp_info sfp_info = {0}; > + u16 out_size = sizeof(sfp_info); > + u8 port_id; > + int err; > + > + if (!hwdev || !data |

[PATCH net-next v2 5/5] hinic: add support to get eeprom information

2020-06-23 Thread Luo bin
add support to get eeprom information from the plug-in module with ethtool -m cmd. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 69 + .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 4 + .../net/ethernet/huawei/hinic/hinic_port.c| 75 +++