summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1996-02-16 17:24:19 +0000
committergibbs <gibbs@FreeBSD.org>1996-02-16 17:24:19 +0000
commitde8a3631f094c583d345a959990d33cd3ae8db7a (patch)
tree60c02934455383b870e2972724a9e6253a377720 /sys/pci
parent26f02b4e28abcb1c6baf6a0e07ceaa1c3f165c06 (diff)
downloadFreeBSD-src-de8a3631f094c583d345a959990d33cd3ae8db7a.zip
FreeBSD-src-de8a3631f094c583d345a959990d33cd3ae8db7a.tar.gz
Allow I/O port ranges above the standard ISA one so the PCI probe will succeed.
Reviewed by: Richard J Kuhns <rjk@sparcmill.grauel.com>
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/bt9xx.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/pci/bt9xx.c b/sys/pci/bt9xx.c
index b5befcf..319705f 100644
--- a/sys/pci/bt9xx.c
+++ b/sys/pci/bt9xx.c
@@ -19,7 +19,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: bt9xx.c,v 1.4 1996/01/23 21:46:57 se Exp $
+ * $Id: bt9xx.c,v 1.5 1996/02/12 17:00:39 gibbs Exp $
*/
#include <pci.h>
@@ -35,7 +35,6 @@
#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));
@@ -70,17 +69,21 @@ bt_pci_attach(config_id, unit)
pcici_t config_id;
int unit;
{
+ u_char reg;
u_long io_port;
unsigned opri = 0;
struct bt_data *bt;
- if(!(io_port = pci_conf_read(config_id, PCI_BASEADR0)))
+ for(reg = PCI_MAP_REG_START; reg < PCI_MAP_REG_END; reg+=4) {
+ io_port = pci_conf_read(config_id, reg);
+ if ((io_port&~7)==0) continue;
+ if(io_port & PCI_MAP_IO) {
+ io_port &= ~PCI_MAP_IO;
+ break;
+ }
+ }
+ if(reg == PCI_MAP_REG_END)
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 */
OpenPOWER on IntegriCloud