Believe it or not, after futzing with the debugger for hours, reading the OHCI 
spec, and trying to figure out why writing to the control registers works 
exactly as it should but the card seems to ignore the ED list, I decided to 
try something completely crazy and put the line

pci_enable_busmaster(self);

near the top of ohci_attach() in ohci_pci.c

...and it worked!  I believe my first words upon seeing "ums0: <blah blah>" 
were "You have GOT to be kidding me."

My logic was that since the driver allocates a DMA buffer in main memory that 
the card is supposed to read/write to, maybe cardbus cards have additional 
restrictions on what parts of system RAM they can touch and might have to use 
bus mastering to do it.  I don't know if that's a valid assumption or not, 
but in any case the driver functions perfectly with every USB 1.1 and 2.0 
(put the same line in ehci_pci.c) device I've tried so far.

My USB 2.0 hard drive enclosure is getting around 8MB/s for reads and 7MB/s 
for writes.  I don't know if that's good or not, or even what the physical 
limitations of the drive I have in there are, but it's still much improved 
from the ~ 800KB/s I was getting using in compatibility mode on the built-in 
USB port.

I'm attaching a (trivial) patch for the lazy :)  Be advised, this is far from 
a general solution as it probably breaks some (many?) PCI-based controllers 
that don't support bus mastering.

Craig
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to