From owner-freebsd-stable Mon Feb 12 14:45:26 1996 Return-Path: owner-stable Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id OAA08655 for stable-outgoing; Mon, 12 Feb 1996 14:45:26 -0800 (PST) Received: from localhost.cdrom.com (localhost.cdrom.com [127.0.0.1]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id OAA08648 Mon, 12 Feb 1996 14:45:24 -0800 (PST) Message-Id: <199602122245.OAA08648@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: Host localhost.cdrom.com [127.0.0.1] didn't use HELO protocol To: Richard J Kuhns cc: freebsd-stable@FreeBSD.ORG Subject: Re: One problem && one question In-reply-to: Your message of "Mon, 12 Feb 1996 16:29:23 +0500." <9602122129.AA16125@sparcmill.grauel.com> Date: Mon, 12 Feb 1996 14:45:23 -0800 From: "Justin T. Gibbs" Sender: owner-stable@FreeBSD.ORG Precedence: bulk Patch round two: -- Justin T. Gibbs =========================================== FreeBSD: Turning PCs into workstations =========================================== Index: bt9xx.c =================================================================== RCS file: /home/ncvs/src/sys/pci/bt9xx.c,v retrieving revision 1.5 diff -c -r1.5 bt9xx.c *** bt9xx.c 1996/02/12 17:00:39 1.5 --- bt9xx.c 1996/02/12 22:43:20 *************** *** 35,41 **** #include /* XXX Need more device IDs */ - #define PCI_BASEADR0 PCI_MAP_REG_START #define PCI_DEVICE_ID_BUSLOGIC_946 0x1040104Bul static char* bt_pci_probe __P((pcici_t tag, pcidi_t type)); --- 35,40 ---- *************** *** 70,86 **** pcici_t config_id; int unit; { u_long io_port; unsigned opri = 0; struct bt_data *bt; ! if(!(io_port = pci_conf_read(config_id, PCI_BASEADR0))) return; - /* - * The first bit of PCI_BASEADR0 is always - * set hence we mask it off. - */ - io_port &= 0xfffffffe; if(!(bt = bt_alloc(unit, io_port))) return; /* XXX PCI code should take return status */ --- 69,89 ---- pcici_t config_id; int unit; { + int reg; u_long io_port; unsigned opri = 0; struct bt_data *bt; ! for(reg = PCI_MAP_REG_START; reg < PCI_MAP_REG_END; reg+=4) { ! if(!(io_port = pci_conf_read(config_id, reg))) ! return; ! if(io_port & PCI_MAP_IO) { ! ioport &= PCI_MAP_IO; ! break; ! } ! } ! if(reg == PCI_MAP_REG_END) return; if(!(bt = bt_alloc(unit, io_port))) return; /* XXX PCI code should take return status */