diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-09-04 13:13:18 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-09-04 13:13:18 +0000 |
commit | a25b93cb92f13187627648e9192d926400c83b14 (patch) | |
tree | 83917d1e2d7c79eaaace31ad92c84d9e608c4d4e /sys/dev | |
parent | ad1edb83deb5874b8ae4b9eca158419b9f618b71 (diff) |
Use pcmcia_cis_read_1() to read cis data to be checksummed, instead of
trying to roll our inline version of it and fail. Fixes `checksum error'
warnings on all the cards with checksum tuples I could find (admittedly not
many), and probably fixes all of them since this code has never been correct
in the first place.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pcmcia/pcmcia_cis.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/pcmcia/pcmcia_cis.c b/sys/dev/pcmcia/pcmcia_cis.c index de0e9f436d8..69abedc8e82 100644 --- a/sys/dev/pcmcia/pcmcia_cis.c +++ b/sys/dev/pcmcia/pcmcia_cis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcmcia_cis.c,v 1.16 2010/09/04 12:59:27 miod Exp $ */ +/* $OpenBSD: pcmcia_cis.c,v 1.17 2010/09/04 13:13:17 miod Exp $ */ /* $NetBSD: pcmcia_cis.c,v 1.9 1998/08/22 23:41:48 msaitoh Exp $ */ /* @@ -280,10 +280,8 @@ pcmcia_scan_cis(dev, fct, arg) } sum = 0; for (i = 0; i < length; i++) - sum += - bus_space_read_1(tuple.memt, - tuple.memh, addr + - (i << tuple.addrshift)); + sum += pcmcia_cis_read_1(&tuple, + addr + i); if (cksum != (sum & 0xff)) { DPRINTF((" failed sum=%x\n", sum)); |