[PATCH net-next v2] hinic: fix strncpy output truncated compile warnings

2020-08-08 Thread Luo bin
fix the compile warnings of 'strncpy' output truncated before terminating nul copying N bytes from a string of the same length Signed-off-by: Luo bin Reported-by: kernel test robot --- V2~V1: - remove strncpy V0~V1: - use the strlen()+1 pattern consistently .../net/ethernet/huawei/hinic

[PATCH net-next v1 3/3] hinic: add support to query function table

2020-08-27 Thread Luo bin
add debugfs node for querying function table, for example: cat /sys/kernel/debug/hinic/:15:00.0/func_table/valid Signed-off-by: Luo bin --- V0~V1: - remove command interfaces to the read only files - split addition of each object into a separate patch .../net/ethernet/huawei/hinic

[PATCH net-next v1 2/3] hinic: add support to query rq info

2020-08-27 Thread Luo bin
add debugfs node for querying rq info, for example: cat /sys/kernel/debug/hinic/:15:00.0/RQs/0x0/rq_hw_pi Signed-off-by: Luo bin --- V0~V1: - remove command interfaces to the read only files - split addition of each object into a separate patch .../net/ethernet/huawei/hinic/hinic_debugfs.c

[PATCH net-next v1 0/3] hinic: add debugfs support

2020-08-27 Thread Luo bin
add debugfs node for querying sq/rq info and function table Luo bin (3): hinic: add support to query sq info hinic: add support to query rq info hinic: add support to query function table drivers/net/ethernet/huawei/hinic/Makefile| 3 +- .../net/ethernet/huawei/hinic/hinic_debugfs.c

[PATCH net-next v1 1/3] hinic: add support to query sq info

2020-08-27 Thread Luo bin
add debugfs node for querying sq info, for example: cat /sys/kernel/debug/hinic/:15:00.0/SQs/0x0/sq_pi Signed-off-by: Luo bin --- V0~V1: - remove command interfaces to the read only files - split addition of each object into a separate patch drivers/net/ethernet/huawei/hinic/Makefile

[PATCH net-next v2 0/3] hinic: add debugfs support

2020-08-27 Thread Luo bin
add debugfs node for querying sq/rq info and function table Luo bin (3): hinic: add support to query sq info hinic: add support to query rq info hinic: add support to query function table drivers/net/ethernet/huawei/hinic/Makefile| 3 +- .../net/ethernet/huawei/hinic/hinic_debugfs.c

[PATCH net-next v2 1/3] hinic: add support to query sq info

2020-08-27 Thread Luo bin
add debugfs node for querying sq info, for example: cat /sys/kernel/debug/hinic/:15:00.0/SQs/0x0/sq_pi Signed-off-by: Luo bin --- V0~V1: - remove command interfaces to the read only files - split addition of each object into a separate patch drivers/net/ethernet/huawei/hinic/Makefile

[PATCH net-next v2 2/3] hinic: add support to query rq info

2020-08-27 Thread Luo bin
add debugfs node for querying rq info, for example: cat /sys/kernel/debug/hinic/:15:00.0/RQs/0x0/rq_hw_pi Signed-off-by: Luo bin --- V0~V1: - remove command interfaces to the read only files - split addition of each object into a separate patch .../net/ethernet/huawei/hinic/hinic_debugfs.c

[PATCH net-next v2 3/3] hinic: add support to query function table

2020-08-27 Thread Luo bin
add debugfs node for querying function table, for example: cat /sys/kernel/debug/hinic/:15:00.0/func_table/valid Signed-off-by: Luo bin --- V0~V1: - remove command interfaces to the read only files - split addition of each object into a separate patch V1~V2: - remove vlan_id and vlan_mode

[PATCH net-next v3 1/2] hinic: add generating mailbox random index support

2020-07-31 Thread Luo bin
add support to generate mailbox random id of VF to ensure that mailbox messages PF received are from the correct VF. Signed-off-by: Luo bin --- V2~V3 fix review opinions pointed out by Jakub .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 13 ++ .../net/ethernet/huawei/hinic/hinic_hw_mbox.c

[PATCH net-next v3 2/2] hinic: add check for mailbox msg from VF

