lkml.org 
[lkml]   [2001]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [linux-usb-devel] pegasus + MediaGX: Oops in khubd, the continuing story?
Date
From
> The Oops'es are mostly in the khubd process, but they sometimes appear in other
> programs (insmod, ifconfig). They always lead to an immedate panic, and nothing

I suspect the ohci driver currently. I've been reviewing it a little and it
is full of code written by someone who does not know about pci write posting.

Specifically

writel(value, pciaddr)

is a queued operation. So

writel(value, foo)
delay
real(foo)

might not do the writel into the delay is over or during it. PCI makes
guarantees that

- writes will go out in order and will be merged only if prefetchable set
- multiple writes to the same addr will remain multiple writes
- reads will not complete until the writes do

This applies in both directions - bus mastering nasties abound notably


writel(STOP, reg->dmactrl)
kfree(buffer)

is dangerous

You have to do

writel(STOP, reg->dmactrl);
[posted]
readl(reg->dmactrl)
[read forces write, read reply will follow any DMA
pending the other way]

I've not attempted to fix it yet


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [from the cache]
©2003-2011 Jasper Spaans