Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hw-mgmt: kernel patches: 4.19: mlxsw: minimal: Add support for line c…
…ard event handling Extend "minimal" driver with interrupt handler to support line card initialization and de-initialization events. It provides support for Nvidia modular Ethernet switch system, which is equipped with Spectrum-3 chip and with programmable devices with logic providing system control. It could be also relevant for the vendors which build its own system, equipped with Nvidia Spectrum-3 chip and with programmable device or devices implementing the same logic. This logic includes interrupt controller for line card related events. Whenever any event is happened, the relevant signal is raised to CPU. These events are associated with a number of line card states, like line card insertion and removing, security validation, powering on and off, enabling (release from reset) and disabling (hold in reset), firmware active and inactive. The final event in initialization flow is firmware active. And it indicates that firmware is fully prepared for line card ports handling. When "active event" is received for particular line card, its network, hardware monitoring and thermal interfaces should be configured according to the configuration obtained from the firmware. When opposite "inactive event" is received all the above interfaces should be teared down. It is important to note that there are two different flows for line card configuration. The first one is for "spectrum" driver working over PCIe bus and running on host CPU. The second one is for "minimal" driver working over I2C bus, which could be running on host CPU or on Baseboard Management Controller (BMC). Within the first flow "active event" and "inactive event" raised to CPU directly from the Spectrum chip firmware in form of a trap notification. Such trapping mechanism required Ethernet Management Datagrams support from the driver. For the second flow this mechanism is not available, since it does not supported over I2C bus. The only way to deliver these events to "minimal" driver is to route them from the Spectrum chip firmware to system programmable device, which in their turn will generate relevant signal to CPU. The purpose of "minimal" driver interrupt handler is to handle these signals and invoke related APIs: mlxsw_core_line_card_init() for "active event" and mlxsw_core_line_card_fini() for "inactive event", while "active event" / "inactive event" are detected through PRM Management DownStream Device Query Register This interrupt handler shares physical interrupt line with system interrupt handler, implemented in programmable device logic: 17: 0 ... 0 IR-IO-APIC 17-fasteoi mlxreg-hotplug, mlxsw-minimal Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
- Loading branch information