On 09/12/2013 01:23 PM, Rafał Miłecki wrote:
> Network on BCM5357* devices isn't working since ever. It seems there
> is some problem with bgmac I don't understand.
>
> First of all, when using interface without VLAN enabled and without
> bridging it - no packets appear. That can be easily workarounded with
> "ifconfig eth0 promisc". Then I can see packets appearing, however
> they don't have a valid MAC addresses in src/dest fields.
>
> I decided to dump packets in bgmac driver, that allow me to include
> Broadcom's extra RX header.
>
> Does it give any hint for anyone? Do you have any idea what can be wrong?
>
Hi,
the switch in the BCM5357 needs a special configuration. Does your SoC
have the chipid 0x5356? Then the robo core rev is 3.
This is part of the robo switch driver:
if (robo->corerev < 3) {
val32 |= ((1 << 20) | /* valid write */
((vid >> 4) << 12)); /* vlan id bit[11:4] */
} else {
val32 |= ((1 << 24) | /* valid write */
(vid << 12)); /* vlan id bit[11:4] */
}
Could you try the attached patch on your device.
Hauke
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
index 7ff4624..001acfa 100644
--- a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
+++ b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
@@ -189,7 +189,7 @@ static void b53_set_vlan_entry(struct b53_device *dev, u16 vid, u16 members,
u32 entry = 0;
if (members)
- entry = (untag << VA_UNTAG_S) | members | VA_VALID_25;
+ entry = (untag << VA_UNTAG_S) | members | VA_VALID_25_R4;
b53_write32(dev, B53_VLAN_PAGE, B53_VLAN_WRITE_25, entry);
b53_write16(dev, B53_VLAN_PAGE, B53_VLAN_TABLE_ACCESS_25, vid |
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel