Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transceivers: clear module disable when a module is removed #1483

Merged
merged 4 commits into from
Aug 9, 2023

Conversation

Aaron-Hartwig
Copy link
Contributor

Building on the module disabling feature introduced in #1441, this PR lets that disable get cleared when a disabled module is removed. Now the SP will enable power at the port again, so when a module is inserted it will get powered without intervention from the host.

This resolves #1480.

@Aaron-Hartwig
Copy link
Contributor Author

I have tested this locally. I manually introduced NAKs by shorting SCL to GND. Here is a ringbuf upon a module being disabled:

humility: ring buffer drv_transceivers_server::__RINGBUF in transceivers:
 NDX LINE      GEN    COUNT PAYLOAD
   0  614        1       39 FrontIOBoardReady(false)
   1  604        1        1 FrontIOBoardReady(true)
   2  647        1        1 LEDInit
   3  150        1        1 LEDInitComplete
   4  533        1        1 ModulePresenceUpdate(LogicalPortMask(0x10001))
   5  354        1        4 GetInterfaceError(0x0, NotInitialized)
   6  313        1        1 GotInterface(0x0, Sff8636)
   7  448        1        3 TemperatureReadError(0x0, I2cAddressNack)
   8  477        1        1 DisablingPorts(LogicalPortMask(0x1))
   9  388        1        1 RemovedDisabledModuleThermalModel(0x0)

Then when I remove the module

humility: ring buffer drv_transceivers_server::__RINGBUF in transceivers:
 NDX LINE      GEN    COUNT PAYLOAD
   0  614        1       39 FrontIOBoardReady(false)
   1  604        1        1 FrontIOBoardReady(true)
   2  647        1        1 LEDInit
   3  150        1        1 LEDInitComplete
   4  533        1        1 ModulePresenceUpdate(LogicalPortMask(0x10001))
   5  354        1        4 GetInterfaceError(0x0, NotInitialized)
   6  313        1        1 GotInterface(0x0, Sff8636)
   7  448        1        3 TemperatureReadError(0x0, I2cAddressNack)
   8  477        1        1 DisablingPorts(LogicalPortMask(0x1))
   9  388        1        1 RemovedDisabledModuleThermalModel(0x0)
  10  529        1        1 ClearDisabledPorts(LogicalPortMask(0x1))
  11  533        1        1 ModulePresenceUpdate(LogicalPortMask(0x10000))

@Aaron-Hartwig Aaron-Hartwig merged commit 58da8bf into master Aug 9, 2023
66 checks passed
@Aaron-Hartwig Aaron-Hartwig deleted the xcvr-clear-disable-on-removal branch August 9, 2023 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

transceivers-server: disable latch should clear when the module is removed
2 participants