diff options
author | Andrew Lunn <andrew@lunn.ch> | 2016-12-03 04:45:20 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-03 23:18:39 -0500 |
commit | 3ce0e65eb6059d3d4e56bbb17aee34f2740844be (patch) | |
tree | 02e5db05670f241cae197d0a98afac0f29d08961 /drivers/net/dsa/mv88e6xxx/port.c | |
parent | b35d322a1d9330597754d5e8d5f76932fad79c1a (diff) |
net: dsa: mv88e6xxx: Implement mv88e6390 pause control
The mv88e6390 has a number flow control registers accessed via the
Flow Control register. Use these to set the pause control.
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 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c index 8d14833b2e49..0db7fa0373ae 100644 --- a/drivers/net/dsa/mv88e6xxx/port.c +++ b/drivers/net/dsa/mv88e6xxx/port.c @@ -315,6 +315,19 @@ int mv88e6097_port_pause_config(struct mv88e6xxx_chip *chip, int port) return mv88e6xxx_port_write(chip, port, PORT_PAUSE_CTRL, 0x0000); } +int mv88e6390_port_pause_config(struct mv88e6xxx_chip *chip, int port) +{ + int err; + + err = mv88e6xxx_port_write(chip, port, PORT_PAUSE_CTRL, + PORT_FLOW_CTRL_LIMIT_IN | 0); + if (err) + return err; + + return mv88e6xxx_port_write(chip, port, PORT_PAUSE_CTRL, + PORT_FLOW_CTRL_LIMIT_OUT | 0); +} + /* Offset 0x04: Port Control Register */ static const char * const mv88e6xxx_port_state_names[] = { |