aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorZhang, Yanmin <yanmin_zhang@linux.intel.com>2007-07-16 02:39:39 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 12:05:40 -0400
commited4aaadb1a7913f509f05d3e67840541a180713f (patch)
tree7089fd2fe0f56d552ea153e2925363d0febaa952 /drivers/pci/probe.c
parent012bfdf00ce2f36a1add75a0d18303656c6294ef (diff)
fix jvc cdrom drive lockup
Before calling init_hwif_default, ide_unregister gets lock ide_lock and disables irq. init_hwif_default calls ide_default_io_base which calls pci_get_device and later pci_get_subsys tries to apply for semaphore pci_bus_sem and goes to sleep. Mostly, pci_get_device should be called when irq is turned on. ide_default_io_base just needs find if list pci_devices is empty. Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com> Cc: Greg KH <greg@kroah.com> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index a7bce75c6732..34b8dae0d90f 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -22,6 +22,18 @@ EXPORT_SYMBOL(pci_root_buses);
22 22
23LIST_HEAD(pci_devices); 23LIST_HEAD(pci_devices);
24 24
25/*
26 * Some device drivers need know if pci is initiated.
27 * Basically, we think pci is not initiated when there
28 * is no device in list of pci_devices.
29 */
30int no_pci_devices(void)
31{
32 return list_empty(&pci_devices);
33}
34
35EXPORT_SYMBOL(no_pci_devices);
36
25#ifdef HAVE_PCI_LEGACY 37#ifdef HAVE_PCI_LEGACY
26/** 38/**
27 * pci_create_legacy_files - create legacy I/O port and memory files 39 * pci_create_legacy_files - create legacy I/O port and memory files