From bb415a7e88deee2af72c019485775e573a3d45d3 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 12 Oct 1998 18:53:33 +0000 Subject: [PATCH] Fix breakage introduced by last patch. bde has added CC_QUIET flag to hasseen_isadev so this will be less noisy when conflicts do exist. Also eliminate redundant warnings about conflicts. Requested by: bde Reviewed by: gibbs --- sys/dev/advansys/adv_isa.c | 21 +++------------------ sys/dev/aha/aha_isa.c | 32 ++++---------------------------- sys/dev/buslogic/bt_isa.c | 31 ++++--------------------------- sys/i386/isa/adv_isa.c | 21 +++------------------ sys/i386/isa/aha_isa.c | 32 ++++---------------------------- sys/i386/isa/bt_isa.c | 31 ++++--------------------------- sys/isa/bt_isa.c | 31 ++++--------------------------- 7 files changed, 26 insertions(+), 173 deletions(-) diff --git a/sys/dev/advansys/adv_isa.c b/sys/dev/advansys/adv_isa.c index 37f534ee432f..09fe9f281926 100644 --- a/sys/dev/advansys/adv_isa.c +++ b/sys/dev/advansys/adv_isa.c @@ -44,7 +44,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: adv_isa.c,v 1.4 1998/09/15 07:03:39 gibbs Exp $ + * $Id: adv_isa.c,v 1.5 1998/10/10 00:44:12 imp Exp $ */ #include @@ -149,11 +149,8 @@ advisaprobe(struct isa_device *id) if (port_addr == 0) /* Already been attached */ continue; - /* - * Make sure that we do not conflict with another device's - * I/O address. - */ - if (haveseen_isadev(id, CC_IOADDR)) + id->id_iobase = port_addr; + if (haveseen_isadev(id, CC_IOADDR | CC_QUIET)) continue; if (adv_find_signature(I386_BUS_SPACE_IO, port_addr)) { @@ -270,18 +267,6 @@ advisaprobe(struct isa_device *id) adv->overrun_physbase = overrun_physbase; - /* - * OK, check to make sure that we're not stepping on - * someone else's IRQ or DRQ - */ - if (haveseen_isadev(id, CC_DRQ)) { - printf("advisaprobe: Aha card at I/O 0x%x's " - "drq %d conflicts, ignoring card.\n", - id->id_iobase, id->id_drq); - adv_free(adv); - return 0; - } - if (adv_init(adv) != 0) { adv_free(adv); return (0); diff --git a/sys/dev/aha/aha_isa.c b/sys/dev/aha/aha_isa.c index c83ab589975f..5f81ea183bda 100644 --- a/sys/dev/aha/aha_isa.c +++ b/sys/dev/aha/aha_isa.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aha_isa.c,v 1.2 1998/09/24 10:43:42 bde Exp $ + * $Id: aha_isa.c,v 1.3 1998/10/10 00:44:12 imp Exp $ */ #include @@ -114,16 +114,12 @@ aha_isa_probe: Failing probe.\n", /* * Ensure this port has not already been claimed already - * by a PCI or EISA adapter. + * by a PCI, EISA or ISA adapter. */ if (aha_check_probed_iop(ioport) != 0) continue; - - /* - * Make sure that we do not conflict with another device's - * I/O address. - */ - if (haveseen_isadev(dev, CC_IOADDR)) + dev->id_iobase = aha_isa_ports[port_index].addr; + if (haveseen_isadev(dev, CC_IOADDR | CC_QUIET)) continue; /* Allocate a softc for use during probing */ @@ -171,28 +167,8 @@ aha_isa_probe: Failing probe.\n", "detected for adapter at 0x%x. " "Failing probe\n", ioport); } - dev->id_iobase = aha_isa_ports[port_index].addr; dev->id_irq = (config_data.irq << 9); dev->id_intr = aha_isa_intr; - - /* - * OK, check to make sure that we're not stepping on - * someone else's IRQ or DRQ - */ - if (haveseen_isadev(dev, CC_DRQ)) { - printf("aha_isa_probe: Aha card at I/O 0x%x's drq %d " - "conflicts, ignoring card.\n", dev->id_iobase, - dev->id_drq); - aha_free(aha); - return 0; - } - if (haveseen_isadev(dev, CC_IRQ)) { - printf("aha_isa_probe: Aha card at I/O 0x%x's irq %d " - "conflicts, ignoring card.\n", dev->id_iobase, - config_data.irq + 9); - aha_free(aha); - return 0; - } aha_unit++; return (AHA_NREGS); } diff --git a/sys/dev/buslogic/bt_isa.c b/sys/dev/buslogic/bt_isa.c index 5473bf268d8f..8009a36569d8 100644 --- a/sys/dev/buslogic/bt_isa.c +++ b/sys/dev/buslogic/bt_isa.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt_isa.c,v 1.2 1998/09/24 10:43:42 bde Exp $ + * $Id: bt_isa.c,v 1.3 1998/10/10 00:44:12 imp Exp $ */ #include @@ -115,16 +115,12 @@ bt_isa_probe: Failing probe.\n", /* * Ensure this port has not already been claimed already - * by a PCI or EISA adapter. + * by a PCI, EISA or ISA adapter. */ if (bt_check_probed_iop(ioport) != 0) continue; - - /* - * Make sure that we do not conflict with another device's - * I/O address. - */ - if (haveseen_isadev(dev, CC_IOADDR)) + dev->id_iobase = bt_isa_ports[port_index].addr; + if (haveseen_isadev(dev, CC_IOADDR | CC_QUIET)) continue; /* Allocate a softc for use during probing */ @@ -178,28 +174,9 @@ bt_isa_probe: Failing probe.\n", /* VL DMA */ dev->id_drq = -1; } - dev->id_iobase = bt_isa_ports[port_index].addr; dev->id_irq = (config_data.irq << 9); dev->id_intr = bt_isa_intr; - /* - * OK, check to make sure that we're not stepping on - * someone else's IRQ or DRQ - */ - if (haveseen_isadev(dev, CC_DRQ)) { - printf("bt_isa_probe: Bt card at I/O 0x%x's drq %d " - "conflicts, ignoring card.\n", dev->id_iobase, - dev->id_drq); - bt_free(bt); - return 0; - } - if (haveseen_isadev(dev, CC_IRQ)) { - printf("bt_isa_probe: Bt card at I/O 0x%x's irq %d " - "conflicts, ignoring card.\n", dev->id_iobase, - config_data.irq + 9); - bt_free(bt); - return 0; - } bt_unit++; return (BT_NREGS); } diff --git a/sys/i386/isa/adv_isa.c b/sys/i386/isa/adv_isa.c index 37f534ee432f..09fe9f281926 100644 --- a/sys/i386/isa/adv_isa.c +++ b/sys/i386/isa/adv_isa.c @@ -44,7 +44,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: adv_isa.c,v 1.4 1998/09/15 07:03:39 gibbs Exp $ + * $Id: adv_isa.c,v 1.5 1998/10/10 00:44:12 imp Exp $ */ #include @@ -149,11 +149,8 @@ advisaprobe(struct isa_device *id) if (port_addr == 0) /* Already been attached */ continue; - /* - * Make sure that we do not conflict with another device's - * I/O address. - */ - if (haveseen_isadev(id, CC_IOADDR)) + id->id_iobase = port_addr; + if (haveseen_isadev(id, CC_IOADDR | CC_QUIET)) continue; if (adv_find_signature(I386_BUS_SPACE_IO, port_addr)) { @@ -270,18 +267,6 @@ advisaprobe(struct isa_device *id) adv->overrun_physbase = overrun_physbase; - /* - * OK, check to make sure that we're not stepping on - * someone else's IRQ or DRQ - */ - if (haveseen_isadev(id, CC_DRQ)) { - printf("advisaprobe: Aha card at I/O 0x%x's " - "drq %d conflicts, ignoring card.\n", - id->id_iobase, id->id_drq); - adv_free(adv); - return 0; - } - if (adv_init(adv) != 0) { adv_free(adv); return (0); diff --git a/sys/i386/isa/aha_isa.c b/sys/i386/isa/aha_isa.c index c83ab589975f..5f81ea183bda 100644 --- a/sys/i386/isa/aha_isa.c +++ b/sys/i386/isa/aha_isa.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aha_isa.c,v 1.2 1998/09/24 10:43:42 bde Exp $ + * $Id: aha_isa.c,v 1.3 1998/10/10 00:44:12 imp Exp $ */ #include @@ -114,16 +114,12 @@ aha_isa_probe: Failing probe.\n", /* * Ensure this port has not already been claimed already - * by a PCI or EISA adapter. + * by a PCI, EISA or ISA adapter. */ if (aha_check_probed_iop(ioport) != 0) continue; - - /* - * Make sure that we do not conflict with another device's - * I/O address. - */ - if (haveseen_isadev(dev, CC_IOADDR)) + dev->id_iobase = aha_isa_ports[port_index].addr; + if (haveseen_isadev(dev, CC_IOADDR | CC_QUIET)) continue; /* Allocate a softc for use during probing */ @@ -171,28 +167,8 @@ aha_isa_probe: Failing probe.\n", "detected for adapter at 0x%x. " "Failing probe\n", ioport); } - dev->id_iobase = aha_isa_ports[port_index].addr; dev->id_irq = (config_data.irq << 9); dev->id_intr = aha_isa_intr; - - /* - * OK, check to make sure that we're not stepping on - * someone else's IRQ or DRQ - */ - if (haveseen_isadev(dev, CC_DRQ)) { - printf("aha_isa_probe: Aha card at I/O 0x%x's drq %d " - "conflicts, ignoring card.\n", dev->id_iobase, - dev->id_drq); - aha_free(aha); - return 0; - } - if (haveseen_isadev(dev, CC_IRQ)) { - printf("aha_isa_probe: Aha card at I/O 0x%x's irq %d " - "conflicts, ignoring card.\n", dev->id_iobase, - config_data.irq + 9); - aha_free(aha); - return 0; - } aha_unit++; return (AHA_NREGS); } diff --git a/sys/i386/isa/bt_isa.c b/sys/i386/isa/bt_isa.c index 5473bf268d8f..8009a36569d8 100644 --- a/sys/i386/isa/bt_isa.c +++ b/sys/i386/isa/bt_isa.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt_isa.c,v 1.2 1998/09/24 10:43:42 bde Exp $ + * $Id: bt_isa.c,v 1.3 1998/10/10 00:44:12 imp Exp $ */ #include @@ -115,16 +115,12 @@ bt_isa_probe: Failing probe.\n", /* * Ensure this port has not already been claimed already - * by a PCI or EISA adapter. + * by a PCI, EISA or ISA adapter. */ if (bt_check_probed_iop(ioport) != 0) continue; - - /* - * Make sure that we do not conflict with another device's - * I/O address. - */ - if (haveseen_isadev(dev, CC_IOADDR)) + dev->id_iobase = bt_isa_ports[port_index].addr; + if (haveseen_isadev(dev, CC_IOADDR | CC_QUIET)) continue; /* Allocate a softc for use during probing */ @@ -178,28 +174,9 @@ bt_isa_probe: Failing probe.\n", /* VL DMA */ dev->id_drq = -1; } - dev->id_iobase = bt_isa_ports[port_index].addr; dev->id_irq = (config_data.irq << 9); dev->id_intr = bt_isa_intr; - /* - * OK, check to make sure that we're not stepping on - * someone else's IRQ or DRQ - */ - if (haveseen_isadev(dev, CC_DRQ)) { - printf("bt_isa_probe: Bt card at I/O 0x%x's drq %d " - "conflicts, ignoring card.\n", dev->id_iobase, - dev->id_drq); - bt_free(bt); - return 0; - } - if (haveseen_isadev(dev, CC_IRQ)) { - printf("bt_isa_probe: Bt card at I/O 0x%x's irq %d " - "conflicts, ignoring card.\n", dev->id_iobase, - config_data.irq + 9); - bt_free(bt); - return 0; - } bt_unit++; return (BT_NREGS); } diff --git a/sys/isa/bt_isa.c b/sys/isa/bt_isa.c index 5473bf268d8f..8009a36569d8 100644 --- a/sys/isa/bt_isa.c +++ b/sys/isa/bt_isa.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt_isa.c,v 1.2 1998/09/24 10:43:42 bde Exp $ + * $Id: bt_isa.c,v 1.3 1998/10/10 00:44:12 imp Exp $ */ #include @@ -115,16 +115,12 @@ bt_isa_probe: Failing probe.\n", /* * Ensure this port has not already been claimed already - * by a PCI or EISA adapter. + * by a PCI, EISA or ISA adapter. */ if (bt_check_probed_iop(ioport) != 0) continue; - - /* - * Make sure that we do not conflict with another device's - * I/O address. - */ - if (haveseen_isadev(dev, CC_IOADDR)) + dev->id_iobase = bt_isa_ports[port_index].addr; + if (haveseen_isadev(dev, CC_IOADDR | CC_QUIET)) continue; /* Allocate a softc for use during probing */ @@ -178,28 +174,9 @@ bt_isa_probe: Failing probe.\n", /* VL DMA */ dev->id_drq = -1; } - dev->id_iobase = bt_isa_ports[port_index].addr; dev->id_irq = (config_data.irq << 9); dev->id_intr = bt_isa_intr; - /* - * OK, check to make sure that we're not stepping on - * someone else's IRQ or DRQ - */ - if (haveseen_isadev(dev, CC_DRQ)) { - printf("bt_isa_probe: Bt card at I/O 0x%x's drq %d " - "conflicts, ignoring card.\n", dev->id_iobase, - dev->id_drq); - bt_free(bt); - return 0; - } - if (haveseen_isadev(dev, CC_IRQ)) { - printf("bt_isa_probe: Bt card at I/O 0x%x's irq %d " - "conflicts, ignoring card.\n", dev->id_iobase, - config_data.irq + 9); - bt_free(bt); - return 0; - } bt_unit++; return (BT_NREGS); }