diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-02-05 22:20:40 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-02-05 22:20:40 +0000 |
commit | 1be6b642c8029081cd4100963cf7fe29e5302433 (patch) | |
tree | 1e27b6f913d1da40cc90528e8c7e1a15bba25254 /sys/dev/pci | |
parent | 456fb07557d109ce9616d179ed46717eeaa06b50 (diff) |
support new u2w cards; dante@mclink.it, merged by kwesterback@home.com
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/adw_pci.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/sys/dev/pci/adw_pci.c b/sys/dev/pci/adw_pci.c index f4b17475da7..938b1a3dd6b 100644 --- a/sys/dev/pci/adw_pci.c +++ b/sys/dev/pci/adw_pci.c @@ -1,8 +1,8 @@ -/* $OpenBSD: adw_pci.c,v 1.1 1998/11/17 06:11:05 downsj Exp $ */ -/* $NetBSD: adw_pci.c,v 1.2 1998/09/26 19:53:34 dante Exp $ */ +/* $NetBSD: adw_pci.c,v 1.3 2000/02/03 20:28:26 dante Exp $ */ /* - * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. + * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. + * All rights reserved. * * Author: Baldassare Dante Profeta <dante@mclink.it> * @@ -86,7 +86,7 @@ struct cfattach adw_pci_ca = int adw_pci_match(parent, match, aux) struct device *parent; - void *match, *aux; + void *match, *aux; { struct pci_attach_args *pa = aux; @@ -94,6 +94,8 @@ adw_pci_match(parent, match, aux) switch (PCI_PRODUCT(pa->pa_id)) { case PCI_PRODUCT_ADVSYS_WIDE: return (1); + case PCI_PRODUCT_ADVSYS_U2W: + return (1); } return 0; @@ -116,9 +118,6 @@ adw_pci_attach(parent, self, aux) const char *intrstr; int retval; - - sc->sc_flags = 0x0; - /* * Latency timer settings. */ @@ -127,8 +126,9 @@ adw_pci_attach(parent, self, aux) bhlcr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_BHLC_REG); - if ((PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ADVSYS_WIDE) && - (PCI_LATTIMER(bhlcr) < 0x20)) { + if( ((PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ADVSYS_WIDE) || + (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ADVSYS_U2W)) && + (PCI_LATTIMER(bhlcr) < 0x20)) { bhlcr &= 0xFFFF00FFUL; bhlcr |= 0x00002000UL; pci_conf_write(pa->pa_pc, pa->pa_tag, @@ -137,8 +137,9 @@ adw_pci_attach(parent, self, aux) } - if ((PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ADVSYS_WIDE) && - (command & PCI_COMMAND_PARITY_ENABLE) == 0) { + if (((PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ADVSYS_WIDE) || + (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ADVSYS_U2W)) && + (command & PCI_COMMAND_PARITY_ENABLE) == 0) { sc->cfg.control_flag |= CONTROL_FLAG_IGNORE_PERR; } /* |