[PATCH] sky2: pci config space checking

There were bugs in mmconfig access to PCI space, up to and
include 2.6.16-rc1. These prevented the sky2 driver from being
able to clear PCI express errors.

This patch makes the driver check (during probe), for errors
in PCI config access and fail.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This commit is contained in:
Stephen Hemminger
2006-01-30 11:37:55 -08:00
committed by Jeff Garzik
parent 08c06d8a90
commit 2d42d21f11
2 changed files with 22 additions and 17 deletions

View File

@@ -1867,14 +1867,6 @@ static inline u8 sky2_read8(const struct sky2_hw *hw, unsigned reg)
return readb(hw->regs + reg);
}
/* This should probably go away, bus based tweeks suck */
static inline int is_pciex(const struct sky2_hw *hw)
{
u32 status;
pci_read_config_dword(hw->pdev, PCI_DEV_STATUS, &status);
return (status & PCI_OS_PCI_X) == 0;
}
static inline void sky2_write32(const struct sky2_hw *hw, unsigned reg, u32 val)
{
writel(val, hw->regs + reg);