2020-07-31 Thread Luo bin
PF should check whether the cmd from VF is supported and its content is right before passing it to hw. Signed-off-by: Luo bin --- V1~V2: fix W=1 C=1 warnings .../net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 8 + .../net/ethernet/huawei/hinic/hinic_hw_mbox.c | 173 +- .../net

[PATCH net-next v3 0/2] hinic: mailbox channel enhancement

2020-07-31 Thread Luo bin
add support to generate mailbox random id for VF to ensure that the mailbox message from VF is valid and PF should check whether the cmd from VF is supported before passing it to hw. Luo bin (2): hinic: add generating mailbox random index support hinic: add check for mailbox msg from VF

[PATCH net-next v4 1/2] hinic: add generating mailbox random index support

2020-08-03 Thread Luo bin
add support to generate mailbox random id of VF to ensure that mailbox messages PF received are from the correct VF. Signed-off-by: Luo bin --- v3~V4: - take hinic_glb_pf_vf_offset() out of the for loop V2~V3: - use get_random_u32() instead of get_random_bytes() - remove unnecessary cast

[PATCH net-next v4 0/2] hinic: mailbox channel enhancement

2020-08-03 Thread Luo bin
add support to generate mailbox random id for VF to ensure that the mailbox message from VF is valid and PF should check whether the cmd from VF is supported before passing it to hw. Luo bin (2): hinic: add generating mailbox random index support hinic: add check for mailbox msg from VF

[PATCH net-next v4 2/2] hinic: add check for mailbox msg from VF

2020-08-03 Thread Luo bin
PF should check whether the cmd from VF is supported and its content is right before passing it to hw. Signed-off-by: Luo bin --- V1~V2: - fix W=1 C=1 warnings .../net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 8 + .../net/ethernet/huawei/hinic/hinic_hw_mbox.c | 173 +- .../net

[PATCH net-next] hinic: add vxlan segmentation and cs offload support

2020-09-14 Thread Luo bin
Add NETIF_F_GSO_UDP_TUNNEL and NETIF_F_GSO_UDP_TUNNEL_CSUM features to support vxlan segmentation and checksum offload. Ipip and ipv6 tunnel packets are regarded as non-tunnel pkt for hw and as for other type of tunnel pkts, checksum offload is disabled. Signed-off-by: Luo bin --- .../net

[PATCH net-next] hinic: improve the comments of function header

2020-09-21 Thread Luo bin
Fix the warnings about function header comments when building hinic driver with "W=1" option. Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 2 +- drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 6 +- drivers/net/ethernet/huawei/hinic/hinic_hw_

[PATCH net v1] hinic: fix rewaking txq after netif_tx_disable

2020-09-10 Thread Luo bin
may results in accessing memory that has been already freed in hinic_close. So we call napi_disable before netif_tx_disable in hinic_close to fix this bug. Fixes: 2eed5a8b614b ("hinic: add set_channels ethtool_ops support") Signed-off-by: Luo bin --- V0~V1: - call napi_disa

[PATCH net v1 1/2] hinic: bump up the timeout of SET_FUNC_STATE cmd

2020-09-04 Thread Luo bin
dd Tx operation") Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_mgmt.c| 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c b/drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c index c6

[PATCH net v1 2/2] hinic: bump up the timeout of UPDATE_FW cmd

2020-09-04 Thread Luo bin
Firmware erases the entire flash region which may take several seconds before flashing, so we bump up the timeout to ensure this cmd won't return failure. Fixes: 5e126e7c4e52 ("hinic: add firmware update support") Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_hw_

[PATCH net v1 0/2] hinic: BugFixes

2020-09-04 Thread Luo bin
The bugs fixed in this patchset have been present since the following commits: patch #1: Fixes: 00e57a6d4ad3 ("net-next/hinic: Add Tx operation") patch #2: Fixes: 5e126e7c4e52 ("hinic: add firmware update support") Luo bin (2): hinic: bump up the timeout of SET_FUNC_STATE

[PATCH net-next] hinic: add debugfs support

2020-08-20 Thread Luo bin
add debugfs node for querying sq/rq info, mac table, sq ci table, rq cqe info, global table, function table, port and vlan table. Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/Makefile|3 +- .../net/ethernet/huawei/hinic/hinic_debugfs.c | 1354 + .../net

[PATCH net 3/3] hinic: fix bug of send pkts while setting channels

