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>
This commit is contained in:
parent
35f41896c1
commit
0f127b3868
@ -12,7 +12,7 @@
|
||||
* on the understanding that TFS is not responsible for the correct
|
||||
* functioning of this software in any circumstances.
|
||||
*
|
||||
* $Id: bt.c,v 1.4 1996/01/07 19:24:36 gibbs Exp $
|
||||
* $Id: bt.c,v 1.5 1996/01/25 23:03:07 joerg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -462,10 +462,6 @@ bt_alloc(unit, iobase)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i >= sizeof(found)/sizeof(struct bt_found)) {
|
||||
printf("bt%d: Invalid base address\n", unit);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bt = malloc(sizeof(struct bt_data), M_DEVBUF, M_NOWAIT);
|
||||
if (!bt) {
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user