oxidecomputer / oxidecomputer/humility
"humility pmbus" should fail a little more gracefully on non-PMBus device
Open
@bcantrill is already working on this.
Since Oct 27, 2021.
- Dominant language
- Rust
- Stars
- 584
- Forks
- 63
- Avg merge
- 3h
- Merged PRs (30d)
- 2
Description
Due to some bad advice from yours truly, we attempted to treat a MAX31790 as a PMBus device on Gimlet:
$ humility pmbus -c 4 -d 0x20 -D adm1272
humility: attached via ST-Link
humility: pmbus failed: request failed: Some(Fault(ReturnStackOverflow))
Here is the scan of the device:
$ humility i2c -s -c 4 -d 0x20
humility: attached via ST-Link
Register scan for device 0x20 on I2C4:
- = No register ! = No device X = Timed out
ADDR 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf
0x00 27 bb 20 20 20 20 20 20 4c 4c 4c 4c 4c 4c 00 00
0x10 00 00 3f 3f 45 00 00 00 ff e0 ff e0 ff e0 ff e0
0x20 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0
0x30 ff 81 ff 81 ff 81 ff 81 ff 81 ff 81 00 00 00 00
0x40 ff 80 ff 80 ff 80 ff 80 ff 80 ff 80 00 00 00 00
0x50 3c 00 3c 00 3c 00 3c 00 3c 00 3c 00 00 00 00 00
0x60 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff
0x70 ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00
0x80 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x90 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0xa0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0xb0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0xc0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0xd0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0xe0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0xf0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
We are dying on a return stack overflow because there are several ffs in there that are being treated as block lengths -- and it doesn't take too many of those to overflow the return stack. We should fail a little more gracefully in this case, and in particular, we know from earlier reads that this can't possibly be a PMBus device.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.