2020-09-02 Thread Luo bin
otherwise the resources that have already been freed in hinic_close may be accessed. Fixes: 2eed5a8b614b ("hinic: add set_channels ethtool_ops support") Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/ne

[PATCH net 1/3] hinic: bump up the timeout of SET_FUNC_STATE cmd

2020-09-02 Thread Luo bin
dd Tx operation") Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_mgmt.c| 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c b/drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c index c6

[PATCH net 0/3] hinic: BugFixes

2020-09-02 Thread Luo bin
The bugs fixed in this patchset have been present since the following commits: patch #1: Fixes: 00e57a6d4ad3 ("net-next/hinic: Add Tx operation") patch #2: Fixes: 5e126e7c4e52 ("hinic: add firmware update support") patch #3: Fixes: 2eed5a8b614b ("hinic: add set_channels e

[PATCH net 2/3] hinic: bump up the timeout of UPDATE_FW cmd

2020-09-02 Thread Luo bin
Firmware erases the entire flash region which may take several seconds before flashing, so we bump up the timeout to ensure this cmd won't return failure. Fixes: 5e126e7c4e52 ("hinic: add firmware update support") Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_hw_

[PATCH net-next v3 0/3] hinic: add debugfs support

2020-08-28 Thread Luo bin
add debugfs node for querying sq/rq info and function table Luo bin (3): hinic: add support to query sq info hinic: add support to query rq info hinic: add support to query function table drivers/net/ethernet/huawei/hinic/Makefile| 3 +- .../net/ethernet/huawei/hinic/hinic_debugfs.c

[PATCH net-next v3 3/3] hinic: add support to query function table

2020-08-28 Thread Luo bin
add debugfs node for querying function table, for example: cat /sys/kernel/debug/hinic/:15:00.0/func_table/valid Signed-off-by: Luo bin --- V0~V1: - remove command interfaces to the read only files - split addition of each object into a separate patch V1~V2: - remove vlan_id and vlan_mode

[PATCH net-next v3 1/3] hinic: add support to query sq info

2020-08-28 Thread Luo bin
add debugfs node for querying sq info, for example: cat /sys/kernel/debug/hinic/:15:00.0/SQs/0x0/sq_pi Signed-off-by: Luo bin --- V0~V1: - remove command interfaces to the read only files - split addition of each object into a separate patch drivers/net/ethernet/huawei/hinic/Makefile

[PATCH net-next v3 2/3] hinic: add support to query rq info

2020-08-28 Thread Luo bin
add debugfs node for querying rq info, for example: cat /sys/kernel/debug/hinic/:15:00.0/RQs/0x0/rq_hw_pi Signed-off-by: Luo bin --- V0~V1: - remove command interfaces to the read only files - split addition of each object into a separate patch .../net/ethernet/huawei/hinic/hinic_debugfs.c

[PATCH net-next] hinic: fix strncpy output truncated compile warnings

2020-08-06 Thread Luo bin
fix the compile warnings of 'strncpy' output truncated before terminating nul copying N bytes from a string of the same length Signed-off-by: Luo bin Reported-by: kernel test robot --- drivers/net/ethernet/huawei/hinic/hinic_devlink.c | 8 1 file changed, 4 insertions(+), 4 deletions

[PATCH net-next v1] hinic: fix strncpy output truncated compile warnings

2020-08-06 Thread Luo bin
fix the compile warnings of 'strncpy' output truncated before terminating nul copying N bytes from a string of the same length Signed-off-by: Luo bin Reported-by: kernel test robot --- V0~V1: - use the strlen()+1 pattern consistently drivers/net/ethernet/huawei/hinic/hinic_devlink.c | 8

[PATCH net] hinic: fix rewaking txq after netif_tx_disable

2020-09-07 Thread Luo bin
may results in accessing memory that has been already freed in hinic_close. So we judge whether the netdev is in down state before waking txq in free_tx_poll to fix this bug. Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH net] hinic: fix sending pkts from core while self testing

2020-09-17 Thread Luo bin
Call netif_tx_disable firstly before starting doing self-test to avoid sending packet from networking core and self-test packet simultaneously which may cause self-test failure or hw abnormal. Fixes: 4aa218a4fe77 ("hinic: add self test support") Signed-off-by: Luo bin --- drivers/ne

[PATCH net-next] hinic: modify irq name

