VIA RAID checksum off by 1
Woody Suwalski
woodys at xandros.com
Thu Aug 10 13:22:25 UTC 2006
I have here a VIA RAID which is not picked up by -rc9. -rc10, -rc11 nor -rc12 (binary only???)
It seems that the checksum calculated is off by 1 == 1 too big.
Could anybody else try to duplicate the problem?
Thanks, Woody
class = 0x010400
classname = RAID bus controller
desc = VT8251 AHCI/SATA 4-Port Controller
manu = VIA Technologies, Inc.
pci = 0x1106, 0x3349, 0x1106, 0x3349
subdesc = VT8251 AHCI/SATA 4-Port Controller
submanu = VIA Technologies, Inc.
--- dmraid/1.0.0.rc11/lib/format/ataraid/via.c.old 2006-08-09 13:34:07.000000000 -0400
+++ dmraid/1.0.0.rc11/lib/format/ataraid/via.c 2006-08-09 13:38:40.000000000 -0400
@@ -142,6 +142,10 @@ static uint8_t checksum(struct via *via)
while (i--)
sum += ((uint8_t*) via)[i];
+ /* wms: on my VIA the calculated checksum is off by 1 (too big) */
+ if (sum == via->checksum + 1)
+ sum --;
+
return sum == via->checksum;
}
More information about the Ataraid-list
mailing list