tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Help needed: amdpm(4) robustness patches



Hi,

after my last patch which enabled the amdpm smbus driver for my mainboard,
I noticed that it would just deliver garbage after a certain amount of
time (usually a few hours). Some further debugging and testing revealed the
following issues:

1) amdpm(4) in NetBSD (dev/pci/amdpm_smbus.c to be specific) did not check
   if the controller is currently busy before starting a new transaction.

2) A delay seems to be necessary between writing data to the registers and
   checking the general status register for success (the delay is not
   documented in the data sheet, so this is a bit vague - but it fixed
   the issue for me and the linux driver also has it).

3) While being there, I also added some robustness checks: checking if the
   GSR gets cleared correctly (though that does not seem necessary),
   displaying appropriate error messages if the GSR contains error bits and
   aborting transactions currently in progress if the controller does not
   get available after waiting for so long.

Now this is where the help request starts:
Can someone test this on his amdpm(4) based smbus and see if it works? Can
someone check the patch itself for style issues?

Best regards,
Michael

PS: Please CC me as I am not on this list.

Attachment: amdpm.patch
Description: Binary data



Home | Main Index | Thread Index | Old Index