diff options
author | imp <imp@FreeBSD.org> | 2002-06-01 05:48:58 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-06-01 05:48:58 +0000 |
commit | 2af74b69ca9982132332430013dd2ab031186b52 (patch) | |
tree | 0206b1c7171b931d14dac50e482b6b25880e7f78 /sys/dev/pci/pci.c | |
parent | 4c17f59069e389784d1a3ed88653633f5051308a (diff) | |
download | FreeBSD-src-2af74b69ca9982132332430013dd2ab031186b52.zip FreeBSD-src-2af74b69ca9982132332430013dd2ab031186b52.tar.gz |
Use PCI_INTERRUPT_VALI in stead of hard coded 255
Diffstat (limited to 'sys/dev/pci/pci.c')
-rw-r--r-- | sys/dev/pci/pci.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index c034d99..fb5372d 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -751,7 +751,7 @@ pci_add_resources(device_t pcib, int b, int s, int f, device_t dev) pci_add_map(pcib, b, s, f, q->arg1, rl); } - if (cfg->intpin > 0 && cfg->intline != 255) { + if (cfg->intpin > 0 && PCI_INTERRUPT_VALID(cfg->intline)) { #ifdef __ia64__ /* * Re-route interrupts on ia64 so that we can get the @@ -760,8 +760,8 @@ pci_add_resources(device_t pcib, int b, int s, int f, device_t dev) */ cfg->intline = PCIB_ROUTE_INTERRUPT(pcib, dev, cfg->intpin); #endif - resource_list_add(rl, SYS_RES_IRQ, 0, - cfg->intline, cfg->intline, 1); + resource_list_add(rl, SYS_RES_IRQ, 0, cfg->intline, + cfg->intline, 1); } } @@ -1197,11 +1197,11 @@ pci_alloc_resource(device_t dev, device_t child, int type, int *rid, * deserving of an interrupt, try to assign it one. */ if ((type == SYS_RES_IRQ) && - (cfg->intline == 255 || cfg->intline == 0) && + !PCI_INTERRUPT_VALID(cfg->intline) && (cfg->intpin != 0)) { cfg->intline = PCIB_ROUTE_INTERRUPT( device_get_parent(dev), child, cfg->intpin); - if (cfg->intline != 255) { + if (PCI_INTERRUPT_VALID(cfg->intline)) { pci_write_config(child, PCIR_INTLINE, cfg->intline, 1); resource_list_add(rl, SYS_RES_IRQ, 0, |