diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-08-12 10:27:11 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-08-12 10:27:11 +0000 |
commit | afb16384acc9f64b5db3a92ebe68033af034a1cc (patch) | |
tree | 8b900b19737203d8a2e93e9d16ce52ff5d944089 /sys/dev/ic/smc93cx6.c | |
parent | 8123023fd5cd19f2c9efcd5f4e398204d6857186 (diff) |
move verify_cksum() to ahc; krw@ ok.
Diffstat (limited to 'sys/dev/ic/smc93cx6.c')
-rw-r--r-- | sys/dev/ic/smc93cx6.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/sys/dev/ic/smc93cx6.c b/sys/dev/ic/smc93cx6.c index d5a7a7868a9..a30616a5e82 100644 --- a/sys/dev/ic/smc93cx6.c +++ b/sys/dev/ic/smc93cx6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smc93cx6.c,v 1.14 2003/08/08 21:34:39 fgsch Exp $ */ +/* $OpenBSD: smc93cx6.c,v 1.15 2003/08/12 10:27:10 fgsch Exp $ */ /* $FreeBSD: sys/dev/aic7xxx/93cx6.c,v 1.5 2000/01/07 23:08:17 gibbs Exp $ */ /* * Interface for the 93C66/56/46/26/06 serial eeprom parts. @@ -197,25 +197,3 @@ read_seeprom(sd, buf, start_addr, count) #endif return (1); } - -int -verify_cksum(struct seeprom_config *sc) -{ - int i; - int maxaddr; - u_int32_t checksum; - u_int16_t *scarray; - - maxaddr = (sizeof(*sc)/2) - 1; - checksum = 0; - scarray = (uint16_t *)sc; - - for (i = 0; i < maxaddr; i++) - checksum = checksum + scarray[i]; - if (checksum == 0 || - (checksum & 0xFFFF) != sc->checksum) { - return (0); - } else { - return(1); - } -} |