[PATCH net 2/3] net: hns: Restart autoneg need return failed when autoneg off

2019-01-26 Thread Peng Li
From: Yonglong Liu The hns driver of earlier devices, when autoneg off, restart autoneg will return -EINVAL, so make the hns driver for the latest devices do the same. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 16

[PATCH net 3/3] net: hns: Fix wrong read accesses via Clause 45 MDIO protocol

2019-01-26 Thread Peng Li
From: Yonglong Liu When reading phy registers via Clause 45 MDIO protocol, after write address operation, the driver use another write address operation, so can not read the right value of any phy registers. This patch fixes it. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li --- drivers

[PATCH net 1/3] net: hns: Fix for missing of_node_put() after of_parse_phandle()

2019-01-26 Thread Peng Li
//lkml.org/lkml/2018/12/22/217 Fixes: 48189d6aaf1e ("net: hns: enet specifies a reference to dsaf") Reported-by: Alexey Khoroshilov Signed-off-by: Yonglong Liu Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 5 + 1 file changed, 5 insertions(+) diff

[PATCH net 0/3] net: hns: code optimizations & bugfixes for HNS driver

2019-01-26 Thread Peng Li
This patchset includes bugfixes and code optimizations for the HNS ethernet controller driver Yonglong Liu (3): net: hns: Fix for missing of_node_put() after of_parse_phandle() net: hns: Restart autoneg need return failed when autoneg off net: hns: Fix wrong read accesses via Clause 45 MDIO

[PATCH net-next 1/9] net: hns3: refine the handle for hns3_nic_net_open/stop()

2018-12-19 Thread Peng Li
(). To keep symmetrical, start the work task at the end of hns3_nic_net_open(). Signed-off-by: Jian Shen Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 1 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 8 .../ethernet/hisilicon/hns3/hns3pf

[PATCH net-next 4/9] net: hns3: add max vector number check for pf

2018-12-19 Thread Peng Li
x for coalesce configuration lost during reset") Signed-off-by: Jian Shen Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/h

[PATCH net-next 2/9] net: hns3: change default tc state to close

2018-12-19 Thread Peng Li
From: Jian Shen In original codes, default tc value is set to the max tc. It's more reasonable to close tc by changing default tc value to 1. Users can enable it with lldp tool when they want to use tc. Signed-off-by: Jian Shen Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon

[PATCH net-next 8/9] net: hns3: fix the descriptor index when get rss type

2018-12-19 Thread Peng Li
RSS hash information to RX skb") Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 624

[PATCH net-next 6/9] net: hns3: fix vf id check issue when add flow director rule

2018-12-19 Thread Peng Li
From: Jian Shen When add flow director fule for vf, the vf id is used as array subscript before valid checking, which may cause memory overflow. Fixes: dd74f815dd41 ("net: hns3: Add support for rule add/delete for flow director") Signed-off-by: Jian Shen Signed-off-by: Peng Li --

[PATCH net-next 3/9] net: hns3: fix a bug caused by udelay

2018-12-19 Thread Peng Li
udelay() in driver may always occupancy processor. If there is only one cpu in system, the VF driver may initialize fail when insmod PF and VF driver in the same system. This patch use msleep() to free cpu when VF wait PF message. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3

[PATCH net-next 5/9] net: hns3: reset tqp while doing DOWN operation

2018-12-19 Thread Peng Li
emory during DOWN. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 4 2 files changed, 8 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/h

[PATCH net-next 9/9] net: hns3: remove redundant variable initialization

2018-12-19 Thread Peng Li
This patch removes the redundant variable initialization, as driver will devm_kzalloc to set value to hdev soon. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet

[PATCH net-next 7/9] net: hns3: don't restore rules when flow director is disabled

2018-12-19 Thread Peng Li
handle for flow director") Fixes: c17852a8932f ("net: hns3: Add support for enable/disable flow director") Signed-off-by: Jian Shen Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/ne

[PATCH net-next 0/9] net: hns3: code optimizations & bugfixes for HNS3 driver

