PCI: Fix multiple problems with VIA hardware
This patch is designed to fix:
- Disk eating corruptor on KT7 after resume from RAM
- VIA IRQ handling
- VIA fixups for bus lockups after resume from RAM
The core of this is to add a table of resume fixups run at resume time.
We need to do this for a variety of boards and features, but particularly
we need to do this to get various critical VIA fixups done on resume.
The second part of the problem is to handle VIA IRQ number rules which
are a bit odd and need special handling for PIC interrupts. Various
patches broke various boxes and while this one may not be perfect
(hopefully it is) it ensures the workaround is applied to the right
devices only.
From: Jean Delvare <khali@linux-fr.org>
Now that PCI quirks are replayed on software resume, we can safely
re-enable the Asus SMBus unhiding quirk even when software suspend support
is enabled.
[akpm@osdl.org: fix const warning]
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index 2bbafe0..45f2b20 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -416,7 +416,7 @@
const struct pci_device_id *pci_find_present(const struct pci_device_id *ids)
{
struct pci_dev *dev;
- struct pci_device_id * found = NULL;
+ const struct pci_device_id *found = NULL;
WARN_ON(in_interrupt());
down_read(&pci_bus_sem);
@@ -442,7 +442,6 @@
* find devices that are usually built into a system, or for a general hint as
* to if another device happens to be present at this specific moment in time.
*/
-
int pci_dev_present(const struct pci_device_id *ids)
{
return pci_find_present(ids) == NULL ? 0 : 1;