Lines Matching refs:fcs
187 #define CRC10_FCS(fcs, c) ((((fcs) << 8) & 0x3ff) ^ crc10_table[((fcs) >> 2) & 0xff] ^ (c)) argument
198 static __u16 __inline__ fcs_compute10(unsigned char *sp, int len, __u16 fcs) in fcs_compute10() argument
200 for (; len-- > 0; fcs = CRC10_FCS(fcs, *sp++)); in fcs_compute10()
201 return fcs; in fcs_compute10()
210 __u16 fcs; in safe_process_read_urb() local
218 fcs = fcs_compute10(data, length, CRC10_INITFCS); in safe_process_read_urb()
219 if (fcs) { in safe_process_read_urb()
220 dev_err(&port->dev, "%s - bad CRC %x\n", __func__, fcs); in safe_process_read_urb()
244 __u16 fcs; in safe_prepare_write_buffer() local
266 fcs = fcs_compute10(buf, pkt_len, CRC10_INITFCS); in safe_prepare_write_buffer()
267 buf[pkt_len - 2] |= fcs >> 8; in safe_prepare_write_buffer()
268 buf[pkt_len - 1] |= fcs & 0xff; in safe_prepare_write_buffer()