diff options
author | gibbs <gibbs@FreeBSD.org> | 1999-08-16 22:50:37 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1999-08-16 22:50:37 +0000 |
commit | edb123178ed447ee9d8297ad8387ff6b3e6f72ec (patch) | |
tree | bd4ef385713fbc611590215047cb84bdd6155229 /sys | |
parent | a5b1de7a7c2c225722adf8711ed6149c913db3a0 (diff) | |
download | FreeBSD-src-edb123178ed447ee9d8297ad8387ff6b3e6f72ec.zip FreeBSD-src-edb123178ed447ee9d8297ad8387ff6b3e6f72ec.tar.gz |
Differentiate between aic7895C chips and their earlier brethren
via the PCI revid register.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/aic7xxx/ahc_pci.c | 8 | ||||
-rw-r--r-- | sys/pci/ahc_pci.c | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/sys/dev/aic7xxx/ahc_pci.c b/sys/dev/aic7xxx/ahc_pci.c index 38e071f..54f429f 100644 --- a/sys/dev/aic7xxx/ahc_pci.c +++ b/sys/dev/aic7xxx/ahc_pci.c @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ahc_pci.c,v 1.16 1999/07/03 20:16:59 peter Exp $ + * $Id: ahc_pci.c,v 1.17 1999/08/16 02:33:46 gibbs Exp $ */ #include <sys/param.h> @@ -1546,7 +1546,11 @@ ahc_aic7895_setup(device_t dev, char *channel, ahc_chip *chip, *channel = pci_get_function(dev) == 1 ? 'B' : 'A'; *chip = AHC_AIC7895; - *features = AHC_AIC7895_FE; + /* The 'C' revision of the aic7895 has a few additional features */ + if (pci_get_revid(dev) >= 4) + *features = AHC_AIC7895C_FE; + else + *features = AHC_AIC7895_FE; *flags |= AHC_NEWEEPROM_FMT; devconfig = pci_read_config(dev, DEVCONFIG, /*bytes*/4); devconfig &= ~SCBSIZE32; diff --git a/sys/pci/ahc_pci.c b/sys/pci/ahc_pci.c index 38e071f..54f429f 100644 --- a/sys/pci/ahc_pci.c +++ b/sys/pci/ahc_pci.c @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ahc_pci.c,v 1.16 1999/07/03 20:16:59 peter Exp $ + * $Id: ahc_pci.c,v 1.17 1999/08/16 02:33:46 gibbs Exp $ */ #include <sys/param.h> @@ -1546,7 +1546,11 @@ ahc_aic7895_setup(device_t dev, char *channel, ahc_chip *chip, *channel = pci_get_function(dev) == 1 ? 'B' : 'A'; *chip = AHC_AIC7895; - *features = AHC_AIC7895_FE; + /* The 'C' revision of the aic7895 has a few additional features */ + if (pci_get_revid(dev) >= 4) + *features = AHC_AIC7895C_FE; + else + *features = AHC_AIC7895_FE; *flags |= AHC_NEWEEPROM_FMT; devconfig = pci_read_config(dev, DEVCONFIG, /*bytes*/4); devconfig &= ~SCBSIZE32; |