From owner-freebsd-current Mon Sep 13 10:29:54 1999 Delivered-To: freebsd-current@freebsd.org Received: from freebsd.netcom.com. (freebsd.netcom.com [198.211.79.3]) by hub.freebsd.org (Postfix) with SMTP id 17E63156BB for ; Mon, 13 Sep 1999 10:29:41 -0700 (PDT) (envelope-from bugs@freebsd.netcom.com) Received: by freebsd.netcom.com. (SMI-8.6/SMI-SVR4) id MAA02985; Mon, 13 Sep 1999 12:03:48 -0500 From: bugs@freebsd.netcom.com (Mark Hittinger) Message-Id: <199909131703.MAA02985@freebsd.netcom.com.> Subject: patch for if_ed.c ed_probe_HP_pclanp() returns OK when shouldn't To: freebsd-current@freebsd.org Date: Mon, 13 Sep 1999 12:03:47 -0500 (CDT) X-Mailer: ELM [version 2.4 PL25] Content-Type: text Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi Inside ed_probe_HP_pclanp() we are doing various checks to see if the device is there and if we hit a problem we return 0 instead of an error. Attached is a patch for this problem. Regards, Mark Hittinger Mindspring/Netcom/Dallas bugs@freebsd.netcom.com *** if_ed.c.1 Mon Sep 13 16:31:29 1999 --- if_ed.c Mon Sep 13 16:48:33 1999 *************** *** 1387,1391 **** ((inb(sc->asic_addr + ED_HPP_ID + 2) & 0xF0) != 0) || (inb(sc->asic_addr + ED_HPP_ID + 3) != 0x53)) ! return 0; /* --- 1387,1391 ---- ((inb(sc->asic_addr + ED_HPP_ID + 2) & 0xF0) != 0) || (inb(sc->asic_addr + ED_HPP_ID + 3) != 0x53)) ! return(ENXIO); /* *************** *** 1401,1405 **** if (checksum != 0xFF) ! return 0; /* --- 1401,1405 ---- if (checksum != 0xFF) ! return(ENXIO); /* *************** *** 1410,1414 **** if (((sc->hpp_id = inw(sc->asic_addr + ED_HPP_PAGE_4)) & ED_HPP_ID_SOFT_MODEL_MASK) != 0x0000) ! return 0; /* --- 1410,1414 ---- if (((sc->hpp_id = inw(sc->asic_addr + ED_HPP_PAGE_4)) & ED_HPP_ID_SOFT_MODEL_MASK) != 0x0000) ! return(ENXIO); /* *************** *** 1441,1445 **** if (!(inb(sc->nic_addr + ED_P0_ISR) & ED_ISR_RST)) ! return 0; /* reset did not complete */ /* --- 1441,1445 ---- if (!(inb(sc->nic_addr + ED_P0_ISR) & ED_ISR_RST)) ! return(ENXIO); /* reset did not complete */ /* *************** *** 1456,1460 **** if (irq >= (sizeof(ed_hpp_intr_val) / sizeof(ed_hpp_intr_val[0]))) ! return 0; /* --- 1456,1460 ---- if (irq >= (sizeof(ed_hpp_intr_val) / sizeof(ed_hpp_intr_val[0]))) ! return(ENXIO); /* *************** *** 1521,1525 **** if (mem_addr != conf_maddr) ! return 0; error = ed_alloc_memory(dev, 0, memsize); --- 1521,1525 ---- if (mem_addr != conf_maddr) ! return(ENXIO); error = ed_alloc_memory(dev, 0, memsize); *************** *** 1609,1613 **** if (bcmp(test_pattern, test_buffer, sizeof(test_pattern))) ! return 0; } --- 1609,1613 ---- if (bcmp(test_pattern, test_buffer, sizeof(test_pattern))) ! return(ENXIO); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message