2018-12-19 Thread Peng Li
: add max vector number check for pf net: hns3: fix vf id check issue when add flow director rule net: hns3: don't restore rules when flow director is disabled Peng Li (3): net: hns3: fix a bug caused by udelay net: hns3: fix the descriptor index when get rss type net: hns3: r

[PATCH net-next 00/12] net: hns3: code optimizations & bugfixes for HNS3 driver

2018-12-18 Thread Peng Li
net: hns3: fix napi_disable not return problem net: hns3: update some variables while hclge_reset()/hclgevf_reset() done net: hns3: remove unnecessary configuration recapture while resetting net: hns3: fix incomplete uninitialization of IRQ in the hns3_nic_uninit_vector_data() Peng

[PATCH net-next 10/12] net: hns3: getting tx and dv buffer size through firmware

2018-12-18 Thread Peng Li
ff-by: Yunsheng Lin Signed-off-by: Peng Li --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 5 ++- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 41 -- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 3 ++ 3 files changed, 38 insertions(+), 11 deletions(-)

[PATCH net-next 08/12] net: hns3: remove 1000M/half support of phy

2018-12-18 Thread Peng Li
From: Fuyun Liang Our phy does not support 1000M/half, this patch removes 1000M/half from PHY_SUPPORTED_FEATURES. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH net-next 11/12] net: hns3: aligning buffer size in SSU to 256 bytes

2018-12-18 Thread Peng Li
From: Yunsheng Lin The hardware expects the buffer size set to SSU is aligned to 256 bytes, this patch aligns the buffer size to 256 byte using roundup or rounddown function. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 43

[PATCH net-next 02/12] net: hns3: uninitialize pci in the hclgevf_uninit

2018-12-18 Thread Peng Li
t;net: hns3: do VF's pci re-initialization while PF doing FLR") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf

[PATCH net-next 05/12] net: hns3: remove unnecessary configuration recapture while resetting

2018-12-18 Thread Peng Li
From: Huazhong Tan When doing reset, it is unnecessary to get the hardware's default configuration again, otherwise, the user's configuration will be overwritten. Fixes: 4ed340ab8f49 ("net: hns3: Add reset process in hclge_main") Signed-off-by: Huazhong Tan Signed-off-by: P

[PATCH net-next 04/12] net: hns3: update some variables while hclge_reset()/hclgevf_reset() done

2018-12-18 Thread Peng Li
hnae3_ae_dev to HNAE3_NONE_RESET. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 5 - drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net

[PATCH net-next 01/12] net: hns3: fix error handling int the hns3_get_vector_ring_chain

2018-12-18 Thread Peng Li
ain. This patch fixes them. Fixes: 73b907a083b8 ("net: hns3: bugfix for buffer not free problem during resetting") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH net-next 06/12] net: hns3: fix incomplete uninitialization of IRQ in the hns3_nic_uninit_vector_data()

