[OpenWrt-Devel] [PATCH] b53: reverse duplex bit meaning for IMP state override register

Jonas Gorski jogo at openwrt.org
Wed Mar 18 06:29:54 EDT 2015


On Wed, Mar 18, 2015 at 8:52 AM, Alexandru Ardelean
<ardeleanalex at gmail.com> wrote:
> On Wed, Mar 18, 2015 at 9:18 AM, Rafał Miłecki <zajec5 at gmail.com> wrote:
>>
>> Signed-off-by: Rafał Miłecki <zajec5 at gmail.com>
>> ---
>> When reading bcmrobo.c code for BCM5301X I've noticed that it uses
>> REG_CTRL_MIIPO (0x0e) with a following comment:
>> /* default(1 << 1) DUPLX_MODE:
>>  * Full Duplex
>>  */
>> So I guess our bit definition may be reversed. Can someone verify this?
>> ---
>>  target/linux/generic/files/drivers/net/phy/b53/b53_regs.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_regs.h
>> b/target/linux/generic/files/drivers/net/phy/b53/b53_regs.h
>> index ba50915..4899cc4 100644
>> --- a/target/linux/generic/files/drivers/net/phy/b53/b53_regs.h
>> +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_regs.h
>> @@ -75,7 +75,7 @@
>>  /* IMP Port state override register (8 bit) */
>>  #define B53_PORT_OVERRIDE_CTRL         0x0e
>>  #define   PORT_OVERRIDE_LINK           BIT(0)
>> -#define   PORT_OVERRIDE_HALF_DUPLEX    BIT(1) /* 0 = Full Duplex */
>> +#define   PORT_OVERRIDE_FULL_DUPLEX    BIT(1) /* 0 = Half Duplex */
>>  #define   PORT_OVERRIDE_SPEED_S                2
>>  #define   PORT_OVERRIDE_SPEED_10M      (0 << PORT_OVERRIDE_SPEED_S)
>>  #define   PORT_OVERRIDE_SPEED_100M     (1 << PORT_OVERRIDE_SPEED_S)
>> --
>
>
> I can validate that this fix is correct on my BCM53128.

Yeah, I can too, whatever I was drinking at this time %)


Jonas.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list