[PATCH net-next] phy: make some bits preserved while setup forced mode

2016-04-14 Thread Weidong Wang
BMCR_PDOWN as well. Signed-off-by: Weidong Wang --- the patch is evoluted from "phy: keep the BCMR_LOOPBACK bit while setup forced mode". --- drivers/net/phy/phy_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/phy_device.c b/drive

Re: [RESEND PATCH net-next] phy: keep the BCMR_LOOPBACK bit while setup forced mode

2016-04-13 Thread Weidong Wang
On 2016/4/14 2:41, Florian Fainelli wrote: > On 13/04/16 04:59, Weidong Wang wrote: >> When tested the PHY SGMII Loopback,: >> 1.set the LOOPBACK bit, >> 2.set the autoneg to AUTONEG_DISABLE, it calls the >> genphy_setup_forced which will clear the bit. >> >&

Re: [RESEND PATCH net-next] phy: keep the BCMR_LOOPBACK bit while setup forced mode

2016-04-13 Thread Weidong Wang
On 2016/4/13 22:19, Sergei Shtylyov wrote: > Hello. > > On 4/13/2016 2:59 PM, Weidong Wang wrote: > >> When tested the PHY SGMII Loopback,: >> 1.set the LOOPBACK bit, >> 2.set the autoneg to AUTONEG_DISABLE, it calls the >> genphy_setup_forced which will c

[RESEND PATCH net-next] phy: keep the BCMR_LOOPBACK bit while setup forced mode

2016-04-13 Thread Weidong Wang
When tested the PHY SGMII Loopback,: 1.set the LOOPBACK bit, 2.set the autoneg to AUTONEG_DISABLE, it calls the genphy_setup_forced which will clear the bit. So just keep the LOOPBACK bit while setup forced mode. Signed-off-by: Weidong Wang --- drivers/net/phy/phy_device.c | 2 ++ 1 file

[PATCH net-next] phy: keep the BCMR_LOOPBACK bit while setup forced mode

2016-03-24 Thread Weidong Wang
When tested the PHY SGMII Loopback,: 1.set the LOOPBACK bit, 2.set the autoneg to AUTONEG_DISABLE, it calls the genphy_setup_forced which will clear the bit. So just keep the LOOPBACK bit while setup forced mode. Signed-off-by: Weidong Wang --- drivers/net/phy/phy_device.c | 2 ++ 1 file

Re: [PATCH net-next] netfilter: nf_conntrack: remove the unneed check for *bucket

2016-01-30 Thread Weidong Wang
On 2016/1/31 5:30, Florian Westphal wrote: > Weidong Wang wrote: >> In the 'for(...) {}', the *bucket alwasy < net->ct.htable_size, >> so remove the check >> @@ -1383,14 +1383,12 @@ get_next_corpse(struct net *net, int (*iter)(struct >> nf_

[PATCH net-next] netfilter: nf_conntrack: remove the unneed check for *bucket

2016-01-30 Thread Weidong Wang
In the 'for(...) {}', the *bucket alwasy < net->ct.htable_size, so remove the check Signed-off-by: Weidong Wang --- net/netfilter/nf_conntrack_core.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/net/netfilter/nf_conntrack_core.c

[PATCH net-next] BNX2: free temp_stats_blk on error path

2015-10-12 Thread Weidong Wang
In bnx2_init_board, missing free temp_stats_blk on error path when some operations do failed. Just add the 'kfree' operation. Signed-off-by: Wang Weidong --- drivers/net/ethernet/broadcom/bnx2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers

[PATCH net-next v3] BNX2: fix a Null Pointer for stats_blk

2015-10-08 Thread Weidong Wang
we have two processes to do: P1#: ifconfig eth0 down; which will call bnx2_close, then will , and set Null to stats_blk P2#: ifconfig eth0; which will call bnx2_get_stats64, it will use stats_blk. In one case: --P1#-- --P2#-- stats_blk(no null)

[PATCH net-next v2 RESEND] BNX2: fix a Null Pointer for stats_blk

2015-09-28 Thread Weidong Wang
) bnx2_free_mem ->bp->stats_blk = NULL GET_64BIT_NET_STATS then it will cause 'NULL Pointer' Problem. it is as well with 'ethtool -S ethx'. Allocate the statistics block at probe time so that this problem is impossible Signed-off-by: W

Re: [PATCH net-next v2] BNX2: fix a Null Pointer for stats_blk

2015-09-28 Thread Weidong Wang
On 2015/9/28 15:01, Weidong Wang wrote: > we have two processes to do: > P1#: ifconfig eth0 down; which will call bnx2_close, then will > , and set Null to stats_blk > P2#: ifconfig eth0; which will call bnx2_get_stats64, it will > use stats_blk. > In one case: > --P1#--

[PATCH net-next v2] BNX2: fix a Null Pointer for stats_blk

2015-09-28 Thread Weidong Wang
we have two processes to do: P1#: ifconfig eth0 down; which will call bnx2_close, then will , and set Null to stats_blk P2#: ifconfig eth0; which will call bnx2_get_stats64, it will use stats_blk. In one case: --P1#-- --P2#-- stats_blk(no null)

Re: [PATCH net-next] BNX2: fix a Null Pointer for stats_blk

2015-09-23 Thread Weidong Wang
On 2015/9/24 13:34, David Miller wrote: > From: Weidong Wang > Date: Thu, 24 Sep 2015 10:00:45 +0800 > >> It does affect the intention. Although, the problem exists then makes the >> system panic within some case. >> >> Do you have any idea about it? > >

Re: [PATCH net-next] BNX2: fix a Null Pointer for stats_blk

2015-09-23 Thread Weidong Wang
On 2015/9/24 6:31, David Miller wrote: > From: Weidong Wang > Date: Tue, 22 Sep 2015 20:42:40 +0800 > >> @@ -880,6 +882,7 @@ bnx2_alloc_mem(struct bnx2 *bp) >> } >> } >> >> +spin_lock(&bp->stats64_lock); >> bp->

[PATCH net-next] BNX2: fix a Null Pointer for stats_blk

2015-09-22 Thread Weidong Wang
we have two processes to do: P1#: ifconfig eth0 down; which will call bnx2_close, then will , and set Null to stats_blk P2#: ifconfig eth0; which will call bnx2_get_stats64, it will use stats_blk. In one case: --P1#-- --P2#-- stats_blk(no null)