Home
last modified time | relevance | path

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

12

/drivers/usb/misc/
Didmouse.c131 int bytes_read; in idmouse_create_image() local
136 bytes_read = sizeof(HEADER)-1; in idmouse_create_image()
165 while (bytes_read < IMGSIZE) { in idmouse_create_image()
168 dev->bulk_in_buffer + bytes_read, in idmouse_create_image()
183 bytes_read += bulk_read; in idmouse_create_image()
192 for (bytes_read = sizeof(HEADER)-1 + WIDTH-1; bytes_read < IMGSIZE; bytes_read += WIDTH) in idmouse_create_image()
193 if (dev->bulk_in_buffer[bytes_read] != 0x00) in idmouse_create_image()
197 for (bytes_read = IMGSIZE-WIDTH; bytes_read < IMGSIZE-1; bytes_read++) in idmouse_create_image()
198 if (dev->bulk_in_buffer[bytes_read] != 0xFF) in idmouse_create_image()
203 bytes_read); in idmouse_create_image()
Dadutux.c345 size_t bytes_read = 0; in adu_read() local
390 bytes_read += (amount - i); in adu_read()
393 retval = bytes_read ? bytes_read : -EFAULT; in adu_read()
442 retval = bytes_read ? bytes_read : -ENOMEM; in adu_read()
467 retval = bytes_read ? bytes_read : -ETIMEDOUT; in adu_read()
475 retval = bytes_read ? bytes_read : -EINTR; in adu_read()
482 retval = bytes_read; in adu_read()
Dyurex.c410 int bytes_read = 0; in yurex_read() local
423 bytes_read = snprintf(in_buffer, 20, "%lld\n", dev->bbu); in yurex_read()
426 if (*ppos < bytes_read) { in yurex_read()
427 if (copy_to_user(buffer, in_buffer + *ppos, bytes_read - *ppos)) in yurex_read()
430 retval = bytes_read - *ppos; in yurex_read()
431 *ppos += bytes_read; in yurex_read()
Dftdi-elan.c666 int bytes_read = 0; in ftdi_elan_read() local
678 if (bytes_read < m) { in ftdi_elan_read()
680 } else if (bytes_read > m) { in ftdi_elan_read()
686 bytes_read += 1; in ftdi_elan_read()
690 return bytes_read; in ftdi_elan_read()
705 } else if (bytes_read > 0) { in ftdi_elan_read()
706 return bytes_read; in ftdi_elan_read()
713 return bytes_read; in ftdi_elan_read()
717 return bytes_read; in ftdi_elan_read()
944 int bytes_read = 0; in ftdi_elan_respond_engine() local
[all …]
Dusblcd.c140 int bytes_read; in lcd_read() local
150 &bytes_read, 10000); in lcd_read()
154 if (copy_to_user(buffer, dev->bulk_in_buffer, bytes_read)) in lcd_read()
157 retval = bytes_read; in lcd_read()
/drivers/net/wireless/ath/ath9k/
Drng.c74 int bytes_read; in ath9k_rng_kthread() local
84 bytes_read = ath9k_rng_data_read(sc, rng_buf, in ath9k_rng_kthread()
86 if (unlikely(!bytes_read)) { in ath9k_rng_kthread()
95 add_hwgenerator_randomness((void *)rng_buf, bytes_read, in ath9k_rng_kthread()
96 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()
72 if (bytes_read < SPECTRAL_HT20_SAMPLE_LEN && max_index < 1) in ath_cmn_max_idx_verify_ht20_fft()
82 ath_cmn_max_idx_verify_ht20_40_fft(u8 *sample_end, int bytes_read) in ath_cmn_max_idx_verify_ht20_40_fft() argument
94 if (bytes_read < SPECTRAL_HT20_40_SAMPLE_LEN - 1) in ath_cmn_max_idx_verify_ht20_40_fft()
116 if (bytes_read < SPECTRAL_HT20_40_SAMPLE_LEN && in ath_cmn_max_idx_verify_ht20_40_fft()
/drivers/firmware/
Ddell_rbu.c263 int length, int bytes_read, int *list_read_count) in do_packet_read() argument
273 if (*list_read_count > bytes_read) { in do_packet_read()
275 j = newpacket->length - (*list_read_count - bytes_read); in do_packet_read()
282 if (length > (*list_read_count - bytes_read)) in do_packet_read()
287 bytes_copied = (*list_read_count - bytes_read); in do_packet_read()
301 int bytes_read = 0; in packet_read_list() local
310 bytes_read = rbu_data.packet_read_count; in packet_read_list()
315 remaining_bytes, bytes_read, &temp_count); in packet_read_list()
317 bytes_read += bytes_copied; in packet_read_list()
329 *pread_length = bytes_read - rbu_data.packet_read_count; in packet_read_list()
[all …]
/drivers/mtd/
Dbcm47xxpart.c68 size_t bytes_read; in bcm47xxpart_trx_data_part_name() local
71 err = mtd_read(master, offset, sizeof(buf), &bytes_read, in bcm47xxpart_trx_data_part_name()
93 size_t bytes_read; in bcm47xxpart_parse() local
135 &bytes_read, (uint8_t *)buf); in bcm47xxpart_parse()
259 err = mtd_read(master, offset + 0x8000, 0x4, &bytes_read, in bcm47xxpart_parse()
283 err = mtd_read(master, offset, 0x4, &bytes_read, in bcm47xxpart_parse()
/drivers/char/hw_random/
Dcore.c87 int bytes_read; in add_early_randomness() local
91 bytes_read = rng_get_data(rng, rng_buffer, size, 1); in add_early_randomness()
93 if (bytes_read > 0) in add_early_randomness()
94 add_device_randomness(rng_buffer, bytes_read); in add_early_randomness()
227 int bytes_read, len; in rng_dev_read() local
246 bytes_read = rng_get_data(rng, rng_buffer, in rng_dev_read()
249 if (bytes_read < 0) { in rng_dev_read()
250 err = bytes_read; in rng_dev_read()
253 data_avail = bytes_read; in rng_dev_read()
/drivers/net/ethernet/cavium/liquidio/
Docteon_console.c464 s32 bytes_read) in output_console_line() argument
470 for (i = 0; i < bytes_read; i++) { in output_console_line()
488 if (line != &console_buffer[bytes_read]) { in output_console_line()
489 console_buffer[bytes_read] = '\0'; in output_console_line()
496 s32 bytes_read, tries, total_read; in check_console() local
511 bytes_read = in check_console()
514 if (bytes_read > 0) { in check_console()
515 total_read += bytes_read; in check_console()
520 console_buffer, bytes_read); in check_console()
522 } else if (bytes_read < 0) { in check_console()
[all …]
/drivers/ps3/
Dps3-vuart.c394 unsigned int bytes, u64 *bytes_read) in ps3_vuart_raw_read() argument
402 ps3_mm_phys_to_lpar(__pa(buf)), bytes, bytes_read); in ps3_vuart_raw_read()
410 priv->stats.bytes_read += *bytes_read; in ps3_vuart_raw_read()
413 *bytes_read, bytes, priv->stats.bytes_read); in ps3_vuart_raw_read()
460 priv->stats.bytes_read -= bytes_waiting; in ps3_vuart_clear_rx_bytes()
617 unsigned long bytes_read; in ps3_vuart_read() local
640 bytes_read = min((unsigned int)(lb->tail - lb->head), bytes); in ps3_vuart_read()
642 memcpy(buf, lb->head, bytes_read); in ps3_vuart_read()
643 buf += bytes_read; in ps3_vuart_read()
644 bytes -= bytes_read; in ps3_vuart_read()
[all …]
/drivers/media/rc/
Dredrat3.c231 u16 bytes_read; member
640 rr3->bytes_read = len; in redrat3_read_packet_start()
642 rr3->bytes_read, pktlen); in redrat3_read_packet_start()
656 if (len + rr3->bytes_read > sizeof(rr3->irdata)) { in redrat3_read_packet_continue()
658 rr3->bytes_read = 0; in redrat3_read_packet_continue()
662 memcpy(irdata + rr3->bytes_read, rr3->bulk_in_buf, len); in redrat3_read_packet_continue()
664 rr3->bytes_read += len; in redrat3_read_packet_continue()
665 dev_dbg(rr3->dev, "bytes_read %d, pktlen %d\n", rr3->bytes_read, in redrat3_read_packet_continue()
676 if (rr3->bytes_read == 0 && len >= sizeof(struct redrat3_header)) { in redrat3_get_ir_data()
678 } else if (rr3->bytes_read != 0) { in redrat3_get_ir_data()
[all …]
/drivers/char/
Dppdev.c128 ssize_t bytes_read = 0; in pp_read() local
153 while (bytes_read == 0) { in pp_read()
169 bytes_read = (*fn)(pport, kbuffer, need, flags); in pp_read()
171 bytes_read = parport_read(pport, kbuffer, need); in pp_read()
174 if (bytes_read != 0) in pp_read()
178 bytes_read = -EAGAIN; in pp_read()
183 bytes_read = -ERESTARTSYS; in pp_read()
192 if (bytes_read > 0 && copy_to_user(buf, kbuffer, bytes_read)) in pp_read()
193 bytes_read = -EFAULT; in pp_read()
197 return bytes_read; in pp_read()
/drivers/tty/serial/
Dsunhv.c124 unsigned long bytes_read, i; in receive_chars_read() local
125 long stat = sun4v_con_read(ra, PAGE_SIZE, &bytes_read); in receive_chars_read()
128 bytes_read = 0; in receive_chars_read()
135 bytes_read = 1; in receive_chars_read()
152 for (i = 0; i < bytes_read; i++) in receive_chars_read()
159 port->icount.rx += bytes_read; in receive_chars_read()
162 bytes_read); in receive_chars_read()
/drivers/pci/hotplug/
Dacpiphp_ibm.c373 int bytes_read = -EINVAL; in ibm_read_apci_table() local
379 bytes_read = ibm_get_table_from_acpi(&table); in ibm_read_apci_table()
380 if (bytes_read > 0 && bytes_read <= size) in ibm_read_apci_table()
381 memcpy(buffer, table, bytes_read); in ibm_read_apci_table()
384 return bytes_read; in ibm_read_apci_table()
/drivers/gpu/drm/omapdrm/displays/
Dconnector-dvi.c181 int r, l, bytes_read; in dvic_read_edid() local
191 bytes_read = l; in dvic_read_edid()
202 bytes_read += l; in dvic_read_edid()
205 return bytes_read; in dvic_read_edid()
/drivers/video/fbdev/omap2/omapfb/displays/
Dconnector-dvi.c180 int r, l, bytes_read; in dvic_read_edid() local
190 bytes_read = l; in dvic_read_edid()
201 bytes_read += l; in dvic_read_edid()
204 return bytes_read; in dvic_read_edid()
/drivers/net/wireless/intel/iwlwifi/mvm/
Dfw-dbg.c77 ssize_t bytes_read; in iwl_mvm_read_coredump() local
81 bytes_read = min_t(ssize_t, count, in iwl_mvm_read_coredump()
84 bytes_read); in iwl_mvm_read_coredump()
85 offset += bytes_read; in iwl_mvm_read_coredump()
86 count -= bytes_read; in iwl_mvm_read_coredump()
89 return bytes_read; in iwl_mvm_read_coredump()
91 bytes_read = 0; in iwl_mvm_read_coredump()
95 return bytes_read; in iwl_mvm_read_coredump()
100 memcpy(buffer + bytes_read, in iwl_mvm_read_coredump()
104 return bytes_read + bytes_read_trans; in iwl_mvm_read_coredump()
/drivers/usb/misc/sisusbvga/
Dsisusb.c450 void *kernbuffer, char __user *userbuffer, ssize_t *bytes_read, in sisusb_recv_bulk_msg() argument
458 (*bytes_read) = 0; in sisusb_recv_bulk_msg()
501 (*bytes_read) += thispass; in sisusb_recv_bulk_msg()
522 return ((*bytes_read) == len) ? 0 : -EIO; in sisusb_recv_bulk_msg()
1109 ssize_t *bytes_read) in sisusb_read_mem_bulk() argument
1116 (*bytes_read = 0); in sisusb_read_mem_bulk()
1126 (*bytes_read)++; in sisusb_read_mem_bulk()
1139 (*bytes_read) += 2; in sisusb_read_mem_bulk()
1153 (*bytes_read) += 3; in sisusb_read_mem_bulk()
1179 (*bytes_read) += 4; in sisusb_read_mem_bulk()
[all …]
/drivers/media/dvb-core/
Ddvb_ca_en50221.c621 int bytes_read; in dvb_ca_en50221_read_data() local
656 bytes_read = status << 8; in dvb_ca_en50221_read_data()
659 bytes_read |= status; in dvb_ca_en50221_read_data()
663 if (bytes_read > ca->slot_info[slot].link_buf_size) { in dvb_ca_en50221_read_data()
665 ca->dvbdev->adapter->num, bytes_read, ca->slot_info[slot].link_buf_size); in dvb_ca_en50221_read_data()
670 if (bytes_read < 2) { in dvb_ca_en50221_read_data()
678 if (bytes_read > ecount) { in dvb_ca_en50221_read_data()
687 for (i = 0; i < bytes_read; i++) { in dvb_ca_en50221_read_data()
711 dvb_ringbuffer_pkt_write(&ca->slot_info[slot].rx_buffer, buf, bytes_read); in dvb_ca_en50221_read_data()
713 memcpy(ebuf, buf, bytes_read); in dvb_ca_en50221_read_data()
[all …]
/drivers/net/ethernet/qualcomm/
Dqca_spi.c294 u32 bytes_read; in qcaspi_receive() local
331 bytes_read = qcaspi_read_legacy(qca, qca->rx_buffer, in qcaspi_receive()
334 bytes_read = qcaspi_read_burst(qca, qca->rx_buffer, in qcaspi_receive()
339 available, bytes_read); in qcaspi_receive()
341 if (bytes_read) { in qcaspi_receive()
342 available -= bytes_read; in qcaspi_receive()
350 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()
/drivers/firmware/broadcom/
Dbcm47xx_nvram.c143 size_t bytes_read; in nvram_init() local
150 err = mtd_read(mtd, 0, sizeof(header), &bytes_read, (uint8_t *)&header); in nvram_init()
/drivers/media/usb/usbvision/
Dusbvision-video.c972 frame->bytes_read = 0; in usbvision_read()
978 frame->index, frame->bytes_read, frame->scanlength); in usbvision_read()
981 if ((count + frame->bytes_read) > (unsigned long)frame->scanlength) in usbvision_read()
982 count = frame->scanlength - frame->bytes_read; in usbvision_read()
984 if (copy_to_user(buf, frame->data + frame->bytes_read, count)) in usbvision_read()
987 frame->bytes_read += count; in usbvision_read()
990 (unsigned long)count, frame->bytes_read); in usbvision_read()
997 frame->bytes_read = 0; in usbvision_read()
1002 if (frame->bytes_read >= frame->scanlength) { in usbvision_read()
1004 frame->bytes_read = 0; in usbvision_read()

12