2020-09-18 Thread Luo bin
Make a distinction between different irqs by netdev name or pci name. Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c | 15 +-- drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.h | 1 + drivers/net/ethernet/huawei/hinic/hinic_rx.c | 2 +- drivers/net

[PATCH net] hinic: fix wrong return value of mac-set cmd

2020-09-23 Thread Luo bin
It should also be regarded as an error when hw return status=4 for PF's setting mac cmd. Only if PF return status=4 to VF should this cmd be taken special treatment. Fixes: 7dd29ee12865 ("hinic: add sriov feature support") Signed-off-by: Luo bin --- drivers/net/ethernet/hu

[PATCH net] hinic: fix wrong return value of mac-set cmd

2020-09-22 Thread Luo bin
It should also be regarded as an error when hw return status=4 for PF's setting mac cmd. Only if PF return status=4 to VF should this cmd be taken special treatment. Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_port.c | 6 +++--- drivers/net/ethernet/huawei/hinic

[PATCH net-next v1] hinic: add support to set and get pause param

2020-05-19 Thread Luo bin
add support to set pause param with ethtool -A and get pause param with ethtool -a. Also remove set_link_ksettings ops for VF. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 100 +- .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 2 + .../net

[PATCH net-next v5] hinic: add set_channels ethtool_ops support

2020-06-01 Thread Luo bin
t;ethtool -L combined") V0 -> V1: remove check for channels->tx_count/rx_count/other_count Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 40 +++ .../net/ethernet/huawei/hinic/hinic_main.c| 2 +- drivers/net/ethernet/huawei/hinic/hinic_t

[PATCH net-next v6] hinic: add set_channels ethtool_ops support

2020-06-01 Thread Luo bin
t; V2: update commit message("ethtool -L" to "ethtool -L combined") V0 -> V1: remove check for channels->tx_count/rx_count/other_count Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 40 +++ .../net/ethernet/huawei/hinic/hinic_m

[PATCH net-next v2] hinic: add set_channels ethtool_ops support

2020-05-28 Thread Luo bin
add support to change TX/RX queue number with ethtool -L Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 46 +++ .../net/ethernet/huawei/hinic/hinic_main.c| 2 +- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 5 ++ 3 files changed, 44

[PATCH net-next v3] hinic: add set_channels ethtool_ops support

2020-05-29 Thread Luo bin
add support to change TX/RX queue number with ethtool -L ethx combined Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 40 +++ .../net/ethernet/huawei/hinic/hinic_main.c| 2 +- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 5 +++ 3 files

[PATCH net-next v4] hinic: add set_channels ethtool_ops support

2020-05-31 Thread Luo bin
add support to change TX/RX queue number with ethtool -L ethx combined Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 40 +++ .../net/ethernet/huawei/hinic/hinic_main.c| 2 +- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 5 +++ 3 files

[PATCH net-next v1 0/2] hinic: mailbox channel enhancement

2020-07-30 Thread Luo bin
add support to generate mailbox random id for VF to ensure that the mailbox message from VF is valid and PF should check whether the cmd from VF is supported before passing it to hw. Luo bin (2): hinic: add generating mailbox random index support hinic: add check for mailbox msg from VF

[PATCH net-next v1 1/2] hinic: add generating mailbox random index support

2020-07-30 Thread Luo bin
add support to generate mailbox random id of VF to ensure that mailbox messages PF received are from the correct VF. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 13 ++ .../net/ethernet/huawei/hinic/hinic_hw_mbox.c | 136 ++ .../net/ethernet/huawei

[PATCH net-next v1 2/2] hinic: add check for mailbox msg from VF

2020-07-30 Thread Luo bin
PF should check whether the cmd from VF is supported and its content is right before passing it to hw. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 8 + .../net/ethernet/huawei/hinic/hinic_hw_mbox.c | 173 +- .../net/ethernet/huawei/hinic

[PATCH net-next v2 2/2] hinic: add check for mailbox msg from VF

2020-07-30 Thread Luo bin
PF should check whether the cmd from VF is supported and its content is right before passing it to hw. Signed-off-by: Luo bin --- V1~V2: fix W=1 C=1 warnings .../net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 8 + .../net/ethernet/huawei/hinic/hinic_hw_mbox.c | 173 +- .../net

[PATCH net-next v2 0/2] hinic: mailbox channel enhancement

