mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
net: dsa: b53: prevent SWITCH_CTRL access on BCM5325
BCM5325 doesn't implement SWITCH_CTRL register so we should avoid reading or writing it. Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Link: https://patch.msgid.link/20250614080000.1884236-8-noltari@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
9b6c767c31
commit
22ccaaca43
|
|
@ -361,11 +361,12 @@ static void b53_set_forwarding(struct b53_device *dev, int enable)
|
|||
|
||||
b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, mgmt);
|
||||
|
||||
/* Include IMP port in dumb forwarding mode
|
||||
*/
|
||||
b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, &mgmt);
|
||||
mgmt |= B53_MII_DUMB_FWDG_EN;
|
||||
b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, mgmt);
|
||||
if (!is5325(dev)) {
|
||||
/* Include IMP port in dumb forwarding mode */
|
||||
b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, &mgmt);
|
||||
mgmt |= B53_MII_DUMB_FWDG_EN;
|
||||
b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, mgmt);
|
||||
}
|
||||
|
||||
/* Look at B53_UC_FWD_EN and B53_MC_FWD_EN to decide whether
|
||||
* frames should be flooded or not.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user