summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-06-23 21:24:59 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-06-23 21:24:59 +0000
commit63e450328a0f91570c0a79aa9e9be81df9cd32b8 (patch)
treea90d94d15e53ad52fe875d1eefd44443b6f36b55
parenta68f7b3e3e0180124755089a5e4e1b44a0cc9816 (diff)
under some circumstances, such as on ppc, signature does not read all 32 bits, check low 16 only
-rw-r--r--sys/dev/pci/ami_pci.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/pci/ami_pci.c b/sys/dev/pci/ami_pci.c
index c6a60556780..ced27cc1ca8 100644
--- a/sys/dev/pci/ami_pci.c
+++ b/sys/dev/pci/ami_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami_pci.c,v 1.5 2001/06/19 16:09:24 mickey Exp $ */
+/* $OpenBSD: ami_pci.c,v 1.6 2001/06/23 21:24:58 mickey Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -60,7 +60,7 @@
#define AMI_INITTARG(i) (((i) >> 16) & 0xff)
#define AMI_INITCHAN(i) (((i) >> 24) & 0xff)
#define AMI_PCI_SIG 0xa0
-#define AMI_SIGNATURE 0x11223344
+#define AMI_SIGNATURE 0x3344
#define AMI_PCI_SGL 0xa4
#define AMI_SGL_LHC 0x00000299
#define AMI_SGL_HLC 0x00000199
@@ -127,11 +127,12 @@ ami_pci_match(parent, match, aux)
return (0);
for (pami = ami_pci_devices; pami->vendor; pami++) {
+ printf("%lx %lx\n", pci_conf_read(pa->pa_pc, pa->pa_tag, AMI_PCI_SIG) & 0xffff, AMI_SIGNATURE);
if (pami->vendor == PCI_VENDOR(pa->pa_id) &&
pami->product == PCI_PRODUCT(pa->pa_id) &&
(!pami->flags & AMI_CHECK_SIGN ||
- pci_conf_read(pa->pa_pc, pa->pa_tag, AMI_PCI_SIG) ==
- AMI_SIGNATURE))
+ (pci_conf_read(pa->pa_pc, pa->pa_tag, AMI_PCI_SIG) &
+ 0xffff) == AMI_SIGNATURE))
return (1);
}
return (0);