Lines Matching refs:fcs
177 #define CRC10_FCS(fcs, c) ((((fcs) << 8) & 0x3ff) ^ crc10_table[((fcs) >> 2) & 0xff] ^ (c)) argument
188 static __u16 __inline__ fcs_compute10(unsigned char *sp, int len, __u16 fcs) in fcs_compute10() argument
190 for (; len-- > 0; fcs = CRC10_FCS(fcs, *sp++)); in fcs_compute10()
191 return fcs; in fcs_compute10()
200 __u16 fcs; in safe_process_read_urb() local
208 fcs = fcs_compute10(data, length, CRC10_INITFCS); in safe_process_read_urb()
209 if (fcs) { in safe_process_read_urb()
210 dev_err(&port->dev, "%s - bad CRC %x\n", __func__, fcs); in safe_process_read_urb()
234 __u16 fcs; in safe_prepare_write_buffer() local
256 fcs = fcs_compute10(buf, pkt_len, CRC10_INITFCS); in safe_prepare_write_buffer()
257 buf[pkt_len - 2] |= fcs >> 8; in safe_prepare_write_buffer()
258 buf[pkt_len - 1] |= fcs & 0xff; in safe_prepare_write_buffer()