- Create and use symbolic constants.
- Convert some switch statements to functionally-similar caculations.
- Correct scheduling interval of high-speed isochronous transactions.
Previous calculation produced half the intended rate.
compiler optimising away or reordering accesses to them.
Fixes ehci(4) on NetBSD/evbarm when using -Os optimisation. It's likely
ohci(4) and uhci(4) are similarly afflicted, so the same changes have
been made there.
Quite how other platforms got away without this for so long is a mystery...
field has error bits set doesn't mean there has been an error, unless the
HALTED bit is set as well. The old behaviour could result in a transfer
being considered failed by the software, but a success by the device.
This seems to have affected mostly mass storage devices.
Pointed out by Dan Ellis in kern/29731.
Having interrupt transfers enables some more device types to be used,
most notably USB2 hubs. USB2 hubs still cannot handle anything but
USB2 devices, because there is node code to handle hub Transaction Translation
yet.
XXX This code doesn't do good bw scheduling, but it's certainly better than
nothing. :)
my ALi-based drive enclosure (it works now, rather than failing to attach).
Also seems to work with a GL811-based enclosure and an ASUS enclosure with a
CD-RW, on both Intel and NEC controllers.
Note: The ALi enclosure is currently very SLOW, due to some issue with taking
too long to notice that the QTD is complete. This requires more investigation.