Lines Matching refs:lun

253 	struct scsi_ctx *lun = &ctx->luns[ctx->cbw.bCBWLUN];  in msc_process_read()  local
262 ctx->scsi_bytes = scsi_read_data(lun, ctx->scsi_buf); in msc_process_read()
295 ctx->scsi_bytes = scsi_read_data(lun, ctx->scsi_buf); in msc_process_read()
312 struct scsi_ctx *lun = &ctx->luns[ctx->cbw.bCBWLUN]; in msc_process_cbw() local
318 data_len = scsi_cmd(lun, ctx->cbw.CBWCB, cb_len, ctx->scsi_buf); in msc_process_cbw()
321 cmd_is_data_read = scsi_cmd_is_data_read(lun); in msc_process_cbw()
322 cmd_is_data_write = scsi_cmd_is_data_write(lun); in msc_process_cbw()
323 data_len += scsi_cmd_remaining_data_len(lun); in msc_process_cbw()
332 if (scsi_cmd_get_status(lun) == GOOD) { in msc_process_cbw()
358 if (scsi_cmd_get_status(lun) == GOOD) { in msc_process_cbw()
396 struct scsi_ctx *lun = &ctx->luns[ctx->cbw.bCBWLUN]; in msc_process_write() local
400 while ((len > 0) && (scsi_cmd_remaining_data_len(lun) > 0)) { in msc_process_write()
411 while ((ctx->scsi_bytes >= scsi_cmd_remaining_data_len(lun)) || in msc_process_write()
413 tmp = scsi_write_data(lun, ctx->scsi_buf, ctx->scsi_bytes); in msc_process_write()
426 if (scsi_cmd_remaining_data_len(lun) == 0) { in msc_process_write()
443 (scsi_cmd_remaining_data_len(lun) == 0)) { in msc_process_write()
452 if (scsi_cmd_get_status(lun) == GOOD) { in msc_process_write()
512 struct scsi_ctx *lun = &ctx->luns[ctx->cbw.bCBWLUN]; in msc_handle_bulk_in() local
524 if (scsi_cmd_get_status(lun) == GOOD) { in msc_handle_bulk_in()
774 STRUCT_SECTION_FOREACH(usbd_msc_lun, lun) { in msc_bot_init()
776 LOG_ERR("Cannot register LUN %s", lun->disk); in msc_bot_init()
780 scsi_init(&ctx->luns[ctx->registered_luns++], lun->disk, in msc_bot_init()
781 lun->vendor, lun->product, lun->revision); in msc_bot_init()