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

Add more HwError variants #200

Merged
merged 3 commits into from Mar 25, 2024
Merged

Add more HwError variants #200

merged 3 commits into from Mar 25, 2024

Conversation

Aaron-Hartwig
Copy link
Contributor

Additions in support of oxidecomputer/hubris#1562

@Aaron-Hartwig
Copy link
Contributor Author

I haven't been able to exhaustively test this yet as I need some remote hands for that, but here's an example of where things are headed:

aaron@niles ~ $ ./xcvradm -i axf6 -t 4,5,6 status
Port Status
   4 PRESENT | RESET | INTERRUPT
   5 PRESENT | ENABLED | RESET | POWER_GOOD
   6 ENABLED | RESET | INTERRUPT
aaron@niles ~ $ ./xcvradm -i axf6 -t 4,5,6 vendor-info
Port Identifier               Vendor           Part             Rev  Serial           Mfg date
Some operations failed, errors below
Port Error
   4 Hardware error accessing module 4: The module is not powered
   5 Hardware error accessing module 5: The module is not initialized
   6 Hardware error accessing module 6: The module is not present

Copy link
Collaborator

@bnaecker bnaecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I think these will be very helpful up-stack! What is the plan for releasing it? Just hoping to avoid too many version-mismatch errors!

/// This error has been deprecated in favor of the more explicit and
/// informative errors below (NotPresent, NotPowered, PowerFault,
/// NotInitialized, I2cAddressNack, I2cByteNack). It is being maintained
/// for backwards compatability.
#[cfg_attr(any(test, feature = "std"), error("FPGA reported an I2C error"))]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might want to decorate this with #[deprecated = "Use the more specific error variants instead"] or similar.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call!

@Aaron-Hartwig
Copy link
Contributor Author

What is the plan for releasing it? Just hoping to avoid too many version-mismatch errors!

Well, I think we'd like to get this into dendrite/hubris ASAP since this gives us a much richer view of what is actually happening at the transceiver module. Release 7 is shipping right now, so presumably this will get rolled into Release 8. We should maybe chat with the update folks about how to best go about this.

@Aaron-Hartwig Aaron-Hartwig merged commit 0a18f23 into main Mar 25, 2024
3 checks passed
@Aaron-Hartwig Aaron-Hartwig deleted the moar-errors branch March 25, 2024 16:03
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.

None yet

2 participants