diff options
Diffstat (limited to 'arch/x86/pci/common.c')
-rw-r--r-- | arch/x86/pci/common.c | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 7b20bccf3648..3d2612b68694 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -448,6 +448,22 @@ static const struct dmi_system_id pciprobe_dmi_table[] __initconst = { | |||
448 | DMI_MATCH(DMI_PRODUCT_NAME, "ftServer"), | 448 | DMI_MATCH(DMI_PRODUCT_NAME, "ftServer"), |
449 | }, | 449 | }, |
450 | }, | 450 | }, |
451 | { | ||
452 | .callback = set_scan_all, | ||
453 | .ident = "Stratus/NEC ftServer", | ||
454 | .matches = { | ||
455 | DMI_MATCH(DMI_SYS_VENDOR, "NEC"), | ||
456 | DMI_MATCH(DMI_PRODUCT_NAME, "Express5800/R32"), | ||
457 | }, | ||
458 | }, | ||
459 | { | ||
460 | .callback = set_scan_all, | ||
461 | .ident = "Stratus/NEC ftServer", | ||
462 | .matches = { | ||
463 | DMI_MATCH(DMI_SYS_VENDOR, "NEC"), | ||
464 | DMI_MATCH(DMI_PRODUCT_NAME, "Express5800/R31"), | ||
465 | }, | ||
466 | }, | ||
451 | {} | 467 | {} |
452 | }; | 468 | }; |
453 | 469 | ||
@@ -497,6 +513,31 @@ void __init pcibios_set_cache_line_size(void) | |||
497 | } | 513 | } |
498 | } | 514 | } |
499 | 515 | ||
516 | /* | ||
517 | * Some device drivers assume dev->irq won't change after calling | ||
518 | * pci_disable_device(). So delay releasing of IRQ resource to driver | ||
519 | * unbinding time. Otherwise it will break PM subsystem and drivers | ||
520 | * like xen-pciback etc. | ||
521 | */ | ||
522 | static int pci_irq_notifier(struct notifier_block *nb, unsigned long action, | ||
523 | void *data) | ||
524 | { | ||
525 | struct pci_dev *dev = to_pci_dev(data); | ||
526 | |||
527 | if (action != BUS_NOTIFY_UNBOUND_DRIVER) | ||
528 | return NOTIFY_DONE; | ||
529 | |||
530 | if (pcibios_disable_irq) | ||
531 | pcibios_disable_irq(dev); | ||
532 | |||
533 | return NOTIFY_OK; | ||
534 | } | ||
535 | |||
536 | static struct notifier_block pci_irq_nb = { | ||
537 | .notifier_call = pci_irq_notifier, | ||
538 | .priority = INT_MIN, | ||
539 | }; | ||
540 | |||
500 | int __init pcibios_init(void) | 541 | int __init pcibios_init(void) |
501 | { | 542 | { |
502 | if (!raw_pci_ops) { | 543 | if (!raw_pci_ops) { |
@@ -509,6 +550,9 @@ int __init pcibios_init(void) | |||
509 | 550 | ||
510 | if (pci_bf_sort >= pci_force_bf) | 551 | if (pci_bf_sort >= pci_force_bf) |
511 | pci_sort_breadthfirst(); | 552 | pci_sort_breadthfirst(); |
553 | |||
554 | bus_register_notifier(&pci_bus_type, &pci_irq_nb); | ||
555 | |||
512 | return 0; | 556 | return 0; |
513 | } | 557 | } |
514 | 558 | ||
@@ -667,12 +711,6 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) | |||
667 | return 0; | 711 | return 0; |
668 | } | 712 | } |
669 | 713 | ||
670 | void pcibios_disable_device (struct pci_dev *dev) | ||
671 | { | ||
672 | if (!pci_dev_msi_enabled(dev) && pcibios_disable_irq) | ||
673 | pcibios_disable_irq(dev); | ||
674 | } | ||
675 | |||
676 | int pci_ext_cfg_avail(void) | 714 | int pci_ext_cfg_avail(void) |
677 | { | 715 | { |
678 | if (raw_pci_ext_ops) | 716 | if (raw_pci_ext_ops) |