Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
Browse files Browse the repository at this point in the history
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6:
  PCI: Add Kconfig option to disable deprecated pci_find_* API
  PCI: pciserial_resume_one ignored return value of pci_enable_device
  PCI Hotplug: cpqhp_pushbutton_thread(): remove a pointless if() check
  PCI: make pci_match_device() static
  PCI: Remove 3 incorrect MSI quirks.
  PCI: Add MSI INTX_DISABLE quirks for ATI SB700/800 SATA and IXP SB400 USB
  PCI: Add quirk for devices which disable MSI when INTX_DISABLE is set.
  PCI: Add MSI quirk for ServerWorks HT1000 PCIX bridge.
  PCI: Revert "PCI: disable MSI by default on systems with Serverworks HT1000 chips"
  • Loading branch information
Linus Torvalds committed Nov 5, 2007
2 parents 3131e53 + bd3989e commit 5d66f15
Show file tree
Hide file tree
Showing 19 changed files with 134 additions and 64 deletions.
18 changes: 9 additions & 9 deletions drivers/isdn/hisax/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ config HISAX_16_3

config HISAX_TELESPCI
bool "Teles PCI"
depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
help
This enables HiSax support for the Teles PCI.
See <file:Documentation/isdn/README.HiSax> on how to configure it.
Expand Down Expand Up @@ -237,7 +237,7 @@ config HISAX_MIC

config HISAX_NETJET
bool "NETjet card"
depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
help
This enables HiSax support for the NetJet from Traverse
Technologies.
Expand All @@ -248,7 +248,7 @@ config HISAX_NETJET

config HISAX_NETJET_U
bool "NETspider U card"
depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
help
This enables HiSax support for the Netspider U interface ISDN card
from Traverse Technologies.
Expand Down Expand Up @@ -287,7 +287,7 @@ config HISAX_HSTSAPHIR

config HISAX_BKM_A4T
bool "Telekom A4T card"
depends on PCI
depends on PCI && PCI_LEGACY
help
This enables HiSax support for the Telekom A4T card.

Expand All @@ -297,7 +297,7 @@ config HISAX_BKM_A4T

config HISAX_SCT_QUADRO
bool "Scitel Quadro card"
depends on PCI
depends on PCI && PCI_LEGACY
help
This enables HiSax support for the Scitel Quadro card.

Expand All @@ -316,7 +316,7 @@ config HISAX_GAZEL

config HISAX_HFC_PCI
bool "HFC PCI-Bus cards"
depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
help
This enables HiSax support for the HFC-S PCI 2BDS0 based cards.

Expand All @@ -325,7 +325,7 @@ config HISAX_HFC_PCI

config HISAX_W6692
bool "Winbond W6692 based cards"
depends on PCI
depends on PCI && PCI_LEGACY
help
This enables HiSax support for Winbond W6692 based PCI ISDN cards.

Expand All @@ -341,7 +341,7 @@ config HISAX_HFC_SX

config HISAX_ENTERNOW_PCI
bool "Formula-n enter:now PCI card"
depends on HISAX_NETJET && PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
depends on HISAX_NETJET && PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
help
This enables HiSax support for the Formula-n enter:now PCI
ISDN card.
Expand Down Expand Up @@ -411,7 +411,7 @@ config HISAX_HFC4S8S

config HISAX_FRITZ_PCIPNP
tristate "AVM Fritz!Card PCI/PCIv2/PnP support (EXPERIMENTAL)"
depends on PCI && EXPERIMENTAL
depends on PCI && PCI_LEGACY && EXPERIMENTAL
help
This enables the driver for the AVM Fritz!Card PCI,
Fritz!Card PCI v2 and Fritz!Card PnP.
Expand Down
4 changes: 2 additions & 2 deletions drivers/isdn/hisax/avm_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ static int __devinit avm_pnp_setup(struct IsdnCardState *cs)

#endif /* __ISAPNP__ */

#ifndef CONFIG_PCI
#ifndef CONFIG_PCI_LEGACY

static int __devinit avm_pci_setup(struct IsdnCardState *cs)
{
Expand Down Expand Up @@ -872,7 +872,7 @@ static int __devinit avm_pci_setup(struct IsdnCardState *cs)
return (1);
}