2020-07-30 Thread Luo bin
add support to generate mailbox random id for VF to ensure that the mailbox message from VF is valid and PF should check whether the cmd from VF is supported before passing it to hw. Luo bin (2): hinic: add generating mailbox random index support hinic: add check for mailbox msg from VF

[PATCH net-next v2 1/2] hinic: add generating mailbox random index support

2020-07-30 Thread Luo bin
add support to generate mailbox random id of VF to ensure that mailbox messages PF received are from the correct VF. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 13 ++ .../net/ethernet/huawei/hinic/hinic_hw_mbox.c | 136 ++ .../net/ethernet/huawei

[PATCH net-next] hinic: add generating mailbox random index support

2020-07-28 Thread Luo bin
add support to generate mailbox random id for VF to ensure that the mailbox message from VF is valid and PF should check whether the cmd from VF is supported before passing it to hw. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 8 + .../net/ethernet/huawei/hinic

[PATCH net-next v3] hinic: add firmware update support

2020-07-15 Thread Luo bin
add support to update firmware by the devlink flashing API Signed-off-by: Luo bin --- V2~V3: add error messages through extack V1~V2: create separate devlink priv data structure and remove boot_flag V0~V1: remove the implementation from ethtool to devlink drivers/net/ethernet/huawei/hinic

[PATCH net-next v2 0/2] hinic: add some error messages for debug

2020-07-18 Thread Luo bin
patch #1: support to handle hw abnormal event patch #2: improve the error messages when functions return failure and dump relevant registers in some exception handling processes Luo bin (2): hinic: add support to handle hw abnormal event hinic: add log in exception handling

[PATCH net-next v2 2/2] hinic: add log in exception handling processes

2020-07-18 Thread Luo bin
improve the error message when functions return failure and dump relevant registers in some exception handling processes Signed-off-by: Luo bin --- V0~V1: fix some warning reported by sparse .../ethernet/huawei/hinic/hinic_hw_api_cmd.c | 27 +++- .../ethernet/huawei/hinic

[PATCH net-next v2 1/2] hinic: add support to handle hw abnormal event

2020-07-18 Thread Luo bin
add support to handle hw abnormal event such as hardware failure, cable unplugged,link error Signed-off-by: Luo bin --- V1~V2: add link extended state V0~V1: fix auto build test WARNING drivers/net/ethernet/huawei/hinic/hinic_dev.h | 2 + .../net/ethernet/huawei/hinic/hinic_ethtool.c | 20

[PATCH net-next v3 0/2] hinic: add some error messages for debug

2020-07-23 Thread Luo bin
patch #1: support to handle hw abnormal event patch #2: improve the error messages when functions return failure and dump relevant registers in some exception handling processes Luo bin (2): hinic: add support to handle hw abnormal event hinic: add log in exception handling

[PATCH net-next v3 2/2] hinic: add log in exception handling processes

2020-07-23 Thread Luo bin
improve the error message when functions return failure and dump relevant registers in some exception handling processes Signed-off-by: Luo bin --- V0~V1: fix some warning reported by sparse .../ethernet/huawei/hinic/hinic_hw_api_cmd.c | 27 +++- .../ethernet/huawei/hinic

[PATCH net-next v3 1/2] hinic: add support to handle hw abnormal event

2020-07-23 Thread Luo bin
add support to handle hw abnormal event such as hardware failure, cable unplugged,link error Signed-off-by: Luo bin --- V2~V3: add devlink health support V1~V2: add link extended state V0~V1: fix auto build test WARNING drivers/net/ethernet/huawei/hinic/hinic_dev.h | 4 + .../net/ethernet

[PATCH net-next v4 2/2] hinic: add log in exception handling processes

2020-07-24 Thread Luo bin
improve the error message when functions return failure and dump relevant registers in some exception handling processes Signed-off-by: Luo bin --- V0~V1: fix some warning reported by sparse .../ethernet/huawei/hinic/hinic_hw_api_cmd.c | 27 +++- .../ethernet/huawei/hinic

[PATCH net-next v4 0/2] hinic: add some error messages for debug

2020-07-24 Thread Luo bin
patch #1: support to handle hw abnormal event patch #2: improve the error messages when functions return failure and dump relevant registers in some exception handling processes Luo bin (2): hinic: add support to handle hw abnormal event hinic: add log in exception handling

