Skip to contentSkip to conversation

ehci-hcd, don't use PCI MWI

PATCH In review David Brownell 4 participants 5 messages Mar 19, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ehci-hcd, don't use PCI MWI

Hi,

Some users have been sending init logs for Athlon kernels that include PCI warning messages about the PCI cache line size getting set incorrectly ... where the kernel thinks that the right value is 16 bytes. Since 64 bytes is the right number, it's dangerous to enable MWI on such systems.

This patch stops trying to use MWI; it's a workaround for the misbehavior of that PCI cacheline-setting code. Please apply to 2.5 and 2.4 trees.

- Dave

drivers/usb/host/ehci-hcd.c +5 -1
@@ -432,7 +432,11 @@
 	}
 
 	/* help hc dma work well with cachelines */
-	pci_set_mwi (ehci->hcd.pdev);
+	/* NOTE:  disabled until it works reliably ... some x86/Athlon
+	 * kernels are thinking 16 byte cachelines, not 64 byte ones,
+	 * so clearly the MWI prep logic is wrong.
+	 */
+	// pci_set_mwi (ehci->hcd.pdev);
 
 	/* clear interrupt enables, set irq latency */
 	temp = readl (&ehci->regs->command) & 0xff;
#1 lore raw
Quoted 11 lines · David Brownell

Hi,

Some users have been sending init logs for Athlon kernels that include PCI warning messages about the PCI cache line size getting set incorrectly ... where the kernel thinks that the right value is 16 bytes. Since 64 bytes is the right number, it's dangerous to enable MWI on such systems.

This patch stops trying to use MWI; it's a workaround for the misbehavior of that PCI cacheline-setting code. Please apply to 2.5 and 2.4 trees.

Please don't -- Ivan has a patch for this, let's get that in instead.

We all acknowledge your patch is a workaround, but this sort of fix does not belong in the mainstream kernel. We want to fix it The Right Way(tm), once. And since a patch already exists for this...

We need to get IvanK's extended-save-restore-state patch in, too.

Ivan, would you be up for a repost on lkml?

Jeff

#2 lore raw
Quoted 10 lines · Jeff Garzik
Quoted 8 lines · David Brownell

Hi,

Some users have been sending init logs for Athlon kernels that include PCI warning messages about the PCI cache line size getting set incorrectly ... where the kernel thinks that the right value is 16 bytes. Since 64 bytes is the right number, it's dangerous to enable MWI on such systems.

Quoted 6 lines
Quoted 3 lines

This patch stops trying to use MWI; it's a workaround for the misbehavior of that PCI cacheline-setting code. Please apply to 2.5 and 2.4 trees.

Please don't -- Ivan has a patch for this, let's get that in instead.

I'd be happy with that, except on the 2.4 trees where we haven't seen such a patch yet. (So Greg -- please hold off on this for 2.5 unless/until it becomes clear Ivan's patch won't happen.)

Quoted 3 lines

We all acknowledge your patch is a workaround, but this sort of fix does not belong in the mainstream kernel. We want to fix it The Right Way(tm), once. And since a patch already exists for this...

Yep, I figured CC'ing LKML would help move things forward ... :)

- Dave

Quoted 9 lines

We need to get IvanK's extended-save-restore-state patch in, too.

Ivan, would you be up for a repost on lkml?

Jeff

#3 lore raw
Quoted 6 lines · David Brownell
Quoted 1 line · Jeff Garzik

Please don't -- Ivan has a patch for this, let's get that in instead.

I'd be happy with that, except on the 2.4 trees where we haven't seen such a patch yet. (So Greg -- please hold off on this for 2.5 unless/until it becomes clear Ivan's patch won't happen.)

Hopefully I'll post the updated patch tomorrow.
Right now I'm chasing down weird problem - 2.5.65 broke networking on one of my boxes. So far I figured out that reverting serial/core changes fixes that. Incredibly...

Ivan.

#4 lore raw
In reply to David Brownell
Quoted 4 lines · David Brownell

I'd be happy with that, except on the 2.4 trees where we haven't seen such a patch yet. (So Greg -- please hold off on this for 2.5 unless/until it becomes clear Ivan's patch won't happen.)

I'll hold off for both 2.5 and 2.4, as Ivan's patch should go into both kernels.

thanks,

greg k-h