[PATCH v5] net: stmmac: fix maxmtu assignment to be within valid range

2017-01-06 Thread Kweh, Hock Leong
From: "Kweh, Hock Leong" There is no checking valid value of maxmtu when getting it from device tree. This resolution added the checking condition to ensure the assignment is made within a valid range. Signed-off-by: Kweh, Hock Leong --- changelog v5: * revert back that plat->

RE: [PATCH v3] net: stmmac: fix maxmtu assignment to be within valid range

2017-01-06 Thread Kweh, Hock Leong
> -Original Message- > From: Andy Shevchenko [mailto:andy.shevche...@gmail.com] > Sent: Saturday, January 07, 2017 8:07 AM > To: Kweh, Hock Leong > Cc: David S. Miller ; Joao Pinto > ; Giuseppe CAVALLARO ; > seraphin.bonna...@st.com; Jarod Wilson ; Alexandre > T

RE: [PATCH v4] net: stmmac: fix maxmtu assignment to be within valid range

2017-01-06 Thread Kweh, Hock Leong
> -Original Message- > From: Andy Shevchenko [mailto:andy.shevche...@gmail.com] > Sent: Saturday, January 07, 2017 8:12 AM > To: Kweh, Hock Leong > Cc: David S. Miller ; Joao Pinto > ; Giuseppe CAVALLARO ; > seraphin.bonna...@st.com; Jarod Wilson ; Alexandre > T

[PATCH v4] net: stmmac: fix maxmtu assignment to be within valid range

2017-01-06 Thread Kweh, Hock Leong
From: "Kweh, Hock Leong" There is no checking valid value of maxmtu when getting it from device tree. This resolution added the checking condition to ensure the assignment is made within a valid range. Signed-off-by: Kweh, Hock Leong --- changelog v4: * add print warning message w

RE: [PATCH v3] net: stmmac: fix maxmtu assignment to be within valid range

2017-01-06 Thread Kweh, Hock Leong
> -Original Message- > From: Andy Shevchenko [mailto:andy.shevche...@gmail.com] > Sent: Saturday, January 07, 2017 1:07 AM > To: Kweh, Hock Leong > Cc: David S. Miller ; Joao Pinto > ; Giuseppe CAVALLARO ; > seraphin.bonna...@st.com; Jarod Wilson ; Alexandre > T

RE: [PATCH v3] net: stmmac: fix maxmtu assignment to be within valid range

2017-01-06 Thread Kweh, Hock Leong
> -Original Message- > From: Joao Pinto [mailto:joao.pi...@synopsys.com] > Sent: Saturday, January 07, 2017 12:58 AM > To: Kweh, Hock Leong ; David S. Miller > ; Joao Pinto ; Giuseppe > CAVALLARO ; seraphin.bonna...@st.com; Jarod > Wilson ; Andy Shevchenko > Cc: Al

[PATCH v3] net: stmmac: fix maxmtu assignment to be within valid range

2017-01-06 Thread Kweh, Hock Leong
From: "Kweh, Hock Leong" There is no checking valid value of maxmtu when getting it from device tree. This resolution added the checking condition to ensure the assignment is made within a valid range. Signed-off-by: Kweh, Hock Leong --- changelog v3: * print the warning message only

RE: [PATCH v2] net: stmmac: fix maxmtu assignment to be within valid range

2017-01-06 Thread Kweh, Hock Leong
> -Original Message- > From: Kweh, Hock Leong > Sent: Friday, January 06, 2017 6:08 PM > To: David S. Miller ; Joao Pinto > ; Giuseppe CAVALLARO ; > seraphin.bonna...@st.com; Jarod Wilson ; Andy > Shevchenko > Cc: Alexandre TORGUE ; Joachim Eastwood > ; Niklas C

[PATCH v2] net: stmmac: fix maxmtu assignment to be within valid range

2017-01-05 Thread Kweh, Hock Leong
From: "Kweh, Hock Leong" There is no checking valid value of maxmtu when getting it from device tree. This resolution added the checking condition to ensure the assignment is made within a valid range. Signed-off-by: Kweh, Hock Leong --- drivers/net/ethernet/stmicro/stmmac/stm

RE: [PATCH] net: stmmac: fix maxmtu assignment to be within valid range

2017-01-05 Thread Kweh, Hock Leong
> -Original Message- > From: Andy Shevchenko [mailto:andy.shevche...@gmail.com] > Sent: Friday, January 06, 2017 5:07 AM > To: Kweh, Hock Leong > Cc: David S. Miller ; Joao Pinto > ; Giuseppe CAVALLARO ; > seraphin.bonna...@st.com; Jarod Wilson ; Alexandre > T

[PATCH] net: stmmac: fix maxmtu assignment to be within valid range