2018-12-18 Thread Peng Li
. Fixes: 424eb834a9be ("net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ether

[PATCH net-next 12/12] net: hns3: fix a SSU buffer checking bug

2018-12-18 Thread Peng Li
: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethe

[PATCH net-next 07/12] net: hns3: update coalesce param per second

2018-12-18 Thread Peng Li
param 100% in time, but the lag time is very short. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 8 +++- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 4 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3

[PATCH net-next 03/12] net: hns3: fix napi_disable not return problem

2018-12-18 Thread Peng Li
t;net: hns3: stop napi polling when HNS3_NIC_STATE_DOWN is set") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/d

[PATCH net-next 09/12] net: hns3: synchronize speed and duplex from phy when phy link up

2018-12-18 Thread Peng Li
Driver calls phy_connect_direct and registers hclge_mac_adjust_link to synchronize mac speed and duplex from phy. It is better to synchronize mac speed and duplex from phy when phy link up. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 4 1 file

[Patch net 02/10] net: hns: All ports can not work when insmod hns ko after rmmod.

2018-12-14 Thread Peng Li
sometimes related, fixing the second case also requires fixing the first case, so fix them together. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 15 +++ drivers/net/ethernet/hisilicon/hns/hns_enet.c | 3 +++ 2 files c

[Patch net 06/10] net: hns: Free irq when exit from abnormal branch

2018-12-14 Thread Peng Li
dy requested are not release. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/

[Patch net 07/10] net: hns: Avoid net reset caused by pause frames storm

2018-12-14 Thread Peng Li
-by: Yonglong Liu Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c index 03d959c..8a53c82 100644 --

[Patch net 00/10] net: hns: Code improvements & fixes for HNS driver

2018-12-14 Thread Peng Li
This patchset introduces some code improvements and fixes for the identified problems in the HNS driver. Every patch is independent. Yonglong Liu (10): net: hns: Incorrect offset address used for some registers. net: hns: All ports can not work when insmod hns ko after rmmod. net: hns: some

[Patch net 09/10] net: hns: Add mac pcs config when enable|disable mac

2018-12-14 Thread Peng Li
-off-by: Yonglong Liu Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 14 ++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c b

[Patch net 05/10] net: hns: Clean rx fbd when ae stopped.

2018-12-14 Thread Peng Li
From: Yonglong Liu If there are packets in hardware when changing the speed or duplex, it may cause hardware hang up. This patch adds the code to wait rx fbd clean up when ae stopped. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c

[Patch net 01/10] net: hns: Incorrect offset address used for some registers.

2018-12-14 Thread Peng Li
From: Yonglong Liu According to the hip06 Datasheet: 1. The offset of INGRESS_SW_VLAN_TAG_DISC should be 0x1A00+4*all_chn_num 2. The offset of INGRESS_IN_DATA_STP_DISC should be 0x1A50+4*all_chn_num Signed-off-by: Yonglong Liu Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns

[Patch net 08/10] net: hns: Fix ntuple-filters status error.

2018-12-14 Thread Peng Li
From: Yonglong Liu The ntuple-filters features is forced on by chip. But it shows "ntuple-filters: off [fixed]" when use ethtool. This patch make it correct with "ntuple-filters: on [fixed]". Signed-off-by: Yonglong Liu Signed-off-by: Peng Li --- drivers/net/ethernet/hisi

[Patch net 10/10] net: hns: Fix ping failed when use net bridge and send multicast

2018-12-14 Thread Peng Li
512 tcam entries, which indicate lower priority. And separate one promisc entry to two: mc & uc, to avoid package match the wrong tcam entry. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 257 + 1 file changed,

[Patch net 03/10] net: hns: Some registers use wrong address according to the datasheet.

2018-12-14 Thread Peng Li
n. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 242 ++--- drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 12 +- 2 files changed, 127 insertions(+), 127 deletions(-) diff --git a/drivers/net/ethernet/his

[Patch net 04/10] net: hns: Fixed bug that netdev was opened twice

2018-12-14 Thread Peng Li
This patchset fix this bug according to the flag NIC_STATE_DOWN. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet

[PATCH V2 net 0/2] net: hns: fix some bugs about speed and duplex change

2018-08-26 Thread Peng Li
1) close rx of chip, close tx of protocol stack. 2) wait rcb, ppe, mac to clean. 3) adjust link 4) open rx of chip, open tx of protocol stack. --- Change log: V1 -> V2: 1, remove a patch according to the comment reported by Andrew Lunn. --- Peng Li (2): net: hns: add the code for cleaning pkt i

[PATCH V2 net 2/2] net: hns: add netif_carrier_off before change speed and duplex

2018-08-26 Thread Peng Li
If there are packets in hardware when changing the speed or duplex, it may cause hardware hang up. This patch adds netif_carrier_off before change speed and duplex in ethtool_ops.set_link_ksettings, and adds netif_carrier_on after complete the change. Signed-off-by: Peng Li --- drivers/net

[PATCH V2 net 1/2] net: hns: add the code for cleaning pkt in chip

2018-08-26 Thread Peng Li
ose rx of chip, close tx of protocol stack. 2) wait rcb, ppe, mac to clean. 3) adjust link 4) open rx of chip, open tx of protocol stack. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns/hnae.h | 2 + drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 67 +

[PATCH net-next 4/5] net: hns3: fix for not initializing VF rss_hash_key problem

