]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'mlxsw-line-card-status-tracking'
authorDavid S. Miller <davem@davemloft.net>
Wed, 20 Apr 2022 14:03:22 +0000 (15:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Apr 2022 14:03:22 +0000 (15:03 +0100)
commit365014f5c39422fa7ccd75b36235155d9041f883
treefc1c0a245fe977c7e0087f682306ac72c7f5ae16
parent85ef87ba9bc282cef441f75d90e2f52f624221ef
parent99a03b3193f628a525ee0191e60418af6960004b
Merge branch 'mlxsw-line-card-status-tracking'

Ido Schimmel says:

====================
mlxsw: Line cards status tracking

When a line card is provisioned, netdevs corresponding to the ports
found on the line card are registered. User space can then perform
various logical configurations (e.g., splitting, setting MTU) on these
netdevs.

However, since the line card is not present / powered on (i.e., it is
not in 'active' state), user space cannot access the various components
found on the line card. For example, user space cannot read the
temperature of gearboxes or transceiver modules found on the line card
via hwmon / thermal. Similarly, it cannot dump the EEPROM contents of
these transceiver modules. The above is only possible when the line card
becomes active.

This patchset solves the problem by tracking the status of each line
card and invoking callbacks from interested parties when a line card
becomes active / inactive.

Patchset overview:

Patch #1 adds the infrastructure in the line cards core that allows
users to registers a set of callbacks that are invoked when a line card
becomes active / inactive. To avoid races, if a line card is already
active during registration, the got_active() callback is invoked.

Patches #2-#3 are preparations.

Patch #4 changes the port module core to register a set of callbacks
with the line cards core. See detailed description with examples in the
commit message.

Patches #5-#6 do the same with regards to thermal / hwmon support, so
that user space will be able to monitor the temperature of various
components on the line card when it becomes active.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>