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

Fix proposal for bug #2333

Here are links to the bugreport (GNATS is disabled for the moment)


After some time I decided to find what was the real problem and found
It is documented in the AMD756 revision guide[1] as errata #4

According to this, the RhDescriptorA status register (where the number
of ports is taken from) under certain circonstances contains invalid
data (most often during initialisation).

There is a known workaround, used in Linux for example, that simply
wait for all the fixed read only value registers to contain the right
value. This is quite simple to do using the AMD756 Datasheets[2].

As I don't know really how to identify a specific chipset in OpenBSD,
I took a shortcut to solve my problem : the problem is that 0 ports
are reported on the USB root hub but, according to the spec, a 0
number of ports is invalid so I simply made a patch so the kernel
tries a certain number of times before accepting the null number of

On the box whose dmesg is in the bugreport it takes between 2 and 3
tries to get the correct port number instead of 0.
I think this is better than fiddling with delay values because they
were never the same depending on the CPU.

I'd like to receive any comments on this patch because I'm far from
being an OpenBSD kernel expert.

[1] Revision guide : <http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/22591.pdf>
[2] 756 Datasheet : <http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/22548.pdf>
        Jean-Yves Burlett