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

2020-06-22 Thread luobin (L)
On 2020/6/23 6:15, Jakub Kicinski wrote: > On Sat, 20 Jun 2020 17:42:58 +0800 Luo bin wrote: >> diff --git a/drivers/net/ethernet/huawei/hinic/hinic_port.h >> b/drivers/net/ethernet/huawei/hinic/hinic_port.h >> index 5c916875f295..0d0354241345 100644 >> --- a/drivers/net/ethernet/huawei/hinic/hini

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

2020-06-22 Thread Jakub Kicinski
On Sat, 20 Jun 2020 17:42:58 +0800 Luo bin wrote: > diff --git a/drivers/net/ethernet/huawei/hinic/hinic_port.h > b/drivers/net/ethernet/huawei/hinic/hinic_port.h > index 5c916875f295..0d0354241345 100644 > --- a/drivers/net/ethernet/huawei/hinic/hinic_port.h > +++ b/drivers/net/ethernet/huawei/hi

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

2020-06-21 Thread luobin (L)
On 2020/6/21 0:00, Andrew Lunn wrote: >> +static int hinic_get_module_eeprom(struct net_device *netdev, >> + struct ethtool_eeprom *ee, u8 *data) >> +{ >> +struct hinic_dev *nic_dev = netdev_priv(netdev); >> +u8 sfp_data[STD_SFP_INFO_MAX_SIZE]; > > sfp_data wi

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

2020-06-20 Thread Andrew Lunn
> +static int hinic_get_module_eeprom(struct net_device *netdev, > +struct ethtool_eeprom *ee, u8 *data) > +{ > + struct hinic_dev *nic_dev = netdev_priv(netdev); > + u8 sfp_data[STD_SFP_INFO_MAX_SIZE]; sfp_data will contain whatever is on the stack. > +

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

2020-06-20 Thread Luo bin
add support to get eeprom information from the plug-in module with ethtool -m cmd. Signed-off-by: Luo bin --- V0->V1: remove unused variable port_id .../net/ethernet/huawei/hinic/hinic_ethtool.c | 68 + .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 4 + .../net/ethernet/huawe