Date: Mon, 12 Feb 1996 14:45:23 -0800 From: "Justin T. Gibbs" <gibbs@freefall.freebsd.org> To: Richard J Kuhns <rjk@sparcmill.grauel.com> Cc: freebsd-stable@FreeBSD.ORG Subject: Re: One problem && one question Message-ID: <199602122245.OAA08648@freefall.freebsd.org> In-Reply-To: Your message of "Mon, 12 Feb 1996 16:29:23 %2B0500." <9602122129.AA16125@sparcmill.grauel.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <i386/scsi/btreg.h>
/* 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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602122245.OAA08648>