2018-03-23 Thread Peng Li
From: Fuyun Liang Default rss_hash_key value should be given to all vports. But just the PF rss_hash_key has the default value here. This patch adds rss_hash_key Initialization for all vports. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf

[PATCH net-next 1/5] net: hns3: fix for returning wrong value problem in hns3_get_rss_key_size

2018-03-23 Thread Peng Li
From: Fuyun Liang The return type of hns3_get_rss_key_size is u32. But a negative value is returned. This patch fixes it by replacing the negative value with zero. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 2 +- 1 file changed

[PATCH net-next 0/5] fix some bugs for HNS3

2018-03-23 Thread Peng Li
returning wrong value problem in hns3_get_rss_key_size net: hns3: fix for returning wrong value problem in hns3_get_rss_indir_size net: hns3: fix for the wrong shift problem in hns3_set_txbd_baseinfo net: hns3: fix for not initializing VF rss_hash_key problem Peng Li (1): net: hns3: never

[PATCH net-next 2/5] net: hns3: fix for returning wrong value problem in hns3_get_rss_indir_size

2018-03-23 Thread Peng Li
From: Fuyun Liang The return type of hns3_get_rss_indir_size is u32. But a negative value is returned. This patch fixes it by replacing the negative value with zero. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 2 +- 1 file

[PATCH net-next 5/5] net: hns3: never send command queue message to IMP when reset

2018-03-23 Thread Peng Li
IMP will not handle and command queue message any more when it is in core/global, driver should not send command queue message to IMP until reinitialize the NIC HW. This patch checks the status and avoid the message sent to IMP when reset. Signed-off-by: Peng Li --- .../ethernet/hisilicon/hns3

[PATCH net-next 3/5] net: hns3: fix for the wrong shift problem in hns3_set_txbd_baseinfo

2018-03-23 Thread Peng Li
From: Fuyun Liang Third parameter of hnae_set_field is shift, But a mask is given. This patch fixes it by replacing HNS3_TXD_BDTYPE_M with HNS3_TXD_BDTYPE_S. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- 1 file changed, 1

[PATCH net-next 02/11] net: hns3: fix the VF queue reset flow error

2018-03-21 Thread Peng Li
reset flow as the correct step. Signed-off-by: Peng Li --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 37 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 1 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 11 --- .../ethernet/hisilicon/hns3/hns3vf

[PATCH net-next 05/11] net: hns3: increase the max time for IMP handle command

2018-03-21 Thread Peng Li
It may need more time for IMP handle some command, such as reset. This patch enlarges the max time for cmd timeout. Driver will check the IMP result every us, it may break through the loop when get the right result. So not all command need the max time. Signed-off-by: Peng Li --- drivers/net

[PATCH net-next 10/11] net: hns3: add querying speed and duplex support to VF

2018-03-21 Thread Peng Li
From: Fuyun Liang This patch adds support for querying speed and duplex by ethtool ethX to VF. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 8 ++-- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 22

[PATCH net-next 08/11] net: hns3: fix for getting wrong link mode problem

2018-03-21 Thread Peng Li
From: Fuyun Liang Fixed link mode is returned by hns3_get_link_ksettings. It is unreasonable. This patch fixes it by adding some related functions to get link mode from hardware. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 4

[PATCH net-next 01/11] net: hns3: reallocate tx/rx buffer after changing mtu

2018-03-21 Thread Peng Li
buffer and rx buffer need to be reallocated too. So calling set_mtu and buffer_alloc separately is better. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 36 +- 1 file changed, 22 insertions(+), 14 deletions

[PATCH net-next 07/11] net: hns3: change the time interval of int_gl calculating

2018-03-21 Thread Peng Li
From: Fuyun Liang Since we change the update rate of int_gl from every interrupt to every one hundred interrupts, the old way to get time interval by int_gl value is not accurate. This patch calculates the time interval using the jiffies value. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li

[PATCH net-next 03/11] net: hns3: fix for vlan table lost problem when resetting

2018-03-21 Thread Peng Li
From: Yunsheng Lin The vlan table in hardware is clear after PF/Core/IMP/Global reset, which will cause vlan tagged packets not being received problem. This patch fixes it by restoring the vlan table after reset. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- drivers/net/ethernet