[PATCH net-next v4 1/2] hinic: add support to handle hw abnormal event

2020-07-24 Thread Luo bin
add support to handle hw abnormal event such as hardware failure, cable unplugged,link error Signed-off-by: Luo bin --- V3~V4: remove 'watchdog_info' variable in hinic_fw_reporter_dump V2~V3: add devlink health support V1~V2: add link extended state V0~V1: fix auto build test WARNING drivers

[PATCH net-next v5 0/2] hinic: add some error messages for debug

2020-07-25 Thread Luo bin
patch #1: support to handle hw abnormal event patch #2: improve the error messages when functions return failure and dump relevant registers in some exception handling processes Luo bin (2): hinic: add support to handle hw abnormal event hinic: add log in exception handling

[PATCH net-next v5 1/2] hinic: add support to handle hw abnormal event

2020-07-25 Thread Luo bin
add support to handle hw abnormal event such as hardware failure, cable unplugged,link error Signed-off-by: Luo bin --- V4~V5: remove 'err' variable in hinic_fw_reporter_dump V3~V4: remove 'watchdog_info' variable in hinic_fw_reporter_dump V2~V3: add devlink health support V1~V2: add link

[PATCH net-next v5 2/2] hinic: add log in exception handling processes

2020-07-25 Thread Luo bin
improve the error message when functions return failure and dump relevant registers in some exception handling processes Signed-off-by: Luo bin --- V0~V1: fix some warning reported by sparse .../ethernet/huawei/hinic/hinic_hw_api_cmd.c | 27 +++- .../ethernet/huawei/hinic

[PATCH net-next 0/2] hinic: add some error messages for debug

2020-07-16 Thread Luo bin
patch #1: support to handle hw abnormal event patch #2: improve the error messages when functions return failure and dump relevant registers in some exception handling processes Luo bin (2): hinic: add support to handle hw abnormal event hinic: add log in exception handling

[PATCH net-next 2/2] hinic: add log in exception handling processes

2020-07-16 Thread Luo bin
improve the error message when functions return failure and dump relevant registers in some exception handling processes Signed-off-by: Luo bin --- .../ethernet/huawei/hinic/hinic_hw_api_cmd.c | 27 +++- .../ethernet/huawei/hinic/hinic_hw_api_cmd.h | 4 ++ .../net/ethernet/huawei/hinic

[PATCH net-next 1/2] hinic: add support to handle hw abnormal event

2020-07-16 Thread Luo bin
add support to handle hw abnormal event such as hardware failure, cable unplugged,link error Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 249 +- .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 144 +- .../net/ethernet/huawei/hinic

[PATCH net-next v1 2/2] hinic: add log in exception handling processes

2020-07-17 Thread Luo bin
improve the error message when functions return failure and dump relevant registers in some exception handling processes Signed-off-by: Luo bin --- V0~V1: fix some warning reported by sparse .../ethernet/huawei/hinic/hinic_hw_api_cmd.c | 27 +++- .../ethernet/huawei/hinic

[PATCH net-next v1 1/2] hinic: add support to handle hw abnormal event

2020-07-17 Thread Luo bin
add support to handle hw abnormal event such as hardware failure, cable unplugged,link error Signed-off-by: Luo bin Reported-by: kernel test robot --- V0~V1: fix auto build test WARNING .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 249 +- .../net/ethernet/huawei/hinic

[PATCH net-next v1 0/2] hinic: add some error messages for debug

2020-07-17 Thread Luo bin
patch #1: support to handle hw abnormal event patch #2: improve the error messages when functions return failure and dump relevant registers in some exception handling processes Luo bin (2): hinic: add support to handle hw abnormal event hinic: add log in exception handling

[PATCH net-next] hinic: add set_channels ethtool_ops support

2020-05-15 Thread Luo bin
add support to change TX/RX queue number with ethtool -L Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 67 +-- .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 7 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 2 + .../net/ethernet/huawei/hinic

[PATCH net-next v1] hinic: add set_channels ethtool_ops support

2020-05-15 Thread Luo bin
add support to change TX/RX queue number with ethtool -L Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 46 +++ .../net/ethernet/huawei/hinic/hinic_main.c| 2 +- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 5 ++ 3 files changed, 44

[PATCH net-next] hinic: add support to set and get pause param

