]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: sja1105: allow the TTEthernet configuration in the static config for SJA1110
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 18 Jun 2021 13:44:00 +0000 (16:44 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Jun 2021 19:26:17 +0000 (12:26 -0700)
commit5dccb19f7101f223c48c3aba86f9a0d80e1a0bb9
treebe897da5f6d4722a51ee31476852097ebb4b1af8
parent3c6cf692d2683572a9e0ece7aa399ee7831eba78
net: dsa: sja1105: allow the TTEthernet configuration in the static config for SJA1110

Currently sja1105_static_config_check_valid() is coded up to detect
whether TTEthernet is supported based on device ID, and this check was
not updated to cover SJA1110.

However, it is desirable to have as few checks for the device ID as
possible, so the driver core is more generic. So what we can do is look
at the static config table operations implemented by that specific
switch family (populated by sja1105_static_config_init) whether the
schedule table has a non-zero maximum entry count (meaning that it is
supported) or not.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/sja1105/sja1105_static_config.c