[PATCH net] net: hns: Bugfix for Tx timeout handling in hns driver

2017-07-12 Thread Lin Yun Sheng
t;) Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c index

[PATCH net V2 1/2] net: hns: Fix a wrong op phy C45 code

2017-07-05 Thread Lin Yun Sheng
From: Yunsheng Lin As the user manual described, the second step to write to C45 phy by mdio should be data, but not address. Here we should fix this issue. Fixes: 5b904d39406a ("net: add Hisilicon Network Subsystem MDIO support") Signed-off-by: Yunsheng Lin

[PATCH net V2 2/2] net: hns: Fix a skb used after free bug

2017-07-05 Thread Lin Yun Sheng
From: Yunsheng Lin skb maybe freed in hns_nic_net_xmit_hw() and return NETDEV_TX_OK, which cause hns_nic_net_xmit to use a freed skb. BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940... [17659.112635] alloc_debug_processing+0x18c/0x1a0

[PATCH net V2 0/2] Bugfixs for hns ethernet driver

2017-07-05 Thread Lin Yun Sheng
This patchset fix skb used after free and C45 op code issues in hns driver. Patch V2: 1. Remove ndev->feature checking in TX description patch. 2. Add Fixes: Tag in patch description. Patch V1: Initial Submit Yunsheng Lin (2): net: hns: Fix a wrong op phy C45 code

[PATCH net 1/3] net: hns: Add TX CSUM check when fill TX description

2017-07-04 Thread Lin Yun Sheng
From: Yunsheng Lin If driver support checksum offload, should check netdev feature before fill TX description and get CSUM err bit from RX description. HNS driver do the check in RX derction but it doesn't do the check in TX direction. Signed-off-by: lipeng

[PATCH net 2/3] net: hns: Fix a wrong op phy C45 code

2017-07-04 Thread Lin Yun Sheng
From: Yunsheng Lin As the user manual described, the second step to write to C45 phy by mdio should be data, but not address. Here we should fix this issue. Signed-off-by: Yankejian Reviewed-by: lipeng Reviewed-by: Yunsheng

[PATCH net 0/3] Bugfixs for hns ethernet driver

2017-07-04 Thread Lin Yun Sheng
This patchset fix skb uesd after used, C45 op code and Tx description filling issues in hns driver. Yunsheng Lin (3): net: hns: Add TX CSUM check when fill TX description net: hns: Fix a wrong op phy C45 code net: hns: Fix a skb used after free bug

[PATCH net 3/3] net: hns: Fix a skb used after free bug

2017-07-04 Thread Lin Yun Sheng
From: Yunsheng Lin skb maybe freed in hns_nic_net_xmit_hw() and return NETDEV_TX_OK, which cause hns_nic_net_xmit to use a freed skb. BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940... [17659.112635] alloc_debug_processing+0x18c/0x1a0

[PATCH net-next v8 2/2] net: hns: Use phy_driver to setup Phy loopback

2017-06-30 Thread Lin Yun Sheng
Use function set_loopback in phy_driver to setup phy loopback when doing ethtool self test. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns/hnae.h| 1 + drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 105 --- 2

[PATCH net-next v8 0/2] Add loopback support in phy_driver and hns ethtool fix

2017-06-30 Thread Lin Yun Sheng
enable and disable in pair in hns mac driver. Patch V2: 1. Add phy_loopback in phy_device.c. 2. Do error checking and do the read and write once in genphy_loopback. 3. Remove gen10g_loopback in phy_device.c. Patch V1: Initial Submit Lin Yun Sheng (2): net

[PATCH net-next v8 1/2] net: phy: Add phy loopback support in net phy framework

2017-06-30 Thread Lin Yun Sheng
This patch add set_loopback in phy_driver, which is used by MAC driver to enable or disable phy loopback. it also add a generic genphy_loopback function, which use BMCR loopback bit to enable or disable loopback. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> Reviewed-by: Andre

