Commit 73472a46 authored by Pallipadi, Venkatesh's avatar Pallipadi, Venkatesh Committed by Ingo Molnar

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: default avatarMark Hounschell <markh@compro.net>
Signed-off-by: default avatarVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: <stable@kernel.org>
LKML-Reference: <20100121190952.GA32523@linux-os.sc.intel.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent 3a5fc0e4
...@@ -67,6 +67,7 @@ extern unsigned long hpet_address; ...@@ -67,6 +67,7 @@ extern unsigned long hpet_address;
extern unsigned long force_hpet_address; extern unsigned long force_hpet_address;
extern u8 hpet_blockid; extern u8 hpet_blockid;
extern int hpet_force_user; extern int hpet_force_user;
extern u8 hpet_msi_disable;
extern int is_hpet_enabled(void); extern int is_hpet_enabled(void);
extern int hpet_enable(void); extern int hpet_enable(void);
extern void hpet_disable(void); extern void hpet_disable(void);
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
*/ */
unsigned long hpet_address; unsigned long hpet_address;
u8 hpet_blockid; /* OS timer block num */ u8 hpet_blockid; /* OS timer block num */
u8 hpet_msi_disable;
#ifdef CONFIG_PCI_MSI #ifdef CONFIG_PCI_MSI
static unsigned long hpet_num_timers; static unsigned long hpet_num_timers;
#endif #endif
...@@ -596,6 +598,9 @@ static void hpet_msi_capability_lookup(unsigned int start_timer) ...@@ -596,6 +598,9 @@ static void hpet_msi_capability_lookup(unsigned int start_timer)
unsigned int num_timers_used = 0; unsigned int num_timers_used = 0;
int i; int i;
if (hpet_msi_disable)
return;
if (boot_cpu_has(X86_FEATURE_ARAT)) if (boot_cpu_has(X86_FEATURE_ARAT))
return; return;
id = hpet_readl(HPET_ID); id = hpet_readl(HPET_ID);
...@@ -928,6 +933,9 @@ static __init int hpet_late_init(void) ...@@ -928,6 +933,9 @@ static __init int hpet_late_init(void)
hpet_reserve_platform_timers(hpet_readl(HPET_ID)); hpet_reserve_platform_timers(hpet_readl(HPET_ID));
hpet_print_config(); hpet_print_config();
if (hpet_msi_disable)
return 0;
if (boot_cpu_has(X86_FEATURE_ARAT)) if (boot_cpu_has(X86_FEATURE_ARAT))
return 0; return 0;
......
...@@ -491,6 +491,19 @@ void force_hpet_resume(void) ...@@ -491,6 +491,19 @@ void force_hpet_resume(void)
break; break;
} }
} }
/*
* HPET MSI on some boards (ATI SB700/SB800) has side effect on
* floppy DMA. Disable HPET MSI on such platforms.
*/
static void force_disable_hpet_msi(struct pci_dev *unused)
{
hpet_msi_disable = 1;
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
force_disable_hpet_msi);
#endif #endif
#if defined(CONFIG_PCI) && defined(CONFIG_NUMA) #if defined(CONFIG_PCI) && defined(CONFIG_NUMA)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment