Lines Matching defs:checksum
65 u8 data[OCC_RESP_DATA_BYTES + 2]; /* two bytes checksum */
236 /* Fetch the two bytes after the data for the checksum. */
238 u16 checksum;
241 checksum = resp->seq_no;
242 checksum += resp->cmd_type;
243 checksum += resp->return_status;
244 checksum += (data_length >> 8) + (data_length & 0xFF);
247 checksum += resp->data[i];
249 if (checksum != checksum_resp) {
250 dev_err(occ->dev, "Bad checksum: %04x!=%04x\n", checksum,
319 u8 seq_no, u16 checksum)
358 * bytes with the checksum.
361 byte_buf[len - 2] = checksum >> 8;
362 byte_buf[len - 1] = checksum & 0xff;
476 u16 checksum = 0;
497 checksum += byte_request[i];
523 checksum += seq_no;
525 rc = occ_putsram(occ, request, req_len, seq_no, checksum);
559 * bytes checksum