[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 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 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 5/9] net: hns3: reset tqp while doing DOWN operation

2018-12-19 Thread Peng Li
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/hns3pf

[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 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 4/9] net: hns3: add max vector number check for pf

2018-12-19 Thread Peng Li
: fix 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 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 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: remove

[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/hns3

[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 ind

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

2018-12-19 Thread Peng Li
andle 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/net/eth

[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/hclg

[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

[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: Peng Li --

[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 10/12] net: hns3: getting tx and dv buffer size through firmware

2018-12-18 Thread Peng Li
-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(-) diff

[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 04/12] net: hns3: update some variables while hclge_reset()/hclgevf_reset() done

2018-12-18 Thread Peng Li
of 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 07/12] net: hns3: update coalesce param per second

2018-12-18 Thread Peng Li
the 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 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 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-next 06/12] net: hns3: fix incomplete uninitialization of IRQ in the hns3_nic_uninit_vector_data()

2018-12-18 Thread Peng Li
xes: 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/ethernet/h

[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 07/10] net: hns: Avoid net reset caused by pause frames storm

2018-12-14 Thread Peng Li
off-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 100

[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 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 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 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 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 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:

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

2018-12-14 Thread Peng Li
et 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/hisilicon/hns/hns_

[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 10/10] net: hns: Fix ping failed when use net bridge and send multicast

2018-12-14 Thread Peng Li
of 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 V2 net 0/2] net: hns: fix some bugs about speed and duplex change

2018-08-26 Thread Peng Li
s: 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 0/2] net: hns: fix some bugs about speed and duplex change

2018-08-26 Thread Peng Li
s: 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 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 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 <liangfuy...@huawei.com> 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 <liangfuy...@huawei.com> Signed-off-by: Peng Li <lipen

[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 <liangfuy...@huawei.com> 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 <liangfuy...@huawei.com> Signed-off

[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 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 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 <lipeng...@huawei.

[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 <liangfuy...@huawei.com> 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 <liangfuy...@huawei.com> Signed-off-by: Peng Li <lipeng...@huawei.co

[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 <liangfuy...@huawei.com> 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 <liangfuy...@huawei.com> Signed-off-by: Peng Li <lipen

[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 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 0/5] fix some bugs for HNS3

2018-03-23 Thread Peng Li
for 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 0/5] fix some bugs for HNS3

2018-03-23 Thread Peng Li
for 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 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 <lipeng...@huawei.com> --- .../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 --- .../et

[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 06/11] net: hns3: change GL update rate

2018-03-21 Thread Peng Li
efined by HNS3_INT_ADAPT_DOWN_START. Signed-off-by: Fuyun Liang <liangfuy...@huawei.com> Signed-off-by: Peng Li <lipeng...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 8 drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 2 ++ 2 files changed, 10 inserti

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

2018-03-21 Thread Peng Li
From: Fuyun Liang <liangfuy...@huawei.com> This patch adds support for querying speed and duplex by ethtool ethX to VF. Signed-off-by: Fuyun Liang <liangfuy...@huawei.com> Signed-off-by: Peng Li <lipeng...@huawei.com> --- .../net/ethernet/hisilicon/hns3/hns3p

[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 <lip

[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 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 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 08/11] net: hns3: fix for getting wrong link mode problem

2018-03-21 Thread Peng Li
From: Fuyun Liang <liangfuy...@huawei.com> 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 <liangfuy...@huawei.com> Signed-off-by: Pen

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

2018-03-21 Thread Peng Li
Liang <liangfuy...@huawei.com> Signed-off-by: Peng Li <lipeng...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 46 - drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 1 + 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/dr

[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 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 01/11] net: hns3: reallocate tx/rx buffer after changing mtu

2018-03-21 Thread Peng Li
When the tc_num is changed, the tx buffer and rx buffer need to be reallocated too. So calling set_mtu and buffer_alloc separately is better. Signed-off-by: Fuyun Liang <liangfuy...@huawei.com> Signed-off-by: Peng Li <lipeng...@huawei.com> --- .../ethernet/hisilicon/hns3/hns3pf/hc

[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 03/11] net: hns3: fix for vlan table lost problem when resetting

2018-03-21 Thread Peng Li
uawei.com> Signed-off-by: Peng Li <lipeng...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 26 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 3 +++ 2 files changed, 29 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ene

[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 04/11] net: hns3: export pci table of hclge and hclgevf to userspace

2018-03-21 Thread Peng Li
et has already exported the pci table, so this patch exports the pci table for hclge and hclgevf module too. Signed-off-by: Yunsheng Lin <linyunsh...@huawei.com> Signed-off-by: Peng Li <lipeng...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 ++ drivers/net/

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

2018-03-21 Thread Peng Li
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 insertions

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

2018-03-21 Thread Peng Li
From: Fuyun Liang <liangfuy...@huawei.com> This patch adds ethtool_ops.get_link support to VF. Signed-off-by: Fuyun Liang <liangfuy...@huawei.com> Signed-off-by: Peng Li <lipeng...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c| 1 + drivers/net/

[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
uawei.com> Signed-off-by: Peng Li <lipeng...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethto

[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 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 01/12] net: hns3: add existence check when remove old uc mac address

2018-03-09 Thread Peng Li
3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Fuyun Liang <liangfuy...@huawei.com> Signed-off-by: Peng Li <lipeng...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 3 ++- drivers/net/ethernet/hisilicon/hns3/hns3_enet.

[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
roblem. This patch fixes it by updating the link state in ae_stop function. Signed-off-by: Fuyun Liang <liangfuy...@huawei.com> Signed-off-by: Peng Li <lipeng...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +++ drivers/net/ethernet/hisilicon/hns3/hns3vf/

[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
it by 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 <liangfuy...@huawei.com> 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 <liangfuy...@huawei.com> Signed-off-by: Peng Li <lipen

[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 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 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 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 <linyunsh...@huawei.com> Signed-off-by: Peng Li <lipeng...@huawei.com>

[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 03/12] net: hns3: fix for ipv6 address loss problem after setting channels

2018-03-09 Thread Peng Li
eplace dev_open. Signed-off-by: Fuyun Liang <liangfuy...@huawei.com> Signed-off-by: Peng Li <lipeng...@huawei.com> --- 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_ene

[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 <lipeng...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 10

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

2018-03-09 Thread Peng Li
-by: 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

[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 10/12] net: hns3: fix return value error of hclge_get_mac_vlan_cmd_status()

2018-03-09 Thread Peng Li
d send fail, return -EIO. For invalid op code, return -EINVAL. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Jian Shen <shenjia...@huawei.com> Signed-off-by: Peng Li <lipeng...@huawei.com> --- drivers/ne

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

2018-03-09 Thread Peng Li
. For 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
ed-off-by: Jian Shen <shenjia...@huawei.com> Signed-off-by: Peng Li <lipeng...@huawei.com> --- 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

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

2018-03-09 Thread Peng Li
From: Jian Shen <shenjia...@huawei.com> 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 <shenjia...@h

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

2018-03-09 Thread Peng Li
ddress in the mac_vlan 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 <shenjia...@huawei.com> Signed-off-by: Peng Li <lipeng...@huawei.com> --- drivers/ne

[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

  1   2   3   4   >