Home
last modified time | relevance | path

Searched refs:checksum (Results 1 – 25 of 237) sorted by relevance

12345678910

/drivers/platform/chrome/wilco_ec/
Dmailbox.c77 u8 checksum = 0; in wilco_ec_checksum() local
81 checksum += data_bytes[i]; in wilco_ec_checksum()
83 return checksum; in wilco_ec_checksum()
101 rq->checksum = wilco_ec_checksum(rq, sizeof(*rq)); in wilco_ec_prepare()
102 rq->checksum += wilco_ec_checksum(msg->request_data, msg->request_size); in wilco_ec_prepare()
103 rq->checksum = -rq->checksum; in wilco_ec_prepare()
120 u8 checksum; in wilco_ec_transfer() local
152 checksum = cros_ec_lpc_io_bytes_mec(MEC_IO_READ, 0, in wilco_ec_transfer()
155 if (checksum) { in wilco_ec_transfer()
156 dev_dbg(ec->dev, "bad packet checksum 0x%02x\n", rs->checksum); in wilco_ec_transfer()
/drivers/gpu/drm/vboxvideo/
Dvbox_hgsmi.c37 u32 checksum; in hgsmi_checksum() local
39 checksum = hgsmi_hash_process(0, (u8 *)&offset, sizeof(offset)); in hgsmi_checksum()
40 checksum = hgsmi_hash_process(checksum, (u8 *)header, sizeof(*header)); in hgsmi_checksum()
42 checksum = hgsmi_hash_process(checksum, (u8 *)tail, 4); in hgsmi_checksum()
44 return hgsmi_hash_end(checksum); in hgsmi_checksum()
69 t->checksum = hgsmi_checksum(offset, h, t); in hgsmi_buffer_alloc()
/drivers/net/ethernet/intel/igc/
Digc_nvm.c163 u16 checksum = 0; in igc_validate_nvm_checksum() local
173 checksum += nvm_data; in igc_validate_nvm_checksum()
176 if (checksum != (u16)NVM_SUM) { in igc_validate_nvm_checksum()
196 u16 checksum = 0; in igc_update_nvm_checksum() local
206 checksum += nvm_data; in igc_update_nvm_checksum()
208 checksum = (u16)NVM_SUM - checksum; in igc_update_nvm_checksum()
209 ret_val = hw->nvm.ops.write(hw, NVM_CHECKSUM_REG, 1, &checksum); in igc_update_nvm_checksum()
/drivers/net/ethernet/intel/ixgb/
Dixgb_ee.c307 u16 checksum = 0; in ixgb_validate_eeprom_checksum() local
311 checksum += ixgb_read_eeprom(hw, i); in ixgb_validate_eeprom_checksum()
313 if (checksum == (u16) EEPROM_SUM) in ixgb_validate_eeprom_checksum()
330 u16 checksum = 0; in ixgb_update_eeprom_checksum() local
334 checksum += ixgb_read_eeprom(hw, i); in ixgb_update_eeprom_checksum()
336 checksum = (u16) EEPROM_SUM - checksum; in ixgb_update_eeprom_checksum()
338 ixgb_write_eeprom(hw, EEPROM_CHECKSUM_REG, checksum); in ixgb_update_eeprom_checksum()
443 u16 checksum = 0; in ixgb_get_eeprom_data() local
454 checksum += ee_data; in ixgb_get_eeprom_data()
458 if (checksum != (u16) EEPROM_SUM) { in ixgb_get_eeprom_data()
/drivers/acpi/acpica/
Dtbprint.c154 u8 checksum; in acpi_tb_verify_checksum() local
168 checksum = acpi_tb_checksum(ACPI_CAST_PTR(u8, table), length); in acpi_tb_verify_checksum()
172 if (checksum) { in acpi_tb_verify_checksum()
176 table->signature, table->checksum, in acpi_tb_verify_checksum()
177 (u8)(table->checksum - checksum))); in acpi_tb_verify_checksum()
Dtbutils.c86 acpi_gbl_original_dsdt_header.checksum != acpi_gbl_DSDT->checksum) { in acpi_tb_check_dsdt_header()
101 acpi_gbl_original_dsdt_header.checksum = in acpi_tb_check_dsdt_header()
102 acpi_gbl_DSDT->checksum; in acpi_tb_check_dsdt_header()
/drivers/net/wireless/ath/ath9k/
Dar9003_mac.c30 int checksum = 0; in ar9003_set_txdesc() local
41 checksum += val; in ar9003_set_txdesc()
44 checksum += i->link; in ar9003_set_txdesc()
47 checksum += i->buf_addr[0]; in ar9003_set_txdesc()
49 checksum += i->buf_addr[1]; in ar9003_set_txdesc()
51 checksum += i->buf_addr[2]; in ar9003_set_txdesc()
53 checksum += i->buf_addr[3]; in ar9003_set_txdesc()
56 checksum += (val = (i->buf_len[0] << AR_BufLen_S) & AR_BufLen); in ar9003_set_txdesc()
58 checksum += (val = (i->buf_len[1] << AR_BufLen_S) & AR_BufLen); in ar9003_set_txdesc()
60 checksum += (val = (i->buf_len[2] << AR_BufLen_S) & AR_BufLen); in ar9003_set_txdesc()
[all …]
/drivers/mtd/parsers/
Dar7part.c26 unsigned int checksum; member
63 if (header.checksum == LOADER_MAGIC1) in create_mtd_partitions()
65 if (header.checksum == LOADER_MAGIC2) in create_mtd_partitions()
77 switch (header.checksum) { in create_mtd_partitions()
96 printk(KERN_WARNING "Unknown magic: %08x\n", header.checksum); in create_mtd_partitions()
101 if (header.checksum != SQUASHFS_MAGIC) { in create_mtd_partitions()
/drivers/gpu/drm/amd/amdgpu/
Damdgpu_discovery.c145 uint16_t checksum = 0; in amdgpu_discovery_calculate_checksum() local
149 checksum += data[i]; in amdgpu_discovery_calculate_checksum()
151 return checksum; in amdgpu_discovery_calculate_checksum()
168 uint16_t checksum; in amdgpu_discovery_init() local
193 checksum = bhdr->binary_checksum; in amdgpu_discovery_init()
196 size, checksum)) { in amdgpu_discovery_init()
204 checksum = le16_to_cpu(info->checksum); in amdgpu_discovery_init()
214 ihdr->size, checksum)) { in amdgpu_discovery_init()
222 checksum = le16_to_cpu(info->checksum); in amdgpu_discovery_init()
226 ghdr->size, checksum)) { in amdgpu_discovery_init()
Damdgpu_virt.c251 unsigned int checksum) in amd_sriov_msg_checksum() argument
262 pos = (char *)&checksum; in amd_sriov_msg_checksum()
263 for (i = 0; i < sizeof(checksum); ++i) in amd_sriov_msg_checksum()
427 uint32_t checksum; in amdgpu_virt_read_pf2vf_data() local
440 checksum = ((struct amdgim_pf2vf_info_v1 *)pf2vf_info)->checksum; in amdgpu_virt_read_pf2vf_data()
443 adev->virt.fw_reserve.checksum_key, checksum); in amdgpu_virt_read_pf2vf_data()
444 if (checksum != checkval) { in amdgpu_virt_read_pf2vf_data()
454 checksum = ((struct amd_sriov_msg_pf2vf_info *)pf2vf_info)->checksum; in amdgpu_virt_read_pf2vf_data()
457 0, checksum); in amdgpu_virt_read_pf2vf_data()
458 if (checksum != checkval) { in amdgpu_virt_read_pf2vf_data()
[all …]
/drivers/net/ethernet/intel/ixgbe/
Dixgbe_x540.c310 u16 checksum = 0; in ixgbe_calc_eeprom_checksum_X540() local
329 checksum += word; in ixgbe_calc_eeprom_checksum_X540()
365 checksum += word; in ixgbe_calc_eeprom_checksum_X540()
369 checksum = (u16)IXGBE_EEPROM_SUM - checksum; in ixgbe_calc_eeprom_checksum_X540()
371 return (s32)checksum; in ixgbe_calc_eeprom_checksum_X540()
386 u16 checksum; in ixgbe_validate_eeprom_checksum_X540() local
393 status = hw->eeprom.ops.read(hw, 0, &checksum); in ixgbe_validate_eeprom_checksum_X540()
406 checksum = (u16)(status & 0xffff); in ixgbe_validate_eeprom_checksum_X540()
419 if (read_checksum != checksum) { in ixgbe_validate_eeprom_checksum_X540()
426 *checksum_val = checksum; in ixgbe_validate_eeprom_checksum_X540()
[all …]
/drivers/media/test-drivers/vivid/
Dvivid-vbi-gen.c179 u8 checksum, i; in vivid_vbi_gen_set_time_of_day() local
194 for (checksum = i = 0; i <= 8; i++) in vivid_vbi_gen_set_time_of_day()
195 checksum += packet[i] & 0x7f; in vivid_vbi_gen_set_time_of_day()
196 packet[9] = calc_parity(0x100 - checksum); in vivid_vbi_gen_set_time_of_day()
197 checksum = 0; in vivid_vbi_gen_set_time_of_day()
206 for (checksum = 0, i = 10; i <= 14; i++) in vivid_vbi_gen_set_time_of_day()
207 checksum += packet[i] & 0x7f; in vivid_vbi_gen_set_time_of_day()
208 packet[15] = calc_parity(0x100 - checksum); in vivid_vbi_gen_set_time_of_day()
/drivers/scsi/aic7xxx/
Daic7xxx_93cx6.c303 uint32_t checksum; in ahc_verify_cksum() local
307 checksum = 0; in ahc_verify_cksum()
311 checksum = checksum + scarray[i]; in ahc_verify_cksum()
312 if (checksum == 0 in ahc_verify_cksum()
313 || (checksum & 0xFFFF) != sc->checksum) { in ahc_verify_cksum()
/drivers/nfc/s3fwrn5/
Dnci.c85 u32 checksum; in s3fwrn5_nci_rf_configure() local
95 checksum = 0; in s3fwrn5_nci_rf_configure()
97 checksum += *((u32 *)(fw->data+i)); in s3fwrn5_nci_rf_configure()
140 stop_rfreg.checksum = checksum & 0xffff; in s3fwrn5_nci_rf_configure()
/drivers/fsi/
Dfsi-occ.c135 u16 checksum = 0; in occ_write() local
174 checksum += cmd[i]; in occ_write()
176 cmd[data_length + 4] = checksum >> 8; in occ_write()
177 cmd[data_length + 5] = checksum & 0xFF; in occ_write()
221 u16 checksum; in occ_verify_checksum() local
224 checksum = resp->seq_no; in occ_verify_checksum()
225 checksum += resp->cmd_type; in occ_verify_checksum()
226 checksum += resp->return_status; in occ_verify_checksum()
227 checksum += (data_length >> 8) + (data_length & 0xFF); in occ_verify_checksum()
230 checksum += resp->data[i]; in occ_verify_checksum()
[all …]
/drivers/gpu/drm/amd/display/modules/info_packet/
Dinfo_packet.c429 uint8_t checksum = 0; in mod_build_hf_vsif_infopacket() local
485 checksum += info_packet->hb0; in mod_build_hf_vsif_infopacket()
486 checksum += info_packet->hb1; in mod_build_hf_vsif_infopacket()
487 checksum += info_packet->hb2; in mod_build_hf_vsif_infopacket()
490 checksum += info_packet->sb[i]; in mod_build_hf_vsif_infopacket()
492 info_packet->sb[0] = (uint8_t) (0x100 - checksum); in mod_build_hf_vsif_infopacket()
/drivers/media/usb/dvb-usb/
Daf9005.c561 u16 checksum; in af9005_boot_packet() local
573 checksum = buf[4] + buf[5]; in af9005_boot_packet()
574 buf[6] = (u8) ((checksum >> 8) & 0xff); in af9005_boot_packet()
575 buf[7] = (u8) (checksum & 0xff); in af9005_boot_packet()
582 checksum = buf[4] + buf[5]; in af9005_boot_packet()
583 buf[6] = (u8) ((checksum >> 8) & 0xff); in af9005_boot_packet()
584 buf[7] = (u8) (checksum & 0xff); in af9005_boot_packet()
595 checksum = 0; in af9005_boot_packet()
597 checksum += buf[i]; in af9005_boot_packet()
598 buf[10] = (u8) ((checksum >> 8) & 0xff); in af9005_boot_packet()
[all …]
/drivers/md/
Ddm-bow.c20 u32 checksum; member
276 u32 *checksum) in copy_data() argument
285 if (checksum) in copy_data()
286 *checksum = sector_to_page(bc, source->sector); in copy_data()
300 if (checksum) in copy_data()
301 *checksum = crc32(*checksum, read, bc->block_size); in copy_data()
326 unsigned int size, u32 checksum);
332 u32 checksum = 0; in backup_log_sector() local
361 ret = copy_data(bc, first_br, free_br, &checksum); in backup_log_sector()
368 range_size(first_br), checksum); in backup_log_sector()
[all …]
/drivers/net/ethernet/intel/e1000e/
Dnvm.c549 u16 checksum = 0; in e1000e_validate_nvm_checksum_generic() local
558 checksum += nvm_data; in e1000e_validate_nvm_checksum_generic()
561 if (checksum != (u16)NVM_SUM) { in e1000e_validate_nvm_checksum_generic()
580 u16 checksum = 0; in e1000e_update_nvm_checksum_generic() local
589 checksum += nvm_data; in e1000e_update_nvm_checksum_generic()
591 checksum = (u16)NVM_SUM - checksum; in e1000e_update_nvm_checksum_generic()
592 ret_val = e1000_write_nvm(hw, NVM_CHECKSUM_REG, 1, &checksum); in e1000e_update_nvm_checksum_generic()
Dmanage.c123 hdr_csum = hdr->checksum; in e1000e_enable_tx_pkt_filtering()
124 hdr->checksum = 0; in e1000e_enable_tx_pkt_filtering()
157 hdr->checksum = e1000_calculate_checksum((u8 *)hdr, length); in e1000_mng_write_cmd_header()
259 hdr.checksum = 0; in e1000e_mng_write_dhcp_info()
268 sizeof(hdr), &(hdr.checksum)); in e1000e_mng_write_dhcp_info()
/drivers/nvdimm/
Dbtt_devs.c248 u64 checksum; in nd_btt_arena_is_valid() local
257 checksum = le64_to_cpu(super->checksum); in nd_btt_arena_is_valid()
258 super->checksum = 0; in nd_btt_arena_is_valid()
259 if (checksum != nd_sb_checksum((struct nd_gen_sb *) super)) in nd_btt_arena_is_valid()
261 super->checksum = cpu_to_le64(checksum); in nd_btt_arena_is_valid()
Dlabel.c151 sum_save = __le64_to_cpu(nsindex[i]->checksum); in __nd_label_validate()
152 nsindex[i]->checksum = __cpu_to_le64(0); in __nd_label_validate()
154 nsindex[i]->checksum = __cpu_to_le64(sum_save); in __nd_label_validate()
357 if (namespace_label_has(ndd, checksum)) { in slot_valid()
360 sum_save = __le64_to_cpu(nd_label->checksum); in slot_valid()
361 nd_label->checksum = __cpu_to_le64(0); in slot_valid()
363 nd_label->checksum = __cpu_to_le64(sum_save); in slot_valid()
643 u64 checksum; in nd_label_write_index() local
674 nsindex->checksum = __cpu_to_le64(0); in nd_label_write_index()
684 checksum = nd_fletcher64(nsindex, sizeof_namespace_index(ndd), 1); in nd_label_write_index()
[all …]
/drivers/mfd/
Drave-sp.c168 const struct rave_sp_checksum *checksum; member
284 const size_t checksum_length = sp->variant->checksum->length; in rave_sp_write()
296 sp->variant->checksum->subroutine(data, data_size, crc); in rave_sp_write()
441 const size_t checksum_length = sp->variant->checksum->length; in rave_sp_receive_frame()
460 sp->variant->checksum->subroutine(data, payload_length, in rave_sp_receive_frame()
731 .checksum = &rave_sp_checksum_ccitt,
739 .checksum = &rave_sp_checksum_8b2c,
747 .checksum = &rave_sp_checksum_ccitt,
/drivers/gpu/drm/panel/
Dpanel-olimex-lcd-olinuxino.c58 u32 checksum; member
210 u32 checksum, i; in lcd_olinuxino_probe() local
242 checksum = ~crc32(~0, (u8 *)&lcd->eeprom, 252); in lcd_olinuxino_probe()
243 if (checksum != lcd->eeprom.checksum) { in lcd_olinuxino_probe()
/drivers/iio/chemical/
Dpms7003.c196 u16 checksum = (PMS7003_MAGIC >> 8) + (u8)(PMS7003_MAGIC & 0xff) + in pms7003_calc_checksum() local
201 checksum += frame->data[i]; in pms7003_calc_checksum()
203 return checksum; in pms7003_calc_checksum()
209 u16 checksum = get_unaligned_be16(frame->data + offset); in pms7003_frame_is_okay() local
211 return checksum == pms7003_calc_checksum(frame); in pms7003_frame_is_okay()

12345678910