common.c (85b59f5bb24aeca1a987cbb206e228bf630c8327) | common.c (ef407beefbd9928792ccc93857e408e0057bc17b) |
---|---|
1#include <linux/pci.h> | 1#include <linux/pci.h> |
2#include <linux/interrupt.h> 3#include <linux/timer.h> |
|
2#include <linux/kernel.h> 3 4static int __init 5early_read_config_word(struct pci_channel *hose, 6 int top_bus, int bus, int devfn, int offset, u16 *value) 7{ 8 struct pci_dev fake_dev; 9 struct pci_bus fake_bus; --- 47 unchanged lines hidden (view full) --- 57 cap66 = 0; 58 break; 59 } 60 } 61 } 62 63 return cap66 > 0; 64} | 4#include <linux/kernel.h> 5 6static int __init 7early_read_config_word(struct pci_channel *hose, 8 int top_bus, int bus, int devfn, int offset, u16 *value) 9{ 10 struct pci_dev fake_dev; 11 struct pci_bus fake_bus; --- 47 unchanged lines hidden (view full) --- 59 cap66 = 0; 60 break; 61 } 62 } 63 } 64 65 return cap66 > 0; 66} |
67 68static void pcibios_enable_err(unsigned long __data) 69{ 70 struct pci_channel *hose = (struct pci_channel *)__data; 71 72 del_timer(&hose->err_timer); 73 printk(KERN_DEBUG "PCI: re-enabling error IRQ.\n"); 74 enable_irq(hose->err_irq); 75} 76 77static void pcibios_enable_serr(unsigned long __data) 78{ 79 struct pci_channel *hose = (struct pci_channel *)__data; 80 81 del_timer(&hose->serr_timer); 82 printk(KERN_DEBUG "PCI: re-enabling system error IRQ.\n"); 83 enable_irq(hose->serr_irq); 84} 85 86void pcibios_enable_timers(struct pci_channel *hose) 87{ 88 if (hose->err_irq) { 89 init_timer(&hose->err_timer); 90 hose->err_timer.data = (unsigned long)hose; 91 hose->err_timer.function = pcibios_enable_err; 92 } 93 94 if (hose->serr_irq) { 95 init_timer(&hose->serr_timer); 96 hose->serr_timer.data = (unsigned long)hose; 97 hose->serr_timer.function = pcibios_enable_serr; 98 } 99} 100 101/* 102 * A simple handler for the regular PCI status errors, called from IRQ 103 * context. 104 */ 105unsigned int pcibios_handle_status_errors(unsigned long addr, 106 unsigned int status, 107 struct pci_channel *hose) 108{ 109 unsigned int cmd = 0; 110 111 if (status & PCI_STATUS_REC_MASTER_ABORT) { 112 printk(KERN_DEBUG "PCI: master abort, pc=0x%08lx\n", addr); 113 cmd |= PCI_STATUS_REC_MASTER_ABORT; 114 } 115 116 if (status & PCI_STATUS_REC_TARGET_ABORT) { 117 printk(KERN_DEBUG "PCI: target abort: "); 118 pcibios_report_status(PCI_STATUS_REC_TARGET_ABORT | 119 PCI_STATUS_SIG_TARGET_ABORT | 120 PCI_STATUS_REC_MASTER_ABORT, 1); 121 printk("\n"); 122 123 cmd |= PCI_STATUS_REC_TARGET_ABORT; 124 } 125 126 if (status & (PCI_STATUS_PARITY | PCI_STATUS_DETECTED_PARITY)) { 127 printk(KERN_DEBUG "PCI: parity error detected: "); 128 pcibios_report_status(PCI_STATUS_PARITY | 129 PCI_STATUS_DETECTED_PARITY, 1); 130 printk("\n"); 131 132 cmd |= PCI_STATUS_PARITY | PCI_STATUS_DETECTED_PARITY; 133 134 /* Now back off of the IRQ for awhile */ 135 if (hose->err_irq) { 136 disable_irq(hose->err_irq); 137 hose->err_timer.expires = jiffies + HZ; 138 add_timer(&hose->err_timer); 139 } 140 } 141 142 return cmd; 143} |
|