#endif /* CONFIG_PCI */
#endif /* CONFIG_PCI_LEGACY */

int __devinit
setup_avm_pcipnp(struct IsdnCard *card)
Expand Down
6 changes: 3 additions & 3 deletions drivers/isdn/hisax/diva.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@ static int __devinit setup_diva_isapnp(struct IsdnCard *card)

#endif /* ISAPNP */

#ifdef CONFIG_PCI
#ifdef CONFIG_PCI_LEGACY
static struct pci_dev *dev_diva __devinitdata = NULL;
static struct pci_dev *dev_diva_u __devinitdata = NULL;
static struct pci_dev *dev_diva201 __devinitdata = NULL;
Expand Down Expand Up @@ -1229,14 +1229,14 @@ static int __devinit setup_diva_pci(struct IsdnCard *card)
return (1); /* card found */
}

#else /* if !CONFIG_PCI */
#else /* if !CONFIG_PCI_LEGACY */

static int __devinit setup_diva_pci(struct IsdnCard *card)
{
return (-1); /* card not found; continue search */
}

#endif /* CONFIG_PCI */
#endif /* CONFIG_PCI_LEGACY */

int __devinit
setup_diva(struct IsdnCard *card)
Expand Down
4 changes: 2 additions & 2 deletions drivers/isdn/hisax/elsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ setup_elsa_pcmcia(struct IsdnCard *card)
cs->irq);
}

#ifdef CONFIG_PCI
#ifdef CONFIG_PCI_LEGACY
static struct pci_dev *dev_qs1000 __devinitdata = NULL;
static struct pci_dev *dev_qs3000 __devinitdata = NULL;

Expand Down Expand Up @@ -1093,7 +1093,7 @@ setup_elsa_pci(struct IsdnCard *card)
{
return (1);
}
#endif /* CONFIG_PCI */
#endif /* CONFIG_PCI_LEGACY */

static int __devinit
setup_elsa_common(struct IsdnCard *card)
Expand Down
4 changes: 3 additions & 1 deletion drivers/isdn/hisax/gazel.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs)
return (0);
}

#ifdef CONFIG_PCI_LEGACY
static struct pci_dev *dev_tel __devinitdata = NULL;

static int __devinit
Expand Down Expand Up @@ -620,6 +621,7 @@ setup_gazelpci(struct IsdnCardState *cs)

return (0);
}
#endif /* CONFIG_PCI_LEGACY */

int __devinit
setup_gazel(struct IsdnCard *card)
Expand All @@ -639,7 +641,7 @@ setup_gazel(struct IsdnCard *card)
return (0);
} else {

#ifdef CONFIG_PCI
#ifdef CONFIG_PCI_LEGACY
if (setup_gazelpci(cs))
return (0);
#else
Expand Down
7 changes: 4 additions & 3 deletions drivers/isdn/hisax/niccy.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ static int niccy_card_msg(struct IsdnCardState *cs, int mt, void *arg)
return 0;
}