[PATCH NET V7 1/2] net: phy: Add phy loopback support in net phy framework

2017-06-28 Thread Lin Yun Sheng
This patch add set_loopback in phy_driver, which is used by MAC driver to enable or disable phy loopback. it also add a generic genphy_loopback function, which use BMCR loopback bit to enable or disable loopback. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/phy/mar

[PATCH NET V7 2/2] net: hns: Use phy_driver to setup Phy loopback

2017-06-28 Thread Lin Yun Sheng
Use function set_loopback in phy_driver to setup phy loopback when doing ethtool self test. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns/hnae.h| 1 + drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 105 --- 2

[PATCH NET V7 0/2] Add loopback support in phy_driver and hns ethtool fix

2017-06-28 Thread Lin Yun Sheng
: 1. Add phy_loopback in phy_device.c. 2. Do error checking and do the read and write once in genphy_loopback. 3. Remove gen10g_loopback in phy_device.c. Patch V1: Initial Submit Lin Yun Sheng (2): net: phy: Add phy loopback support in net phy framework

[PATCH NET V6 1/2] net: phy: Add phy loopback support in net phy framework

2017-06-27 Thread Lin Yun Sheng
This patch add set_loopback in phy_driver, which is used by Mac driver to enable or disable a phy. it also add a generic genphy_loopback function, which use BMCR loopback bit to enable or disable a phy. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/phy/marvell.c

[PATCH NET V6 2/2] net: hns: Use phy_driver to setup Phy loopback

2017-06-27 Thread Lin Yun Sheng
Use function set_loopback in phy_driver to setup phy loopback when doing ethtool self test. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns/hnae.h| 1 + drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 102 +++ 2

[PATCH NET V6 0/2] Add loopback support in phy_driver and hns ethtool fix

2017-06-27 Thread Lin Yun Sheng
. 3. Remove gen10g_loopback in phy_device.c. Patch V1: Initial Submit Lin Yun Sheng (2): net: phy: Add phy loopback support in net phy framework net: hns: Use phy_driver to setup Phy loopback drivers/net/ethernet/hisilicon/hns/hnae.h| 1 + drivers/net/ethernet

[PATCH NET V5 2/2] net: hns: Use phy_driver to setup Phy loopback

2017-06-25 Thread Lin Yun Sheng
Use function set_loopback in phy_driver to setup phy loopback when doing ethtool self test. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns/hnae.h| 1 + drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 92 +++- 2

[PATCH NET V5 1/2] net: phy: Add phy loopback support in net phy framework

2017-06-25 Thread Lin Yun Sheng
This patch add set_loopback in phy_driver, which is used by Mac driver to enable or disable a phy. it also add a generic genphy_loopback function, which use BMCR loopback bit to enable or disable a phy. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/phy/marvell.c

[PATCH NET V5 0/2] Add loopback support in phy_driver and hns ethtool fix

2017-06-25 Thread Lin Yun Sheng
. Patch V1: Initial Submit Lin Yun Sheng (2): net: phy: Add phy loopback support in net phy framework net: hns: Use phy_driver to setup Phy loopback drivers/net/ethernet/hisilicon/hns/hnae.h| 1 + drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 92

[PATCH NET V4 2/2] net: hns: Use phy_driver to setup Phy loopback

2017-06-24 Thread Lin Yun Sheng
Use function set_loopback in phy_driver to setup phy loopback when doing ethtool self test. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns/hnae.h| 1 + drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 92 +++- 2

[PATCH NET V4 1/2] net: phy: Add phy loopback support in net phy framework

2017-06-24 Thread Lin Yun Sheng
This patch add set_loopback in phy_driver, which is used by Mac driver to enable or disable a phy. it also add a generic genphy_loopback function, which use BMCR loopback bit to enable or disable a phy. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/phy/marvell.c

[PATCH NET V4 0/2] Add loopback support in phy_driver and hns ethtool fix

