[U-Boot] ??: [PATCH v2] include/linux/mii.h: update for supporting GE

Dear Wolfgang,
/home/wd/git/u-boot/work/include/linux/mii.h:134:1: warning: "LPA_1000HALF" redefined In file included from uec_phy.c:26: uec_phy.h:35:1: warning: this is the location of the previous definition text data bss dec hex filename 327682 28828 230568 587078 8f546 /work/wd/tmp-ppc/u-boot
Moreover, after checking drivers/qe/uec_phy.h, I've found some definitions differs from standard linux code.
In uec_phy: drivers/qe/uec_phy.h:34:#define LPA_1000FULL 0x0400 drivers/qe/uec_phy.h:35:#define LPA_1000HALF 0x0200
In Linux: include/linux/mii.h:133:#define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */ include/linux/mii.h:134:#define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */
Do you know if this is a wrong defintion on uec_phy ? I'm afraid the fix will lead some mis-behavior for boards has uec_phy.
Best regards, Macpaul Lin

On Jan 21, 2011, at 1:31 AM, macpaul@andestech.com wrote:
Dear Wolfgang,
/home/wd/git/u-boot/work/include/linux/mii.h:134:1: warning: "LPA_1000HALF" redefined In file included from uec_phy.c:26: uec_phy.h:35:1: warning: this is the location of the previous definition text data bss dec hex filename 327682 28828 230568 587078 8f546 /work/wd/tmp-ppc/u-boot
Moreover, after checking drivers/qe/uec_phy.h, I've found some definitions differs from standard linux code.
In uec_phy: drivers/qe/uec_phy.h:34:#define LPA_1000FULL 0x0400 drivers/qe/uec_phy.h:35:#define LPA_1000HALF 0x0200
In Linux: include/linux/mii.h:133:#define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */ include/linux/mii.h:134:#define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */
Do you know if this is a wrong defintion on uec_phy ? I'm afraid the fix will lead some mis-behavior for boards has uec_phy.
See:
http://patchwork.ozlabs.org/patch/79439/
- k

Dear Kumar Gala,
In message 4E0178ED-1410-4CA6-B173-9DF8BCBC497A@kernel.crashing.org you wrote:
Do you know if this is a wrong defintion on uec_phy ? I'm afraid the fix will lead some mis-behavior for boards has uec_phy.
See:
Have you tested this patch on the affected boards? I'd be surprised if both the old and the new values would work?
Best regards,
Wolfgang Denk

On Jan 21, 2011, at 2:27 AM, Wolfgang Denk wrote:
Dear Kumar Gala,
In message 4E0178ED-1410-4CA6-B173-9DF8BCBC497A@kernel.crashing.org you wrote:
Do you know if this is a wrong defintion on uec_phy ? I'm afraid the fix will lead some mis-behavior for boards has uec_phy.
See:
Have you tested this patch on the affected boards? I'd be surprised if both the old and the new values would work?
I haven't, but I'll see if we have a system working with uec & 1G link.
- k

Dear Macpaul,
In message 50FD90C65C53FB45BADEEBCD84FF07F202CEB58B@ATCPCS06.andestech.com you wrote:
/home/wd/git/u-boot/work/include/linux/mii.h:134:1: warning: "LPA_1000HALF" redefined In file included from uec_phy.c:26: uec_phy.h:35:1: warning: this is the location of the previous definition text data bss dec hex filename 327682 28828 230568 587078 8f546 /work/wd/tmp-ppc/u-boot
Moreover, after checking drivers/qe/uec_phy.h, I've found some definitions differs from standard linux code.
In uec_phy: drivers/qe/uec_phy.h:34:#define LPA_1000FULL 0x0400 drivers/qe/uec_phy.h:35:#define LPA_1000HALF 0x0200
In Linux: include/linux/mii.h:133:#define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */ include/linux/mii.h:134:#define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */
Do you know if this is a wrong defintion on uec_phy ? I'm afraid the fix will lead some mis-behavior for boards has uec_phy.
These definitions were added by commit 91cdaa3a:
commit 91cdaa3a9d7562b869d96774e9c9ddf142c0848d Author: Anton Vorontsov avorontsov@ru.mvista.com Date: Mon Mar 24 20:46:24 2008 +0300
uec: add support for gbit mii status readings
Signed-off-by: Anton Vorontsov avorontsov@ru.mvista.com
Anton, can you please comment?
Best regards,
Wolfgang Denk

On Fri, Jan 21, 2011 at 09:23:12AM +0100, Wolfgang Denk wrote: [...]
In uec_phy: drivers/qe/uec_phy.h:34:#define LPA_1000FULL 0x0400 drivers/qe/uec_phy.h:35:#define LPA_1000HALF 0x0200
In Linux: include/linux/mii.h:133:#define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */ include/linux/mii.h:134:#define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */
Do you know if this is a wrong defintion on uec_phy ? I'm afraid the fix will lead some mis-behavior for boards has uec_phy.
These definitions were added by commit 91cdaa3a:
commit 91cdaa3a9d7562b869d96774e9c9ddf142c0848d Author: Anton Vorontsov avorontsov@ru.mvista.com Date: Mon Mar 24 20:46:24 2008 +0300
uec: add support for gbit mii status readings Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Anton, can you please comment?
I think that was just a shift-by-one mistake, Linux code is correct.
It seems that the only way to trigger this is to force half-duplex on a gigabit link (and u-boot will think that it's a full duplex link).
I believe it's safe to fix the wrong definition.
Thanks,
participants (4)
-
Anton Vorontsov
-
Kumar Gala
-
macpaul@andestech.com
-
Wolfgang Denk