Home
last modified time | relevance | path

Searched refs:bytes_read (Results 1 – 25 of 45) sorted by relevance

12

/drivers/usb/misc/
Didmouse.c126 int bytes_read; in idmouse_create_image() local
131 bytes_read = sizeof(HEADER)-1; in idmouse_create_image()
160 while (bytes_read < IMGSIZE) { in idmouse_create_image()
163 dev->bulk_in_buffer + bytes_read, in idmouse_create_image()
178 bytes_read += bulk_read; in idmouse_create_image()
187 for (bytes_read = sizeof(HEADER)-1 + WIDTH-1; bytes_read < IMGSIZE; bytes_read += WIDTH) in idmouse_create_image()
188 if (dev->bulk_in_buffer[bytes_read] != 0x00) in idmouse_create_image()
192 for (bytes_read = IMGSIZE-WIDTH; bytes_read < IMGSIZE-1; bytes_read++) in idmouse_create_image()
193 if (dev->bulk_in_buffer[bytes_read] != 0xFF) in idmouse_create_image()
198 bytes_read); in idmouse_create_image()
Dadutux.c346 size_t bytes_read = 0; in adu_read() local
389 bytes_read += amount; in adu_read()
437 retval = bytes_read ? bytes_read : -ENOMEM; in adu_read()
462 retval = bytes_read ? bytes_read : -ETIMEDOUT; in adu_read()
470 retval = bytes_read ? bytes_read : -EINTR; in adu_read()
477 retval = bytes_read; in adu_read()
Dftdi-elan.c662 int bytes_read = 0; in ftdi_elan_read() local
674 if (bytes_read < m) { in ftdi_elan_read()
676 } else if (bytes_read > m) { in ftdi_elan_read()
682 bytes_read += 1; in ftdi_elan_read()
686 return bytes_read; in ftdi_elan_read()
701 } else if (bytes_read > 0) { in ftdi_elan_read()
702 return bytes_read; in ftdi_elan_read()
709 return bytes_read; in ftdi_elan_read()
713 return bytes_read; in ftdi_elan_read()
915 int bytes_read = 0; in ftdi_elan_respond_engine() local
[all …]
Dusblcd.c129 int bytes_read; in lcd_read() local
146 &bytes_read, 10000); in lcd_read()
150 if (copy_to_user(buffer, dev->bulk_in_buffer, bytes_read)) in lcd_read()
153 retval = bytes_read; in lcd_read()
/drivers/net/ethernet/cavium/liquidio/
Docteon_console.c436 s32 bytes_read) in output_console_line() argument
443 for (i = 0; i < bytes_read; i++) { in output_console_line()
471 if (line != &console_buffer[bytes_read]) { in output_console_line()
472 console_buffer[bytes_read] = '\0'; in output_console_line()
481 s32 bytes_read, tries, total_read; in check_console() local
497 bytes_read = in check_console()
500 if (bytes_read > 0) { in check_console()
501 total_read += bytes_read; in check_console()
506 console_buffer, bytes_read); in check_console()
508 } else if (bytes_read < 0) { in check_console()
[all …]
/drivers/char/
Dadi.c57 size_t ver_buf_sz, bytes_read = 0; in adi_read() local
70 while (bytes_read < count) { in adi_read()
80 if (copy_to_user(buf + bytes_read, ver_buf, in adi_read()
86 bytes_read += ver_buf_sz; in adi_read()
89 ver_buf_sz = min(count - bytes_read, in adi_read()
94 (*offp) += bytes_read; in adi_read()
95 ret = bytes_read; in adi_read()
Dppdev.c121 ssize_t bytes_read = 0; in pp_read() local
146 while (bytes_read == 0) { in pp_read()
162 bytes_read = (*fn)(pport, kbuffer, need, flags); in pp_read()
164 bytes_read = parport_read(pport, kbuffer, need); in pp_read()
167 if (bytes_read != 0) in pp_read()
171 bytes_read = -EAGAIN; in pp_read()
176 bytes_read = -ERESTARTSYS; in pp_read()
185 if (bytes_read > 0 && copy_to_user(buf, kbuffer, bytes_read)) in pp_read()
186 bytes_read = -EFAULT; in pp_read()
190 return bytes_read; in pp_read()
/drivers/net/wireless/ath/ath9k/
Drng.c76 int bytes_read; in ath9k_rng_kthread() local
86 bytes_read = ath9k_rng_data_read(sc, rng_buf, in ath9k_rng_kthread()
88 if (unlikely(!bytes_read)) { in ath9k_rng_kthread()
99 add_hwgenerator_randomness((void *)rng_buf, bytes_read, in ath9k_rng_kthread()
100 ATH9K_RNG_ENTROPY(bytes_read)); in ath9k_rng_kthread()
Dcommon-spectral.c40 typedef int (ath_cmn_fft_idx_validator) (u8 *sample_end, int bytes_read);
43 ath_cmn_max_idx_verify_ht20_fft(u8 *sample_end, int bytes_read) in ath_cmn_max_idx_verify_ht20_fft() argument
54 if (bytes_read < SPECTRAL_HT20_SAMPLE_LEN - 1) in ath_cmn_max_idx_verify_ht20_fft()
71 if (bytes_read < SPECTRAL_HT20_SAMPLE_LEN && max_index < 1) in ath_cmn_max_idx_verify_ht20_fft()
81 ath_cmn_max_idx_verify_ht20_40_fft(u8 *sample_end, int bytes_read) in ath_cmn_max_idx_verify_ht20_40_fft() argument
93 if (bytes_read < SPECTRAL_HT20_40_SAMPLE_LEN - 1) in ath_cmn_max_idx_verify_ht20_40_fft()
113 if (bytes_read < SPECTRAL_HT20_40_SAMPLE_LEN && in ath_cmn_max_idx_verify_ht20_40_fft()
/drivers/platform/x86/
Ddell_rbu.c259 int length, int bytes_read, int *list_read_count) in do_packet_read() argument
269 if (*list_read_count > bytes_read) { in do_packet_read()
271 j = newpacket->length - (*list_read_count - bytes_read); in do_packet_read()
278 if (length > (*list_read_count - bytes_read)) in do_packet_read()
283 bytes_copied = (*list_read_count - bytes_read); in do_packet_read()
297 int bytes_read = 0; in packet_read_list() local
306 bytes_read = rbu_data.packet_read_count; in packet_read_list()
311 remaining_bytes, bytes_read, &temp_count); in packet_read_list()
313 bytes_read += bytes_copied; in packet_read_list()
325 *pread_length = bytes_read - rbu_data.packet_read_count; in packet_read_list()
[all …]
/drivers/char/hw_random/
Dcore.c66 int bytes_read; in add_early_randomness() local
70 bytes_read = rng_get_data(rng, rng_buffer, size, 0); in add_early_randomness()
72 if (bytes_read > 0) in add_early_randomness()
73 add_device_randomness(rng_buffer, bytes_read); in add_early_randomness()
206 int bytes_read, len; in rng_dev_read() local
225 bytes_read = rng_get_data(rng, rng_buffer, in rng_dev_read()
228 if (bytes_read < 0) { in rng_dev_read()
229 err = bytes_read; in rng_dev_read()
232 data_avail = bytes_read; in rng_dev_read()
/drivers/mtd/parsers/
Dparser_trx.c32 size_t bytes_read; in parser_trx_data_part_name() local
35 err = mtd_read(master, offset, sizeof(buf), &bytes_read, in parser_trx_data_part_name()
57 size_t bytes_read; in parser_trx_parse() local
66 err = mtd_read(mtd, 0, sizeof(trx), &bytes_read, (uint8_t *)&trx); in parser_trx_parse()
Dbcm47xxpart.c93 size_t bytes_read; in bcm47xxpart_parse() local
134 &bytes_read, (uint8_t *)buf); in bcm47xxpart_parse()
236 err = mtd_read(master, offset + 0x8000, 0x4, &bytes_read, in bcm47xxpart_parse()
260 err = mtd_read(master, offset, 0x4, &bytes_read, in bcm47xxpart_parse()
/drivers/ps3/
Dps3-vuart.c382 unsigned int bytes, u64 *bytes_read) in ps3_vuart_raw_read() argument
390 ps3_mm_phys_to_lpar(__pa(buf)), bytes, bytes_read); in ps3_vuart_raw_read()
398 priv->stats.bytes_read += *bytes_read; in ps3_vuart_raw_read()
401 *bytes_read, bytes, priv->stats.bytes_read); in ps3_vuart_raw_read()
448 priv->stats.bytes_read -= bytes_waiting; in ps3_vuart_clear_rx_bytes()
605 unsigned long bytes_read; in ps3_vuart_read() local
628 bytes_read = min((unsigned int)(lb->tail - lb->head), bytes); in ps3_vuart_read()
630 memcpy(buf, lb->head, bytes_read); in ps3_vuart_read()
631 buf += bytes_read; in ps3_vuart_read()
632 bytes -= bytes_read; in ps3_vuart_read()
[all …]
/drivers/w1/slaves/
Dw1_ds2413.c33 ssize_t bytes_read = -EIO; in state_read() local
59 bytes_read = 1; in state_read()
77 (bytes_read > 0) ? "succeeded" : "error", retries); in state_read()
78 return bytes_read; in state_read()
/drivers/net/ethernet/netronome/nfp/
Dnfp_net_debugdump.c160 int bytes_read; in nfp_net_dump_load_dumpspec() local
174 bytes_read = nfp_rtsym_read(cpp, specsym, 0, dumpspec->data, sym_size); in nfp_net_dump_load_dumpspec()
175 if (bytes_read != sym_size) { in nfp_net_dump_load_dumpspec()
455 int bytes_read; in nfp_dump_csr_range() local
484 bytes_read = nfp_cpp_read(pf->cpp, cpp_id, cpp_rd_addr, in nfp_dump_csr_range()
486 err = bytes_read == reg_sz ? 0 : -EIO; in nfp_dump_csr_range()
606 int bytes_read; in nfp_dump_single_rtsym() local
643 bytes_read = nfp_rtsym_read(pf->cpp, sym, 0, dest, sym_size); in nfp_dump_single_rtsym()
644 if (bytes_read != sym_size) { in nfp_dump_single_rtsym()
645 if (bytes_read >= 0) in nfp_dump_single_rtsym()
[all …]
/drivers/media/rc/
Dredrat3.c228 u16 bytes_read; member
624 rr3->bytes_read = len; in redrat3_read_packet_start()
626 rr3->bytes_read, pktlen); in redrat3_read_packet_start()
640 if (len + rr3->bytes_read > sizeof(rr3->irdata)) { in redrat3_read_packet_continue()
642 rr3->bytes_read = 0; in redrat3_read_packet_continue()
646 memcpy(irdata + rr3->bytes_read, rr3->bulk_in_buf, len); in redrat3_read_packet_continue()
648 rr3->bytes_read += len; in redrat3_read_packet_continue()
649 dev_dbg(rr3->dev, "bytes_read %d, pktlen %d\n", rr3->bytes_read, in redrat3_read_packet_continue()
660 if (rr3->bytes_read == 0 && len >= sizeof(struct redrat3_header)) { in redrat3_get_ir_data()
662 } else if (rr3->bytes_read != 0) { in redrat3_get_ir_data()
[all …]
/drivers/tty/serial/
Dsunhv.c125 unsigned long bytes_read, i; in receive_chars_read() local
126 long stat = sun4v_con_read(ra, PAGE_SIZE, &bytes_read); in receive_chars_read()
129 bytes_read = 0; in receive_chars_read()
139 bytes_read = 1; in receive_chars_read()
156 for (i = 0; i < bytes_read; i++) in receive_chars_read()
164 port->icount.rx += bytes_read; in receive_chars_read()
167 bytes_read); in receive_chars_read()
/drivers/pci/hotplug/
Dacpiphp_ibm.c359 int bytes_read = -EINVAL; in ibm_read_apci_table() local
365 bytes_read = ibm_get_table_from_acpi(&table); in ibm_read_apci_table()
366 if (bytes_read > 0 && bytes_read <= size) in ibm_read_apci_table()
367 memcpy(buffer, table, bytes_read); in ibm_read_apci_table()
370 return bytes_read; in ibm_read_apci_table()
/drivers/nvmem/
Dbcm-ocotp.c167 u32 bytes_read; in bcm_otpc_read() local
171 for (bytes_read = 0; bytes_read < bytes;) { in bcm_otpc_read()
184 bytes_read += sizeof(*buf); in bcm_otpc_read()
/drivers/video/fbdev/omap2/omapfb/displays/
Dconnector-dvi.c177 int r, l, bytes_read; in dvic_read_edid() local
187 bytes_read = l; in dvic_read_edid()
198 bytes_read += l; in dvic_read_edid()
201 return bytes_read; in dvic_read_edid()
/drivers/media/dvb-core/
Ddvb_ca_en50221.c635 int bytes_read; in dvb_ca_en50221_read_data() local
668 bytes_read = status; in dvb_ca_en50221_read_data()
688 bytes_read = status << 8; in dvb_ca_en50221_read_data()
693 bytes_read |= status; in dvb_ca_en50221_read_data()
697 if (bytes_read > sl->link_buf_size) { in dvb_ca_en50221_read_data()
699 ca->dvbdev->adapter->num, bytes_read, in dvb_ca_en50221_read_data()
705 if (bytes_read < 2) { in dvb_ca_en50221_read_data()
713 if (bytes_read > ecount) { in dvb_ca_en50221_read_data()
722 for (i = 0; i < bytes_read; i++) { in dvb_ca_en50221_read_data()
754 dvb_ringbuffer_pkt_write(&sl->rx_buffer, buf, bytes_read); in dvb_ca_en50221_read_data()
[all …]
/drivers/usb/misc/sisusbvga/
Dsisusb.c451 void *kernbuffer, char __user *userbuffer, ssize_t *bytes_read, in sisusb_recv_bulk_msg() argument
459 (*bytes_read) = 0; in sisusb_recv_bulk_msg()
502 (*bytes_read) += thispass; in sisusb_recv_bulk_msg()
523 return ((*bytes_read) == len) ? 0 : -EIO; in sisusb_recv_bulk_msg()
1108 ssize_t *bytes_read) in sisusb_read_mem_bulk() argument
1115 (*bytes_read = 0); in sisusb_read_mem_bulk()
1125 (*bytes_read)++; in sisusb_read_mem_bulk()
1138 (*bytes_read) += 2; in sisusb_read_mem_bulk()
1152 (*bytes_read) += 3; in sisusb_read_mem_bulk()
1178 (*bytes_read) += 4; in sisusb_read_mem_bulk()
[all …]
/drivers/net/ethernet/qualcomm/
Dqca_spi.c345 u32 bytes_read; in qcaspi_receive() local
389 bytes_read = qcaspi_read_legacy(qca, qca->rx_buffer, in qcaspi_receive()
392 bytes_read = qcaspi_read_burst(qca, qca->rx_buffer, in qcaspi_receive()
397 available, bytes_read); in qcaspi_receive()
399 if (bytes_read) { in qcaspi_receive()
400 available -= bytes_read; in qcaspi_receive()
408 while ((bytes_read--) && (qca->rx_skb)) { in qcaspi_receive()
/drivers/i2c/busses/
Di2c-bcm-kona.c331 unsigned int bytes_read = 0; in bcm_kona_i2c_read_fifo() local
336 while (bytes_read < msg->len) { in bcm_kona_i2c_read_fifo()
337 if (msg->len - bytes_read <= MAX_RX_FIFO_SIZE) { in bcm_kona_i2c_read_fifo()
339 bytes_to_read = msg->len - bytes_read; in bcm_kona_i2c_read_fifo()
347 bytes_read += bytes_to_read; in bcm_kona_i2c_read_fifo()

12