2017-06-24 Thread Lin Yun Sheng
and disable in pair in hns mac driver. Patch V2: 1. Add phy_loopback in phy_device.c. 2. Do error checking and do the read and write once in genphy_loopback. 3. Remove gen10g_loopback in phy_device.c. Patch V1: Initial Submit Lin Yun Sheng (2): net: phy: Add phy

[PATCH NET v3 2/2] net: hns: Use phy_driver to setup Phy loopback

2017-06-23 Thread Lin Yun Sheng
Use function set_loopback in phy_driver to setup phy loopback when doing ethtool self test. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns/hnae.h| 1 + drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 82 +++- 2

[PATCH NET v3 1/2] net: phy: Add phy loopback support in net phy framework

2017-06-23 Thread Lin Yun Sheng
This patch add set_loopback in phy_driver, which is used by Mac driver to enable or disable a phy. it also add a generic genphy_loopback function, which use BMCR loopback bit to enable or disable a phy. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/phy/marvell.c

[PATCH NET v3 0/2] Add loopback support in phy_driver and hns ethtool fix

2017-06-23 Thread Lin Yun Sheng
and write once in genphy_loopback. 3. Remove gen10g_loopback in phy_device.c. Patch V1: Initial Submit Lin Yun Sheng (2): net: phy: Add phy loopback support in net phy framework net: hns: Use phy_driver to setup Phy loopback drivers/net/ethernet/hisilicon/hns/hnae.h| 1

[PATCH NET v2 2/2] net: hns: Use phy_driver to setup Phy loopback

2017-06-23 Thread Lin Yun Sheng
Use function set_loopback in phy_driver to setup phy loopback when doing ethtool self test. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 68 +--- 1 file changed, 14 insertions(+), 54 deletions(-) diff

[PATCH NET v2 1/2] net: phy: Add phy loopback support in net phy framework

2017-06-23 Thread Lin Yun Sheng
This patch add set_loopback in phy_driver, which is used by Mac driver to enable or disable a phy. it also add a generic genphy_loopback function, which use BMCR loopback bit to enable or disable a phy. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/phy/marvell.c

[PATCH NET v2 0/2] Add loopback support in phy_driver and hns ethtool fix

2017-06-23 Thread Lin Yun Sheng
. Patch V1: Initial Submit Lin Yun Sheng (2): net: phy: Add phy loopback support in net phy framework net: hns: Use phy_driver to setup Phy loopback drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 68 +--- drivers/net/phy/marvell.c| 1 + drivers

[PATCH NET 0/2] Add loopback support in phy_driver and hns ethtool fix

2017-06-22 Thread Lin Yun Sheng
This Patch Set add set_loopback in phy_driver and use it to setup loopback when doing ethtool phy self_test. Lin Yun Sheng (2): net: phy: Add phy loopback support in net phy framework net: hns: Use phy_driver to setup Phy loopback drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 64

[PATCH NET 1/2] net: phy: Add phy loopback support in net phy framework

2017-06-22 Thread Lin Yun Sheng
This patch add set_loopback in phy_driver, which is used by Mac driver to enable or disable a phy. it also add a generic genphy_loopback function, which use BMCR loopback bit to enable or disable a phy. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/phy/marvell.c

[PATCH NET 2/2] net: hns: Use phy_driver to setup Phy loopback

2017-06-22 Thread Lin Yun Sheng
Use function set_loopback in phy_driver to setup phy loopback when doing ethtool self test. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 64 1 file changed, 10 insertions(+), 54 deletions(-) diff

[PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-16 Thread Lin Yun Sheng
This patch fixes the phy loopback self_test failed issue. when Marvell Phy Module is loaded, it will powerdown fiber when doing phy loopback self test, which cause phy loopback self_test fail. Signed-off-by: Lin Yun Sheng <linyunsh...@huawei.com> --- drivers/net/ethernet/hisilic