[PATCH net-next 09/11] net: hns3: add get_link support to VF

2018-03-21 Thread Peng Li
From: Fuyun Liang This patch adds ethtool_ops.get_link support to VF. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c| 1 + drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 8 2 files changed, 9 insertions

[PATCH net-next 11/11] net: hns3: fix for not returning problem in get_link_ksettings when phy exists

2018-03-21 Thread Peng Li
From: Fuyun Liang When phy exists, phy_ethtool_ksettings_get function is enough to get the link ksettings. If the phy exists, get_link_ksettings function can return directly after phy_ethtool_ksettings_get is called. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet

[PATCH net-next 00/11] fix some bugs for HNS3 driver

2018-03-21 Thread Peng Li
: fix for not returning problem in get_link_ksettings when phy exists Peng Li (2): net: hns3: fix the VF queue reset flow error net: hns3: increase the max time for IMP handle command Yunsheng Lin (2): net: hns3: fix for vlan table lost problem when resetting net: hns3: export pci table

[PATCH net-next 04/11] net: hns3: export pci table of hclge and hclgevf to userspace

2018-03-21 Thread Peng Li
e pci table, so this patch exports the pci table for hclge and hclgevf module too. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 ++ 2 files changed, 4 inser

[PATCH net-next 06/11] net: hns3: change GL update rate

2018-03-21 Thread Peng Li
. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 8 drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet

[PATCH net-next 01/12] net: hns3: add existence check when remove old uc mac address

2018-03-09 Thread Peng Li
ngine & Compatibility Layer Support") Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 3 ++- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++-- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 17 +++-

[PATCH net-next 02/12] net: hns3: fix for netdev not running problem after calling net_stop and net_open

2018-03-09 Thread Peng Li
updating the link state in ae_stop function. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +++ drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/net/ethernet

[PATCH net-next 04/12] net: hns3: unify the pause params setup function

2018-03-09 Thread Peng Li
From: Fuyun Liang Since the firmware cmd to setup mac pause params is the same as the firmware cmd to pfc pause params, this patch unifies the pause params setup function. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 2

[PATCH net-next 07/12] net: hns3: fix for loopback failure when vlan filter is enable

2018-03-09 Thread Peng Li
From: Yunsheng Lin When vlan ctag filter is enabled, the loopback selftest fails because loopback selftest does not support vlan. This patch fixes it by disabling the vlan ctag filter when runnig loopback selftest. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- drivers/net/ethernet

[PATCH net-next 00/12] fix some bugs for HNS3 driver

2018-03-09 Thread Peng Li
net: hns3: fix return value error of hclge_get_mac_vlan_cmd_status() net: hns3: add existence checking before adding unicast mac address net: hns3: add result checking for VF when modify unicast mac address Peng Li (2): net: hns3: fix rx path skb->truesize reporting bug net: hns3: add supp

[PATCH net-next 03/12] net: hns3: fix for ipv6 address loss problem after setting channels

2018-03-09 Thread Peng Li
: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 8113d22..4dba974 100644 --- a

[PATCH net-next 06/12] net: hns3: add support for querying pfc puase packets statistic

2018-03-09 Thread Peng Li
This patch add support for querying pfc puase packets statistic in hclge_ieee_getpfc, which is used to tell user how many pfc puase packets have been sent and received by this mac port. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c

[PATCH net-next 10/12] net: hns3: fix return value error of hclge_get_mac_vlan_cmd_status()

2018-03-09 Thread Peng Li
invalid op code, return -EINVAL. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Jian Shen Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 10 +- 1 file changed, 5 in

[PATCH net-next 12/12] net: hns3: add result checking for VF when modify unicast mac address

2018-03-09 Thread Peng Li
-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c| 2 +- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 +- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c | 4 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net

[PATCH net-next 09/12] net: hns3: fix error type definition of return value

2018-03-09 Thread Peng Li
From: Jian Shen An enum type variable was used to store an "int" type return value. This patch fixes it. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Jian Shen Signed-off-by: Peng Li --- drivers/net

