Lines Matching refs:scsi_bytes
127 size_t scsi_bytes; member
261 if (ctx->scsi_bytes == 0) { in msc_process_read()
262 ctx->scsi_bytes = scsi_read_data(lun, ctx->scsi_buf); in msc_process_read()
279 while (ctx->scsi_bytes - ctx->scsi_offset > 0) { in msc_process_read()
280 len = MIN(ctx->scsi_bytes - ctx->scsi_offset, in msc_process_read()
293 if (ctx->scsi_bytes == ctx->scsi_offset) { in msc_process_read()
295 ctx->scsi_bytes = scsi_read_data(lun, ctx->scsi_buf); in msc_process_read()
319 ctx->scsi_bytes = data_len; in msc_process_cbw()
326 __ASSERT_NO_MSG(cmd_is_data_read || ctx->scsi_bytes == 0); in msc_process_cbw()
402 tmp = MIN(len, sizeof(ctx->scsi_buf) - ctx->scsi_bytes); in msc_process_write()
403 memcpy(&ctx->scsi_buf[ctx->scsi_bytes], buf, tmp); in msc_process_write()
404 ctx->scsi_bytes += tmp; in msc_process_write()
411 while ((ctx->scsi_bytes >= scsi_cmd_remaining_data_len(lun)) || in msc_process_write()
412 (ctx->scsi_bytes == sizeof(ctx->scsi_buf))) { in msc_process_write()
413 tmp = scsi_write_data(lun, ctx->scsi_buf, ctx->scsi_bytes); in msc_process_write()
414 __ASSERT(tmp <= ctx->scsi_bytes, in msc_process_write()
418 ctx->scsi_bytes); in msc_process_write()
419 ctx->scsi_bytes = 0; in msc_process_write()
422 tmp, ctx->scsi_bytes); in msc_process_write()
428 ctx->scsi_bytes = 0; in msc_process_write()
437 memmove(ctx->scsi_buf, &ctx->scsi_buf[tmp], ctx->scsi_bytes - tmp); in msc_process_write()
438 ctx->scsi_bytes -= tmp; in msc_process_write()
515 if (ctx->scsi_bytes == 0) { in msc_handle_bulk_in()