2020-05-16 Thread Luo bin
add support to set pause param with ethtool -A and get pause param with ethtool -a. Also remove set_link_ksettings ops for VF. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 100 +- .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 2 + .../net

[PATCH net-next v2] hinic: add three net_device_ops of vf

2020-05-08 Thread Luo bin
adds ndo_set_vf_rate/ndo_set_vf_spoofchk/ndo_set_vf_link_state to configure netdev of virtual function Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 29 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 35 ++- .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 21

[PATCH net v2] hinic: fix a bug of ndo_stop

2020-05-08 Thread Luo bin
stomp host memory if we free memory regardless of the return value of SET_FUNC_STATE. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_mgmt.c | 28 ++- .../net/ethernet/huawei/hinic/hinic_main.c| 16 ++- 2 files changed, 23 insertions(+), 21 deletions

[PATCH net v3] hinic: fix a bug of ndo_stop

2020-05-10 Thread Luo bin
stomp host memory if we free memory regardless of the return value of SET_FUNC_STATE. Fixes: 51ba902a16e6 ("net-next/hinic: Initialize hw interface") Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_mgmt.c| 16 drivers/net/ethernet/huawei/hinic/hi

[PATCH net-next] hinic: add link_ksettings ethtool_ops support

2020-05-11 Thread Luo bin
add set_link_ksettings implementation and improve the implementation of get_link_ksettings Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 420 +- .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 13 + .../net/ethernet/huawei/hinic/hinic_hw_dev.h

[PATCH net-next] hinic: add set_ringparam ethtool_ops support

2020-05-14 Thread Luo bin
support to change TX/RX queue depth with ethtool -G Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 2 + .../net/ethernet/huawei/hinic/hinic_ethtool.c | 78 ++- .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 11 ++- .../net/ethernet/huawei/hinic

[PATCH net-next] hinic: update huawei ethernet driver maintainer

2020-05-14 Thread Luo bin
update huawei ethernet driver maintainer from aviad to Bin luo Signed-off-by: Luo bin --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index e581ae499057..8e51860e0204 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7811,7 +7811,7 @@ F

[PATCH net-next 1/1] hinic: add three net_device_ops of vf

2020-05-07 Thread Luo bin
adds ndo_set_vf_rate/ndo_set_vf_spoofchk/ndo_set_vf_link_state to configure netdev of virtual function Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 31 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 35 ++- .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 21

[PATCH net] hinic: fix a bug of ndo_stop

2020-05-07 Thread Luo bin
if some function in ndo_stop interface returns failure because of hardware fault, must go on excuting rest steps rather than return failure directly, otherwise will cause memory leak Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_mgmt.c | 28 ++- .../net

[PATCH net-next v1] hinic: add three net_device_ops of vf

2020-05-07 Thread Luo bin
adds ndo_set_vf_rate/ndo_set_vf_spoofchk/ndo_set_vf_link_state to configure netdev of virtual function Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 31 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 35 ++- .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 21

[PATCH net v1] hinic: fix a bug of ndo_stop

2020-05-07 Thread Luo bin
if some function in ndo_stop interface returns failure because of hardware fault, must go on excuting rest steps rather than return failure directly, otherwise will cause memory leak Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_mgmt.c | 28 ++- .../net

[PATCH net-next] hinic: remove unused but set variable

2020-06-29 Thread Luo bin
remove unused but set variable to avoid auto build test WARNING Signed-off-by: Luo bin Reported-by: kernel test robot --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 18 -- .../net/ethernet/huawei/hinic/hinic_sriov.c| 2 -- 2 files changed, 20 deletions(-) diff --git

[PATCH net] hinic: fix passing non negative value to ERR_PTR

2020-06-30 Thread Luo bin
get_dev_cap and set_resources_state functions may return a positive value because of hardware failure, and the positive return value can not be passed to ERR_PTR directly. Fixes: 7dd29ee12865 ("net-next/hinic: add sriov feature support") Signed-off-by: Luo bin --- drivers/net/ether

[PATCH net-next v1] hinic: add firmware update support

2020-07-13 Thread Luo bin
add support to update firmware by the devlink flashing API Signed-off-by: Luo bin --- V0~V1: remove the implementation from ethtool to devlink drivers/net/ethernet/huawei/hinic/Makefile| 2 +- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 1 + .../net/ethernet/huawei/hinic

