Lines Matching defs:crc
9 #include <linux/crc-ccitt.h>
45 /* 2 bytes crc + EOF */
63 * crc might have fail because i2c macro
158 u16 crc;
163 crc = crc_ccitt(0xffff, skb->data, skb->len);
164 crc = ~crc;
166 tmp = crc & 0x00ff;
169 tmp = (crc >> 8) & 0x00ff;
267 u16 crc;
269 crc = crc_ccitt(0xffff, buf, buflen - 2);
270 crc = ~crc;
272 if (buf[buflen - 2] != (crc & 0xff) || buf[buflen - 1] != (crc >> 8)) {
274 ": CRC error 0x%x != 0x%x 0x%x\n", crc, buf[buflen - 1],
278 print_hex_dump(KERN_DEBUG, "crc: ", DUMP_PREFIX_NONE,
287 * Received data include byte stuffing, crc and sof/eof
327 /* remove crc. Byte Stuffing is already removed here */
411 * seems. The frame format is data-crc, and corruption can occur anywhere
413 * The tricky case is when we read a corrupted data or crc. We must detect
415 * core. This is the reason why we check the crc here.
454 * Having incorrect crc is usually due to i2c macrocell