Commit 73472a46b5b28116b145fb5fc05242c1aa8e1461

Authored by Pallipadi, Venkatesh
Committed by Ingo Molnar
1 parent 3a5fc0e40c

x86: Disable HPET MSI on ATI SB700/SB800

HPET MSI on platforms with ATI SB700/SB800 as they seem to have some
side-effects on floppy DMA. Do not use HPET MSI on such platforms.

Original problem report from Mark Hounschell
http://lkml.indiana.edu/hypermail/linux/kernel/0912.2/01118.html

[ This patch needs to go to stable as well. But, there are some
  conflicts that prevents the patch from going as is. I can
  rebase/resubmit to stable once the patch goes upstream.
  hpa: still Cc:'ing stable@ as an FYI. ]

Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: <stable@kernel.org>
LKML-Reference: <20100121190952.GA32523@linux-os.sc.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>

Showing 3 changed files with 22 additions and 0 deletions Side-by-side Diff

arch/x86/include/asm/hpet.h
... ... @@ -67,6 +67,7 @@
67 67 extern unsigned long force_hpet_address;
68 68 extern u8 hpet_blockid;
69 69 extern int hpet_force_user;
  70 +extern u8 hpet_msi_disable;
70 71 extern int is_hpet_enabled(void);
71 72 extern int hpet_enable(void);
72 73 extern void hpet_disable(void);
arch/x86/kernel/hpet.c
... ... @@ -34,6 +34,8 @@
34 34 */
35 35 unsigned long hpet_address;
36 36 u8 hpet_blockid; /* OS timer block num */
  37 +u8 hpet_msi_disable;
  38 +
37 39 #ifdef CONFIG_PCI_MSI
38 40 static unsigned long hpet_num_timers;
39 41 #endif
... ... @@ -596,6 +598,9 @@
596 598 unsigned int num_timers_used = 0;
597 599 int i;
598 600  
  601 + if (hpet_msi_disable)
  602 + return;
  603 +
599 604 if (boot_cpu_has(X86_FEATURE_ARAT))
600 605 return;
601 606 id = hpet_readl(HPET_ID);
... ... @@ -927,6 +932,9 @@
927 932  
928 933 hpet_reserve_platform_timers(hpet_readl(HPET_ID));
929 934 hpet_print_config();
  935 +
  936 + if (hpet_msi_disable)
  937 + return 0;
930 938  
931 939 if (boot_cpu_has(X86_FEATURE_ARAT))
932 940 return 0;
arch/x86/kernel/quirks.c
... ... @@ -491,6 +491,19 @@
491 491 break;
492 492 }
493 493 }
  494 +
  495 +/*
  496 + * HPET MSI on some boards (ATI SB700/SB800) has side effect on
  497 + * floppy DMA. Disable HPET MSI on such platforms.
  498 + */
  499 +static void force_disable_hpet_msi(struct pci_dev *unused)
  500 +{
  501 + hpet_msi_disable = 1;
  502 +}
  503 +
  504 +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
  505 + force_disable_hpet_msi);
  506 +
494 507 #endif
495 508  
496 509 #if defined(CONFIG_PCI) && defined(CONFIG_NUMA)