[PATCH] PCI: irq.c: trivial printk and DBG updates

Updated printk and DBG with appropriate KERN_*.

Signed-off-by: Daniel Marjamki <daniel.marjamaki@comhem.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Daniel Marjamki 2005-12-01 18:01:28 +01:00 committed by Greg Kroah-Hartman
parent bd62e27140
commit 81745512c6
1 changed files with 23 additions and 19 deletions

View File

@ -78,7 +78,7 @@ static inline struct irq_routing_table * pirq_check_routing_table(u8 *addr)
for (i=0; i < rt->size; i++) for (i=0; i < rt->size; i++)
sum += addr[i]; sum += addr[i];
if (!sum) { if (!sum) {
DBG("PCI: Interrupt Routing Table found at 0x%p\n", rt); DBG(KERN_DEBUG "PCI: Interrupt Routing Table found at 0x%p\n", rt);
return rt; return rt;
} }
return NULL; return NULL;
@ -128,7 +128,7 @@ static void __init pirq_peer_trick(void)
#ifdef DEBUG #ifdef DEBUG
{ {
int j; int j;
DBG("%02x:%02x slot=%02x", e->bus, e->devfn/8, e->slot); DBG(KERN_DEBUG "%02x:%02x slot=%02x", e->bus, e->devfn/8, e->slot);
for(j=0; j<4; j++) for(j=0; j<4; j++)
DBG(" %d:%02x/%04x", j, e->irq[j].link, e->irq[j].bitmap); DBG(" %d:%02x/%04x", j, e->irq[j].link, e->irq[j].bitmap);
DBG("\n"); DBG("\n");
@ -160,10 +160,10 @@ void eisa_set_level_irq(unsigned int irq)
return; return;
eisa_irq_mask |= (1 << irq); eisa_irq_mask |= (1 << irq);
printk("PCI: setting IRQ %u as level-triggered\n", irq); printk(KERN_DEBUG "PCI: setting IRQ %u as level-triggered\n", irq);
val = inb(port); val = inb(port);
if (!(val & mask)) { if (!(val & mask)) {
DBG(" -> edge"); DBG(KERN_DEBUG " -> edge");
outb(val | mask, port); outb(val | mask, port);
} }
} }
@ -677,11 +677,11 @@ static __init int ali_router_probe(struct irq_router *r, struct pci_dev *router,
{ {
case PCI_DEVICE_ID_AL_M1533: case PCI_DEVICE_ID_AL_M1533:
case PCI_DEVICE_ID_AL_M1563: case PCI_DEVICE_ID_AL_M1563:
printk("PCI: Using ALI IRQ Router\n"); printk(KERN_DEBUG "PCI: Using ALI IRQ Router\n");
r->name = "ALI"; r->name = "ALI";
r->get = pirq_ali_get; r->get = pirq_ali_get;
r->set = pirq_ali_set; r->set = pirq_ali_set;
return 1; return 1;
} }
return 0; return 0;
} }
@ -749,12 +749,13 @@ static void __init pirq_find_router(struct irq_router *r)
r->get = NULL; r->get = NULL;
r->set = NULL; r->set = NULL;
DBG("PCI: Attempting to find IRQ router for %04x:%04x\n", DBG(KERN_DEBUG "PCI: Attempting to find IRQ router for %04x:%04x\n",
rt->rtr_vendor, rt->rtr_device); rt->rtr_vendor, rt->rtr_device);
pirq_router_dev = pci_find_slot(rt->rtr_bus, rt->rtr_devfn); pirq_router_dev = pci_find_slot(rt->rtr_bus, rt->rtr_devfn);
if (!pirq_router_dev) { if (!pirq_router_dev) {
DBG("PCI: Interrupt router not found at %02x:%02x\n", rt->rtr_bus, rt->rtr_devfn); DBG(KERN_DEBUG "PCI: Interrupt router not found at "
"%02x:%02x\n", rt->rtr_bus, rt->rtr_devfn);
return; return;
} }
@ -799,7 +800,7 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
/* Find IRQ pin */ /* Find IRQ pin */
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
if (!pin) { if (!pin) {
DBG(" -> no interrupt pin\n"); DBG(KERN_DEBUG " -> no interrupt pin\n");
return 0; return 0;
} }
pin = pin - 1; pin = pin - 1;
@ -809,16 +810,16 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
if (!pirq_table) if (!pirq_table)
return 0; return 0;
DBG("IRQ for %s[%c]", pci_name(dev), 'A' + pin); DBG(KERN_DEBUG "IRQ for %s[%c]", pci_name(dev), 'A' + pin);
info = pirq_get_info(dev); info = pirq_get_info(dev);
if (!info) { if (!info) {
DBG(" -> not found in routing table\n"); DBG(" -> not found in routing table\n" KERN_DEBUG);
return 0; return 0;
} }
pirq = info->irq[pin].link; pirq = info->irq[pin].link;
mask = info->irq[pin].bitmap; mask = info->irq[pin].bitmap;
if (!pirq) { if (!pirq) {
DBG(" -> not routed\n"); DBG(" -> not routed\n" KERN_DEBUG);
return 0; return 0;
} }
DBG(" -> PIRQ %02x, mask %04x, excl %04x", pirq, mask, pirq_table->exclusive_irqs); DBG(" -> PIRQ %02x, mask %04x, excl %04x", pirq, mask, pirq_table->exclusive_irqs);
@ -848,7 +849,10 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
newirq = dev->irq; newirq = dev->irq;
if (newirq && !((1 << newirq) & mask)) { if (newirq && !((1 << newirq) & mask)) {
if ( pci_probe & PCI_USE_PIRQ_MASK) newirq = 0; if ( pci_probe & PCI_USE_PIRQ_MASK) newirq = 0;
else printk(KERN_WARNING "PCI: IRQ %i for device %s doesn't match PIRQ mask - try pci=usepirqmask\n", newirq, pci_name(dev)); else printk("\n" KERN_WARNING
"PCI: IRQ %i for device %s doesn't match PIRQ mask "
"- try pci=usepirqmask\n" KERN_DEBUG, newirq,
pci_name(dev));
} }
if (!newirq && assign) { if (!newirq && assign) {
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
@ -923,14 +927,14 @@ static void __init pcibios_fixup_irqs(void)
struct pci_dev *dev = NULL; struct pci_dev *dev = NULL;
u8 pin; u8 pin;
DBG("PCI: IRQ fixup\n"); DBG(KERN_DEBUG "PCI: IRQ fixup\n");
while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
/* /*
* If the BIOS has set an out of range IRQ number, just ignore it. * If the BIOS has set an out of range IRQ number, just ignore it.
* Also keep track of which IRQ's are already in use. * Also keep track of which IRQ's are already in use.
*/ */
if (dev->irq >= 16) { if (dev->irq >= 16) {
DBG("%s: ignoring bogus IRQ %d\n", pci_name(dev), dev->irq); DBG(KERN_DEBUG "%s: ignoring bogus IRQ %d\n", pci_name(dev), dev->irq);
dev->irq = 0; dev->irq = 0;
} }
/* If the IRQ is already assigned to a PCI device, ignore its ISA use penalty */ /* If the IRQ is already assigned to a PCI device, ignore its ISA use penalty */
@ -1039,7 +1043,7 @@ static struct dmi_system_id __initdata pciirq_dmi_table[] = {
static int __init pcibios_irq_init(void) static int __init pcibios_irq_init(void)
{ {
DBG("PCI: IRQ init\n"); DBG(KERN_DEBUG "PCI: IRQ init\n");
if (pcibios_enable_irq || raw_pci_ops == NULL) if (pcibios_enable_irq || raw_pci_ops == NULL)
return 0; return 0;