static struct pci_dev *niccy_dev __devinitdata = NULL;
#ifdef __ISAPNP__
static struct pnp_card *pnp_c __devinitdata = NULL;
#endif
Expand Down Expand Up @@ -299,7 +298,9 @@ int __devinit setup_niccy(struct IsdnCard *card)
return 0;
}
} else {
#ifdef CONFIG_PCI
#ifdef CONFIG_PCI_LEGACY
static struct pci_dev *niccy_dev __devinitdata;

u_int pci_ioaddr;
cs->subtyp = 0;
if ((niccy_dev = pci_find_device(PCI_VENDOR_ID_SATSAGEM,
Expand Down Expand Up @@ -356,7 +357,7 @@ int __devinit setup_niccy(struct IsdnCard *card)
printk(KERN_WARNING "Niccy: io0 0 and NO_PCI_BIOS\n");
printk(KERN_WARNING "Niccy: unable to config NICCY PCI\n");
return 0;
#endif /* CONFIG_PCI */
#endif /* CONFIG_PCI_LEGACY */
}
printk(KERN_INFO "HiSax: %s %s config irq:%d data:0x%X ale:0x%X\n",
CardType[cs->typ], (cs->subtyp == 1) ? "PnP" : "PCI",
Expand Down
4 changes: 2 additions & 2 deletions drivers/isdn/hisax/sedlbauer.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ setup_sedlbauer_isapnp(struct IsdnCard *card, int *bytecnt)
}
#endif /* __ISAPNP__ */

#ifdef CONFIG_PCI
#ifdef CONFIG_PCI_LEGACY
static struct pci_dev *dev_sedl __devinitdata = NULL;

static int __devinit
Expand Down Expand Up @@ -675,7 +675,7 @@ setup_sedlbauer_pci(struct IsdnCard *card)
return (1);
}

#endif /* CONFIG_PCI */
#endif /* CONFIG_PCI_LEGACY */

int __devinit
setup_sedlbauer(struct IsdnCard *card)
Expand Down
9 changes: 0 additions & 9 deletions drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -7365,10 +7365,6 @@ static int tg3_open(struct net_device *dev)
} else if (pci_enable_msi(tp->pdev) == 0) {
u32 msi_mode;

/* Hardware bug - MSI won't work if INTX disabled. */
if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS)
pci_intx(tp->pdev, 1);

msi_mode = tr32(MSGINT_MODE);
tw32(MSGINT_MODE, msi_mode | MSGINT_MODE_ENABLE);
tp->tg3_flags2 |= TG3_FLG2_USING_MSI;
Expand Down Expand Up @@ -12681,11 +12677,6 @@ static int tg3_resume(struct pci_dev *pdev)
if (err)
return err;

/* Hardware bug - MSI won't work if INTX disabled. */
if ((tp->tg3_flags2 & TG3_FLG2_5780_CLASS) &&
(tp->tg3_flags2 & TG3_FLG2_USING_MSI))
pci_intx(tp->pdev, 1);

netif_device_attach(dev);

tg3_full_lock(tp, 0);
Expand Down
11 changes: 11 additions & 0 deletions drivers/pci/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ config PCI_MSI

If you don't know what to do here, say N.

config PCI_LEGACY
bool "Enable deprecated pci_find_* API"
depends on PCI
default y
help
Say Y here if you want to include support for the deprecated
pci_find_slot() and pci_find_device() APIs. Most drivers have
been converted over to using the proper hotplug APIs, so this
option serves to include/exclude only a few drivers that are
still using this API.

config PCI_DEBUG
bool "PCI Debugging"
depends on PCI && DEBUG_KERNEL
Expand Down
6 changes: 3 additions & 3 deletions drivers/pci/hotplug/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ config HOTPLUG_PCI_FAKE

config HOTPLUG_PCI_COMPAQ
tristate "Compaq PCI Hotplug driver"
depends on X86 && PCI_BIOS
depends on X86 && PCI_BIOS && PCI_LEGACY
help
Say Y here if you have a motherboard with a Compaq PCI Hotplug
controller.
Expand All @@ -63,7 +63,7 @@ config HOTPLUG_PCI_COMPAQ_NVRAM

config HOTPLUG_PCI_IBM
tristate "IBM PCI Hotplug driver"
depends on X86_IO_APIC && X86 && PCI_BIOS
depends on X86_IO_APIC && X86 && PCI_BIOS && PCI_LEGACY
help
Say Y here if you have a motherboard with a IBM PCI Hotplug
controller.
Expand Down Expand Up @@ -119,7 +119,7 @@ config HOTPLUG_PCI_CPCI_ZT5550

config HOTPLUG_PCI_CPCI_GENERIC
tristate "Generic port I/O CompactPCI Hotplug driver"
depends on HOTPLUG_PCI_CPCI && X86
depends on HOTPLUG_PCI_CPCI && X86 && PCI_LEGACY
help
Say Y here if you have a CompactPCI system card that exposes the #ENUM
hotswap signal as a bit in a system register that can be read through
Expand Down
16 changes: 7 additions & 9 deletions drivers/pci/hotplug/cpqphp_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1931,16 +1931,14 @@ void cpqhp_pushbutton_thread(unsigned long slot)
return ;
}

