Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1bc261fa authored by Jamie Lentin's avatar Jamie Lentin Committed by David S. Miller
Browse files

net: mv88e6xxx: Fix ingress rate removal for mv6131 chips



The PORT_RATE_CONTROL register works differently on 88e6095/6095f/6131
in comparison to 6123/61/65, and 0x0 disables. The distinction was lost
Linux 4.1 --> 4.2

Signed-off-by: default avatarJamie Lentin <jm@lentin.co.uk>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f64f1482
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -2656,15 +2656,19 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)
			return ret;
	}

	/* Rate Control: disable ingress rate limiting. */
	if (mv88e6xxx_6352_family(chip) || mv88e6xxx_6351_family(chip) ||
	    mv88e6xxx_6165_family(chip) || mv88e6xxx_6097_family(chip) ||
	    mv88e6xxx_6185_family(chip) || mv88e6xxx_6095_family(chip) ||
	    mv88e6xxx_6320_family(chip)) {
		/* Rate Control: disable ingress rate limiting. */
		ret = _mv88e6xxx_reg_write(chip, REG_PORT(port),
					   PORT_RATE_CONTROL, 0x0001);
		if (ret)
			return ret;
	} else if (mv88e6xxx_6185_family(chip) || mv88e6xxx_6095_family(chip)) {
		ret = _mv88e6xxx_reg_write(chip, REG_PORT(port),
					   PORT_RATE_CONTROL, 0x0000);
		if (ret)
			return ret;
	}

	/* Port Control 1: disable trunking, disable sending