OSDN Git Service

net: dsa: mv88e6xxx: rework pause limit operation
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Thu, 8 Jun 2017 22:34:12 +0000 (18:34 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Jun 2017 16:10:59 +0000 (12:10 -0400)
commit0898432cc296cc27cee6647f6748f2add37e09b6
tree3f96064c1f71b9fd0b0e93f77eecd024a4c243ec
parentfa8d117960809879f949fb9768d78e0518c4964e
net: dsa: mv88e6xxx: rework pause limit operation

All Marvell chips supporting Pause frames limiting use 1-byte value for
input and output.

Old chips have both bytes adjacent in a 16-bit register. New ones have
an indirect table using 8-bit data.

The mv88e6xxx library functions (such as in port.c) must not contain
driver logic, but only generic helpers. This patch changes the
port_pause_config operation for port_pause_limit taking two u8 arguments
for input and output limits. There is no functional changes.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h
drivers/net/dsa/mv88e6xxx/port.c
drivers/net/dsa/mv88e6xxx/port.h