[PATCH net-next v2] hinic: add firmware update support

2020-07-14 Thread Luo bin
add support to update firmware by the devlink flashing API Signed-off-by: Luo bin --- V1~V2: create separate devlink priv data structure and remove boot_flag V0~V1: remove the implementation from ethtool to devlink drivers/net/ethernet/huawei/hinic/Makefile| 2 +- drivers/net/ethernet

[PATCH net v1] hinic: fix passing non negative value to ERR_PTR

2020-06-30 Thread Luo bin
get_dev_cap and set_resources_state functions may return a positive value because of hardware failure, and the positive return value can not be passed to ERR_PTR directly. Fixes: 7dd29ee12865 ("hinic: add sriov feature support") Signed-off-by: Luo bin --- drivers/net/ethernet/hu

[PATCH net] hinic: fix sending mailbox timeout in aeq event work

2020-07-04 Thread Luo bin
this. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_mgmt.c | 91 +++ .../net/ethernet/huawei/hinic/hinic_hw_mgmt.h | 16 2 files changed, 88 insertions(+), 19 deletions(-) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c b/drivers/net/ethernet

[PATCH net-next] hinic: add firmware update support

2020-07-06 Thread Luo bin
add support to update firmware with with "ethtool -f" cmd Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 283 ++ .../net/ethernet/huawei/hinic/hinic_ethtool.h | 108 +++ .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 26 ++ .../ne

[PATCH net-next v3 4/5] hinic: add support to identify physical device

2020-06-27 Thread Luo bin
add support to identify physical device by flashing an LED attached to it with ethtool -p cmd. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 41 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 2 + .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 1

[PATCH net-next v3 0/5] hinic: add some ethtool ops support

2020-06-27 Thread Luo bin
ce with "ethtool -p" cmd patch #5: support to get eeprom information with "ethtool -m" cmd Luo bin (5): hinic: add support to set and get pause params hinic: add support to set and get irq coalesce hinic: add self test support hinic: add support to identify physical dev

[PATCH net-next v3 3/5] hinic: add self test support

2020-06-27 Thread Luo bin
add support to excute internal and external loopback test with ethtool -t cmd. Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 6 + .../net/ethernet/huawei/hinic/hinic_ethtool.c | 178 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 3 + .../net

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

2020-06-27 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| 72

[PATCH net-next v3 2/5] hinic: add support to set and get irq coalesce

2020-06-27 Thread Luo bin
add support to set TX/RX irq coalesce params with ethtool -C and get these params with ethtool -c. Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 8 + .../net/ethernet/huawei/hinic/hinic_ethtool.c | 294 ++ .../net/ethernet/huawei/hinic

[PATCH net-next v3 1/5] hinic: add support to set and get pause params

2020-06-27 Thread Luo bin
add support to set pause params with ethtool -A and get pause params with ethtool -a. Also remove set_link_ksettings ops for VF and enable pause by default. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 96 ++- .../net/ethernet/huawei/hinic

[PATCH net-next v4 0/5] hinic: add some ethtool ops support

2020-06-28 Thread Luo bin
ce with "ethtool -p" cmd patch #5: support to get eeprom information with "ethtool -m" cmd Luo bin (5): hinic: add support to set and get pause params hinic: add support to set and get irq coalesce hinic: add self test support hinic: add support to identify physical dev

[PATCH net-next v4 4/5] hinic: add support to identify physical device

2020-06-28 Thread Luo bin
add support to identify physical device by flashing an LED attached to it with ethtool -p cmd. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 34 .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 2 + .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 1

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

2020-06-28 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| 72

[PATCH net-next v4 2/5] hinic: add support to set and get irq coalesce

2020-06-28 Thread Luo bin
add support to set TX/RX irq coalesce params with ethtool -C and get these params with ethtool -c. Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 8 + .../net/ethernet/huawei/hinic/hinic_ethtool.c | 234 ++ .../net/ethernet/huawei/hinic

[PATCH net-next v4 1/5] hinic: add support to set and get pause params

2020-06-28 Thread Luo bin
add support to set pause params with ethtool -A and get pause params with ethtool -a. Also remove set_link_ksettings ops for VF and enable pause by default. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 86 ++- .../net/ethernet/huawei/hinic

  1   2   >