From afb16384acc9f64b5db3a92ebe68033af034a1cc Mon Sep 17 00:00:00 2001 From: "Federico G. Schwindt" Date: Tue, 12 Aug 2003 10:27:11 +0000 Subject: move verify_cksum() to ahc; krw@ ok. --- sys/dev/ic/smc93cx6.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'sys/dev/ic/smc93cx6.c') 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); - } -} -- cgit v1.2.3