[PATCH net-next 08/12] net: hns3: fix for buffer overflow smatch warning

2018-03-09 Thread Peng Li
x support to PF driver") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h| 2 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 19 --- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 60 ++ 3 files ch

[PATCH net-next 11/12] net: hns3: add existence checking before adding unicast mac address

2018-03-09 Thread Peng Li
table, and add it if the entry is inexistent. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Jian Shen Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 17 - 1 file chan

[PATCH net-next 05/12] net: hns3: fix rx path skb->truesize reporting bug

2018-03-09 Thread Peng Li
Original skb->truesize reports the received packet size, not the actual buffer size NIC driver allocated(1 Page). The linux net protocol will misjudge the true size of rx queue. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 10 -- 1 file changed

[PATCH net-next 1/9] net: hns3: refactor the hclge_get/set_rss function

2018-03-08 Thread Peng Li
From: Yunsheng Lin This patch refactors the hclge_get/set_rss function in order to fix the rss configuration loss problem during reset process. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 39 -- .../ethernet

[PATCH net-next 4/9] net: hns3: fix for pause configuration lost during reset

2018-03-08 Thread Peng Li
: Yunsheng Lin Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index

[PATCH net-next 5/9] net: hns3: fix for use-after-free when setting ring parameter

2018-03-08 Thread Peng Li
ing, and uses hns3_put_ring_config to free it when necessary. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

[PATCH net-next 8/9] net: hns3: refactor the coalesce related struct

2018-03-08 Thread Peng Li
From: Yunsheng Lin This patch refoctors the coalesce related struct by introducing the hns3_enet_coalesce struct, in order to fix the coalesce configuation lost problem when changing the channel number. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon

[PATCH net-next 7/9] net: hns3: fix for coalesce configuration lost during reset

2018-03-08 Thread Peng Li
. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 156 +--- 1 file changed, 114 insertions(+), 42 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3

[PATCH net-next 0/9] fixes for configuration lost problems

2018-03-08 Thread Peng Li
This patchset refactors some functions and some bugs in order to fix the configuration loss problem when resetting and setting channel number. Yunsheng Lin (9): net: hns3: refactor the hclge_get/set_rss function net: hns3: refactor the hclge_get/set_rss_tuple function net: hns3: fix for RSS

[PATCH net-next 2/9] net: hns3: refactor the hclge_get/set_rss_tuple function

2018-03-08 Thread Peng Li
From: Yunsheng Lin This patch refactors the hclge_get/set_rss_tuple function in order to fix the rss configuration loss problem during reset process. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 91

[PATCH net-next 9/9] net: hns3: fix for coal configuation lost when setting the channel

2018-03-08 Thread Peng Li
nsheng Lin Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 37 +++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index f466f60..0a8c

[PATCH net-next 6/9] net: hns3: refactor the get/put_vector function

2018-03-08 Thread Peng Li
Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 3 +++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 4 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 28 -- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 12

[PATCH net-next 3/9] net: hns3: fix for RSS configuration loss problem during reset

2018-03-08 Thread Peng Li
: Yunsheng Lin Signed-off-by: Peng Li --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 2 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 107 ++--- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 1 + 3 files changed, 56 insertions(+), 54 deletions(-) diff

[Patch net-next 0/6] fix some bugs for hns3 driver

2018-03-08 Thread Peng Li
This patchset fix some bugs for hns3 driver. [Patch 1/6 - Patch 3/6] fix bugs related about VF driver. [Patch 3/6 - Patch 6/6] fix the bugs about ethtool_ops.set_channels. Peng Li (6): net: hns3: VF should get the real rss_size instead of rss_size_max net: hns3: set the cmdq out_vld bit to 0

netdev@vger.kernel.org

2018-03-08 Thread Peng Li
Command HCLGE_OPC_CFG_COM_TQP_QUEUE should use queue id in the function, but command HCLGE_OPC_RESET_TQP_QUEUE should use global queue id. This patch fixes the queue id about queue enable/disable/reset. Signed-off-by: Peng Li --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 50

[Patch net-next 1/6] net: hns3: VF should get the real rss_size instead of rss_size_max

