diff options
author | Andrew Lunn <andrew@lunn.ch> | 2016-12-03 04:45:19 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-04 05:18:39 +0100 |
commit | b35d322a1d9330597754d5e8d5f76932fad79c1a (patch) | |
tree | aa7080ef401dc324ff8220ed69fd38891dac284b /drivers/net/dsa/mv88e6xxx/port.c | |
parent | net: dsa: mv88e6xxx: Refactor egress rate limiting (diff) | |
download | linux-b35d322a1d9330597754d5e8d5f76932fad79c1a.tar.xz linux-b35d322a1d9330597754d5e8d5f76932fad79c1a.zip |
net: dsa: mv88e6xxx: Refactor pause configuration
The mv88e6390 has a different mechanism for configuring pause.
Refactor the code into an ops function, and for the moment, don't add
any mv88e6390 code yet.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/port.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/port.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c index d22c7b0e0f76..8d14833b2e49 100644 --- a/drivers/net/dsa/mv88e6xxx/port.c +++ b/drivers/net/dsa/mv88e6xxx/port.c @@ -304,6 +304,17 @@ int mv88e6390x_port_set_speed(struct mv88e6xxx_chip *chip, int port, int speed) return mv88e6xxx_port_set_speed(chip, port, speed, true, true); } +/* Offset 0x02: Pause Control + * + * Do not limit the period of time that this port can be paused for by + * the remote end or the period of time that this port can pause the + * remote end. + */ +int mv88e6097_port_pause_config(struct mv88e6xxx_chip *chip, int port) +{ + return mv88e6xxx_port_write(chip, port, PORT_PAUSE_CTRL, 0x0000); +} + /* Offset 0x04: Port Control Register */ static const char * const mv88e6xxx_port_state_names[] = { |