net: dsa: mv88e6xxx: Only allow LAG offload on supported hardware
authorTobias Waldekranz <tobias@waldekranz.com>
Fri, 15 Jan 2021 12:52:59 +0000 (13:52 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 16 Jan 2021 00:08:51 +0000 (16:08 -0800)
commitb80dc51b72e29318e02baace1e3c4cfe6e772904
tree3576d4686b95e9b42c4b063d24ed82eb839c48f3
parentd38001d30d47051eec265d68378abca7f5109e97
net: dsa: mv88e6xxx: Only allow LAG offload on supported hardware

There are chips that do have Global 2 registers, and therefore trunk
mapping/mask tables are not available. Refuse the offload as early as
possible on those devices.

Fixes: 57e661aae6a8 ("net: dsa: mv88e6xxx: Link aggregation support")
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h