Lines Matching refs:bytes_read
114 int r, bytes_read; in smd_pkt_read() local
141 bytes_read = smd_cur_packet_size(smd_pkt_devp->ch); in smd_pkt_read()
142 if (bytes_read == 0 || in smd_pkt_read()
143 bytes_read < smd_read_avail(smd_pkt_devp->ch)) { in smd_pkt_read()
149 if (bytes_read > count) { in smd_pkt_read()
151 pr_info("packet size %d > buffer size %d", bytes_read, count); in smd_pkt_read()
155 r = smd_read(smd_pkt_devp->ch, smd_pkt_devp->rx_buf, bytes_read); in smd_pkt_read()
156 if (r != bytes_read) { in smd_pkt_read()
158 pr_err("smd_read failed to read %d bytes: %d\n", bytes_read, r); in smd_pkt_read()
162 D_DUMP_BUFFER("read: ", bytes_read, smd_pkt_devp->rx_buf); in smd_pkt_read()
163 r = copy_to_user(buf, smd_pkt_devp->rx_buf, bytes_read); in smd_pkt_read()
170 DBG("read complete %d bytes\n", bytes_read); in smd_pkt_read()
173 return bytes_read; in smd_pkt_read()