I messed about for ages and finally found out the USB worked with low speed peripherals but not high speed ones. But I had two other computers with the same USB chipset (Intel 82371EB) and they both worked fine! It had to be a problem with the hardware. I found some dodgy looking filter chokes next to the USB sockets. A few swipes of the soldering iron and they were replaced with wire links. That cured the problem and the USB now works perfectly.
The filters are located here on the motherboard. Right next to the USB sockets on the rear panel.
A close-up of the offending components. I had already replaced the lower one when I took this pic.