2017-01-04 Thread Kweh, Hock Leong
From: "Kweh, Hock Leong" There is no checking valid value of maxmtu when getting it from devicetree. This resolution added the checking condition to ensure the assignment is made within a valid range. Signed-off-by: Kweh, Hock Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac_mai

RE: [PATCH] stmmac: Enable Clause 45 PHYs in GMAC4 (eQOS)

2017-01-04 Thread Kweh, Hock Leong
> -Original Message- > From: Joao Pinto [mailto:joao.pi...@synopsys.com] > Sent: Wednesday, January 04, 2017 10:36 PM > To: da...@davemloft.net > Cc: Kweh, Hock Leong ; netdev@vger.kernel.org; > Joao Pinto > Subject: [PATCH] stmmac: Enable Clause 45 PHYs in GMAC4 (e

RE: [PATCH net] net: stmmac: Fix error path after register_netdev move

2016-12-29 Thread Kweh, Hock Leong
ice. > > Fixes: 5701659004d6 ("net: stmmac: Fix race between stmmac_drv_probe and > stmmac_open") > Signed-off-by: Florian Fainelli > --- Acked-by: Kweh, Hock Leong > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 9 - > 1 file changed, 8 insertions(+), 1 del

RE: [PATCH v2] net: stmmac: bug fix to synchronize stmmac_open and stmmac_dvr_probe

2016-12-28 Thread Kweh, Hock Leong
> -Original Message- > From: Florian Fainelli [mailto:f.faine...@gmail.com] > Sent: Thursday, December 29, 2016 2:43 AM > To: Kweh, Hock Leong ; David Miller > > Cc: joao.pi...@synopsys.com; peppe.cavall...@st.com; > seraphin.bonna...@st.com; alexandre.tor.

RE: [PATCH v2] net: stmmac: bug fix to synchronize stmmac_open and stmmac_dvr_probe

2016-12-28 Thread Kweh, Hock Leong
> -Original Message- > From: Kishan Sandeep [mailto:sandeepkishan...@gmail.com] > Sent: Wednesday, December 28, 2016 7:56 PM > To: Kweh, Hock Leong > Cc: David Miller ; f.faine...@gmail.com; > joao.pi...@synopsys.com; peppe.cavall...@st.com; > seraphin.bonna...@

RE: [PATCH v2] net: stmmac: bug fix to synchronize stmmac_open and stmmac_dvr_probe

2016-12-27 Thread Kweh, Hock Leong
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Wednesday, December 28, 2016 12:34 AM > To: Kweh, Hock Leong > Cc: joao.pi...@synopsys.com; peppe.cavall...@st.com; > seraphin.bonna...@st.com; f.faine...@gmail.com; > alexandre.to

RE: [PATCH v2] net: stmmac: bug fix to synchronize stmmac_open and stmmac_dvr_probe

2016-12-27 Thread Kweh, Hock Leong
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Wednesday, December 28, 2016 12:34 AM > To: Kweh, Hock Leong > Cc: joao.pi...@synopsys.com; peppe.cavall...@st.com; > seraphin.bonna...@st.com; f.faine...@gmail.com; > alexandre.to

[PATCH] net: stmmac: fix incorrect bit set in gmac4 mdio addr register

2016-12-27 Thread Kweh, Hock Leong
From: "Kweh, Hock Leong" Fixing the gmac4 mdio write access to use MII_GMAC4_WRITE only instead of OR together with MII_WRITE. Signed-off-by: Kweh, Hock Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) di

RE: [PATCH] net: stmmac: synchronize stmmac_open and stmmac_dvr_probe

2016-12-26 Thread Kweh, Hock Leong
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Tuesday, December 27, 2016 12:55 PM > To: Kweh, Hock Leong > Cc: joao.pi...@synopsys.com; peppe.cavall...@st.com; > seraphin.bonna...@st.com; alexandre.tor...@gmail.com; > manab...@

RE: [PATCH] net: stmmac: synchronize stmmac_open and stmmac_dvr_probe

2016-12-26 Thread Kweh, Hock Leong
> -Original Message- > From: Florian Fainelli [mailto:f.faine...@gmail.com] > Sent: Tuesday, December 27, 2016 1:14 PM > To: Kweh, Hock Leong ; David S. Miller > ; Joao Pinto ; Giuseppe > CAVALLARO ; seraphin.bonna...@st.com > Cc: Alexandre TORGUE ; Joachim Eastw

[PATCH] net: stmmac: synchronize stmmac_open and stmmac_dvr_probe

2016-12-26 Thread Kweh, Hock Leong
From: "Kweh, Hock Leong" If kernel module stmmac driver being loaded after OS booted, there is a race condition between stmmac_open() and stmmac_mdio_register(), which is invoked inside stmmac_dvr_probe(), and the error is showed in dmesg log as PHY not found and stmmac_ope