Lines Matching refs:fcs
168 #define CRC10_FCS(fcs, c) ((((fcs) << 8) & 0x3ff) ^ crc10_table[((fcs) >> 2) & 0xff] ^ (c)) argument
179 static inline __u16 fcs_compute10(unsigned char *sp, int len, __u16 fcs) in fcs_compute10() argument
181 for (; len-- > 0; fcs = CRC10_FCS(fcs, *sp++)); in fcs_compute10()
182 return fcs; in fcs_compute10()
191 __u16 fcs; in safe_process_read_urb() local
204 fcs = fcs_compute10(data, length, CRC10_INITFCS); in safe_process_read_urb()
205 if (fcs) { in safe_process_read_urb()
206 dev_err(&port->dev, "%s - bad CRC %x\n", __func__, fcs); in safe_process_read_urb()
230 __u16 fcs; in safe_prepare_write_buffer() local
252 fcs = fcs_compute10(buf, pkt_len, CRC10_INITFCS); in safe_prepare_write_buffer()
253 buf[pkt_len - 2] |= fcs >> 8; in safe_prepare_write_buffer()
254 buf[pkt_len - 1] |= fcs & 0xff; in safe_prepare_write_buffer()