Subject: Re: -current bha driver attaches PCI device multiple times (as ISA)
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Justin T. Gibbs <gibbs@freefall.freebsd.org>
List: current-users
Date: 10/07/1996 21:22:15
>
>I'm using several machines with BT-596c PCI SCSI controllers.
>These controllers are _all_ configured with ISA-compatible ioports.
>(That  was how they were shipped; it was necessary in 1.2, which
>configured the PCI bha as an ISA-attach "bt" device).

...

>I can think of two workarounds:
>	1)  don't configure the ISA-attach bha
>	2)  Change the non-volatile setup on the card to disable the
>	    ISA-compatible ioport mapping.

I believe there is a way to disable the ISA-compatible I/O port from
the PCI probe so that there is no penalty in leaving the ISA port
enabled in the BIOS.  Here's a code snippet from the Linux driver:

  /*
    For PCI Host Adapters being accessed through the PCI compliant I/O
    Address, disable the ISA compatible I/O Address to avoid detecting the
    same Host Adapter at both I/O Addresses.
  */ 

#define BusLogic_ModifyIO_Disable               0x06

  if (HostAdapter->BusType == BusLogic_PCI_Bus)
    { 
      int Index;      
      for (Index = 0; BusLogic_IO_StandardAddresses[Index] > 0; Index++)
        if (HostAdapter->IO_Address == BusLogic_IO_StandardAddresses[Index])
          break;
      if (BusLogic_IO_StandardAddresses[Index] == 0)
        {        
          ModifyIOAddressRequest = BusLogic_ModifyIO_Disable;
          if (BusLogic_Command(HostAdapter, BusLogic_ModifyIOAddress,
                               &ModifyIOAddressRequest,
                               sizeof(ModifyIOAddressRequest), NULL, 0) < 0)
            return BusLogic_Failure(HostAdapter, "MODIFY I/O ADDRESS");
        }
    }


--
Justin T. Gibbs
===========================================
  FreeBSD: Turning PCs into workstations
===========================================