diff mbox

[U-Boot] net: phy: Set SUPPORTED_1000baseX_Half flag in ESTATUS_1000_XHALF case

Message ID 1374238894-24906-1-git-send-email-festevam@gmail.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Fabio Estevam July 19, 2013, 1:01 p.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com>

Commit de1d786e (add support for Xilinx 1000BASE-X phy (GTX)) introduced the 
checking for ESTATUS_1000_XHALF, but it incorrectly sets the 
SUPPORTED_1000baseX_Full flag in this case.

Set the SUPPORTED_1000baseX_Half flag instead. 

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/net/phy/phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Charles Coldwell July 19, 2013, 1:59 p.m. UTC | #1
On Fri, Jul 19, 2013 at 9:01 AM, Fabio Estevam <festevam@gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Commit de1d786e (add support for Xilinx 1000BASE-X phy (GTX)) introduced the
> checking for ESTATUS_1000_XHALF, but it incorrectly sets the
> SUPPORTED_1000baseX_Full flag in this case.

Signed-off-by: Charles Coldwell <coldwell@gmail.com>

--
Charles M. Coldwell, W1CMC
Belmont, Massachusetts, New England
"Turn on, log in, tune out"
Fabio Estevam July 19, 2013, 2:01 p.m. UTC | #2
Hi Charles,

On Fri, Jul 19, 2013 at 10:59 AM, Charles Coldwell <coldwell@gmail.com> wrote:
> On Fri, Jul 19, 2013 at 9:01 AM, Fabio Estevam <festevam@gmail.com> wrote:
>> From: Fabio Estevam <fabio.estevam@freescale.com>
>>
>> Commit de1d786e (add support for Xilinx 1000BASE-X phy (GTX)) introduced the
>> checking for ESTATUS_1000_XHALF, but it incorrectly sets the
>> SUPPORTED_1000baseX_Full flag in this case.
>
> Signed-off-by: Charles Coldwell <coldwell@gmail.com>

I guess you meant Acked-by instead?
Charles Coldwell July 19, 2013, 2:02 p.m. UTC | #3
On Fri, Jul 19, 2013 at 10:01 AM, Fabio Estevam <festevam@gmail.com> wrote:
> Hi Charles,
>
> On Fri, Jul 19, 2013 at 10:59 AM, Charles Coldwell <coldwell@gmail.com> wrote:
>> On Fri, Jul 19, 2013 at 9:01 AM, Fabio Estevam <festevam@gmail.com> wrote:
>>> From: Fabio Estevam <fabio.estevam@freescale.com>
>>>
>>> Commit de1d786e (add support for Xilinx 1000BASE-X phy (GTX)) introduced the
>>> checking for ESTATUS_1000_XHALF, but it incorrectly sets the
>>> SUPPORTED_1000baseX_Full flag in this case.
>>
>> Signed-off-by: Charles Coldwell <coldwell@gmail.com>
>
> I guess you meant Acked-by instead?

Sigh.  Indeed, acked.  My LKML skills are rusty.


--
Charles M. Coldwell, W1CMC
Belmont, Massachusetts, New England
"Turn on, log in, tune out"
Sascha Silbe July 19, 2013, 3:50 p.m. UTC | #4
Fabio Estevam <festevam@gmail.com> writes:

> Commit de1d786e (add support for Xilinx 1000BASE-X phy (GTX)) introduced the 
> checking for ESTATUS_1000_XHALF, but it incorrectly sets the 
> SUPPORTED_1000baseX_Full flag in this case.
>
> Set the SUPPORTED_1000baseX_Half flag instead. 

Nice catch.

Reviewed-By: Sascha Silbe <t-uboot@infra-silbe.de>

No test done as my current test set-up is 100Base-T only.

Sascha
Tom Rini July 19, 2013, 4:55 p.m. UTC | #5
On Fri, Jul 19, 2013 at 10:01:34AM -0300, Fabio Estevam wrote:

> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Commit de1d786e (add support for Xilinx 1000BASE-X phy (GTX)) introduced the 
> checking for ESTATUS_1000_XHALF, but it incorrectly sets the 
> SUPPORTED_1000baseX_Full flag in this case.
> 
> Set the SUPPORTED_1000baseX_Half flag instead. 
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

So, do we need both patches to fix the problem?
Charles Coldwell July 19, 2013, 4:56 p.m. UTC | #6
On Fri, Jul 19, 2013 at 12:55 PM, Tom Rini <trini@ti.com> wrote:
> On Fri, Jul 19, 2013 at 10:01:34AM -0300, Fabio Estevam wrote:
>
>> From: Fabio Estevam <fabio.estevam@freescale.com>
>>
>> Commit de1d786e (add support for Xilinx 1000BASE-X phy (GTX)) introduced the
>> checking for ESTATUS_1000_XHALF, but it incorrectly sets the
>> SUPPORTED_1000baseX_Full flag in this case.
>>
>> Set the SUPPORTED_1000baseX_Half flag instead.
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>
> So, do we need both patches to fix the problem?

One patch fixes "the" problem; the other fixes another problem we
haven't seen yet (but will).



--
Charles M. Coldwell, W1CMC
Belmont, Massachusetts, New England
"Turn on, log in, tune out"
Joe Hershberger July 19, 2013, 6:15 p.m. UTC | #7
On Fri, Jul 19, 2013 at 8:01 AM, Fabio Estevam <festevam@gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Commit de1d786e (add support for Xilinx 1000BASE-X phy (GTX)) introduced the
> checking for ESTATUS_1000_XHALF, but it incorrectly sets the
> SUPPORTED_1000baseX_Full flag in this case.
>
> Set the SUPPORTED_1000baseX_Half flag instead.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Fabio Estevam July 19, 2013, 7:20 p.m. UTC | #8
Hi Tom,

On Fri, Jul 19, 2013 at 1:56 PM, Charles Coldwell <coldwell@gmail.com> wrote:
> On Fri, Jul 19, 2013 at 12:55 PM, Tom Rini <trini@ti.com> wrote:
>> On Fri, Jul 19, 2013 at 10:01:34AM -0300, Fabio Estevam wrote:
>>
>>> From: Fabio Estevam <fabio.estevam@freescale.com>
>>>
>>> Commit de1d786e (add support for Xilinx 1000BASE-X phy (GTX)) introduced the
>>> checking for ESTATUS_1000_XHALF, but it incorrectly sets the
>>> SUPPORTED_1000baseX_Full flag in this case.
>>>
>>> Set the SUPPORTED_1000baseX_Half flag instead.
>>>
>>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>>
>> So, do we need both patches to fix the problem?
>
> One patch fixes "the" problem; the other fixes another problem we
> haven't seen yet (but will).

I agree with Charles.

Sascha Silbe's patch fixes the regression we noticed on some mx6 boards.

This one is about a different issue and it is not related to the
previous problem.

IMHO we should apply both of them.

Thanks,

Fabio Estevam
Tom Rini July 19, 2013, 9:13 p.m. UTC | #9
On Fri, Jul 19, 2013 at 10:01:34AM -0300, Fabio Estevam wrote:

> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Commit de1d786e (add support for Xilinx 1000BASE-X phy (GTX)) introduced the 
> checking for ESTATUS_1000_XHALF, but it incorrectly sets the 
> SUPPORTED_1000baseX_Full flag in this case.
> 
> Set the SUPPORTED_1000baseX_Half flag instead. 
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 5ddb926..5692b1c 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -404,7 +404,7 @@  int genphy_config(struct phy_device *phydev)
 		if (val & ESTATUS_1000_XFULL)
 			features |= SUPPORTED_1000baseX_Full;
 		if (val & ESTATUS_1000_XHALF)
-			features |= SUPPORTED_1000baseX_Full;
+			features |= SUPPORTED_1000baseX_Half;
 	}
 
 	phydev->supported = features;