if (func != NULL && ctrl != NULL) {
if (cpqhp_process_SS(ctrl, func) != 0) {
amber_LED_on (ctrl, hp_slot);
green_LED_on (ctrl, hp_slot);

set_SOGO(ctrl);
if (cpqhp_process_SS(ctrl, func) != 0) {
amber_LED_on(ctrl, hp_slot);
green_LED_on(ctrl, hp_slot);

/* Wait for SOBS to be unset */
wait_for_ctrl_irq (ctrl);
}
set_SOGO(ctrl);

/* Wait for SOBS to be unset */
wait_for_ctrl_irq(ctrl);
}

p_slot->state = STATIC_STATE;
Expand Down
18 changes: 12 additions & 6 deletions drivers/pci/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@ static struct msi_desc* alloc_msi_entry(void)
return entry;
}

static void pci_intx_for_msi(struct pci_dev *dev, int enable)
{
if (!(dev->dev_flags & PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG))
pci_intx(dev, enable);
}

#ifdef CONFIG_PM
static void __pci_restore_msi_state(struct pci_dev *dev)
{
Expand All @@ -237,7 +243,7 @@ static void __pci_restore_msi_state(struct pci_dev *dev)
entry = get_irq_msi(dev->irq);
pos = entry->msi_attrib.pos;

pci_intx(dev, 0); /* disable intx */
pci_intx_for_msi(dev, 0);
msi_set_enable(dev, 0);
write_msi_msg(dev->irq, &entry->msg);
if (entry->msi_attrib.maskbit)
Expand All @@ -260,7 +266,7 @@ static void __pci_restore_msix_state(struct pci_dev *dev)
return;

/* route the table */
pci_intx(dev, 0); /* disable intx */
pci_intx_for_msi(dev, 0);
msix_set_enable(dev, 0);

list_for_each_entry(entry, &dev->msi_list, list) {
Expand Down Expand Up @@ -343,7 +349,7 @@ static int msi_capability_init(struct pci_dev *dev)
}

/* Set MSI enabled bits */
pci_intx(dev, 0); /* disable intx */
pci_intx_for_msi(dev, 0);
msi_set_enable(dev, 1);
dev->msi_enabled = 1;

Expand Down Expand Up @@ -433,7 +439,7 @@ static int msix_capability_init(struct pci_dev *dev,
i++;
}
/* Set MSI-X enabled bits */
pci_intx(dev, 0); /* disable intx */
pci_intx_for_msi(dev, 0);
msix_set_enable(dev, 1);
dev->msix_enabled = 1;

Expand Down Expand Up @@ -528,7 +534,7 @@ void pci_disable_msi(struct pci_dev* dev)
return;

msi_set_enable(dev, 0);
pci_intx(dev, 1); /* enable intx */
pci_intx_for_msi(dev, 1);
dev->msi_enabled = 0;

BUG_ON(list_empty(&dev->msi_list));
Expand Down Expand Up @@ -640,7 +646,7 @@ void pci_disable_msix(struct pci_dev* dev)
return;

msix_set_enable(dev, 0);
pci_intx(dev, 1); /* enable intx */
pci_intx_for_msi(dev, 1);
dev->msix_enabled = 0;

msix_free_all_irqs(dev);
Expand Down
5 changes: 2 additions & 3 deletions drivers/pci/pci-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids,
* system is in its list of supported devices. Returns the matching
* pci_device_id structure or %NULL if there is no match.
*/
const struct pci_device_id *pci_match_device(struct pci_driver *drv,
struct pci_dev *dev)
static const struct pci_device_id *pci_match_device(struct pci_driver *drv,
struct pci_dev *dev)
{
struct pci_dynid *dynid;

Expand Down Expand Up @@ -559,7 +559,6 @@ static int __init pci_driver_init(void)
postcore_initcall(pci_driver_init);

EXPORT_SYMBOL(pci_match_id);
EXPORT_SYMBOL(pci_match_device);
EXPORT_SYMBOL(__pci_register_driver);
EXPORT_SYMBOL(pci_unregister_driver);
EXPORT_SYMBOL(pci_dev_driver);
Expand Down
Loading

0 comments on commit 5d66f15

Please sign in to comment.