2018-03-08 Thread Peng Li
VF driver should get the real rss_size which is assigned by host PF, not rss_size_max. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c b

[Patch net-next 3/6] net: hns3: fix endian issue when PF get mbx message flag

2018-03-08 Thread Peng Li
This patch fixes the endian issue when PF get mbx message flag. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c b/drivers/net

[Patch net-next 5/6] net: hns3: set the max ring num when alloc netdev

2018-03-08 Thread Peng Li
HNS3 driver should alloc netdev with max support ring num, as driver support change netdev count by ethtool -L. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 27 - 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/drivers/net

[Patch net-next 6/6] net: hns3: add support for VF driver inner interface hclgevf_ops.get_tqps_and_rss_info

2018-03-08 Thread Peng Li
This patch adds support for VF driver inner interface hclgevf_ops.get_tqps_and_rss_info. This interface will be used in the initialization process. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

[Patch net-next 2/6] net: hns3: set the cmdq out_vld bit to 0 after used

2018-03-08 Thread Peng Li
Driver check the out_vld bit when get a new cmdq BD, if the bit is 1, the BD is valid. driver Should set the bit 0 after used and hw will set the bit 1 if get a valid BD. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 1 + drivers/net/ethernet/hisilicon

[PATCH net-next 01/23] {topost} net: hns3: VF should get the real rss_size instead of rss_size_max

2018-03-07 Thread Peng Li
VF driver should get the real rss_size which is assigned by host PF, not rss_size_max. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c b

[PATCH net-next 06/23] {topost} net: hns3: fix for ipv6 address loss problem after setting channels

2018-03-07 Thread Peng Li
: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 1bebfd9..83f4b36 100644 --- a

[PATCH net-next 12/23] {topost} net: hns3: fix for RSS configuration loss problem during reset

2018-03-07 Thread Peng Li
: Yunsheng Lin Signed-off-by: Peng Li --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 2 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 107 ++--- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 1 + 3 files changed, 56 insertions(+), 54 deletions(-) diff

[PATCH net-next 05/23] {topost} net: hns3: fix for netdev not running problem after calling net_stop and net_open

2018-03-07 Thread Peng Li
updating the link state in ae_stop function. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +++ drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/net/ethernet

[PATCH net-next 00/23] net: hns3: HNS3 bug fixes & code improvements

2018-03-07 Thread Peng Li
: fix for ipv6 address loss problem after setting channels {topost} net: hns3: unify the pause params setup function Peng Li (8): {topost} net: hns3: VF should get the real rss_size instead of rss_size_max {topost} net: hns3: set the cmdq out_vld bit to 0 after used {topost} net: hns3

[PATCH net-next 08/23] {topost} net: hns3: fix rx path skb->truesize reporting bug

2018-03-07 Thread Peng Li
Original skb->truesize reports the received packet size, not the actual buffer size NIC driver allocated(1 Page). The linux net protocol will misjudge the true size of rx queue. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 10 -- 1 file changed

[PATCH net-next 14/23] {topost} net: hns3: fix for use-after-free when setting ring parameter

2018-03-07 Thread Peng Li
ing, and uses hns3_put_ring_config to free it when necessary. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

[PATCH net-next 11/23] {topost} net: hns3: refactor the hclge_get/set_rss_tuple function

2018-03-07 Thread Peng Li
From: Yunsheng Lin This patch refactors the hclge_get/set_rss_tuple function in order to fix the rss configuration loss problem during reset process. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 91

[PATCH net-next 13/23] {topost} net: hns3: fix for pause configuration lost during reset

2018-03-07 Thread Peng Li
: Yunsheng Lin Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index

[PATCH net-next 02/23] {topost} net: hns3: add existence check when remove old uc mac address

2018-03-07 Thread Peng Li
ngine & Compatibility Layer Support") Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 3 ++- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++-- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 17 +++-

[PATCH net-next 07/23] {topost} net: hns3: unify the pause params setup function

2018-03-07 Thread Peng Li
From: Fuyun Liang Since the firmware cmd to setup mac pause params is the same as the firmware cmd to pfc pause params, this patch unifies the pause params setup function. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 2

  1   2   >