Lines Matching refs:cbw
122 struct CBW cbw; member
233 if (ctx->cbw.bmCBWFlags & CBW_FLAGS_RESERVED_MASK) { in is_cbw_meaningful()
238 if (ctx->cbw.bCBWLUN >= ctx->registered_luns) { in is_cbw_meaningful()
243 if (ctx->cbw.bCBWCBLength < 1 || ctx->cbw.bCBWCBLength > 16) { in is_cbw_meaningful()
253 struct scsi_ctx *lun = &ctx->luns[ctx->cbw.bCBWLUN]; in msc_process_read()
312 struct scsi_ctx *lun = &ctx->luns[ctx->cbw.bCBWLUN]; in msc_process_cbw()
317 cb_len = scsi_usb_boot_cmd_len(ctx->cbw.CBWCB, ctx->cbw.bCBWCBLength); in msc_process_cbw()
318 data_len = scsi_cmd(lun, ctx->cbw.CBWCB, cb_len, ctx->scsi_buf); in msc_process_cbw()
328 if (ctx->cbw.dCBWDataTransferLength == 0) { in msc_process_cbw()
350 if (ctx->cbw.bmCBWFlags & CBW_FLAGS_DIRECTION_IN) { in msc_process_cbw()
365 } else if (ctx->cbw.bmCBWFlags & CBW_FLAGS_DIRECTION_IN) { in msc_process_cbw()
367 if ((data_len > ctx->cbw.dCBWDataTransferLength) || in msc_process_cbw()
379 if ((data_len > ctx->cbw.dCBWDataTransferLength) || in msc_process_cbw()
396 struct scsi_ctx *lun = &ctx->luns[ctx->cbw.bCBWLUN]; in msc_process_write()
442 if ((ctx->transferred_data >= ctx->cbw.dCBWDataTransferLength) || in msc_process_write()
444 if (ctx->transferred_data < ctx->cbw.dCBWDataTransferLength) { in msc_process_write()
467 memcpy(&ctx->cbw, buf, sizeof(struct CBW)); in msc_handle_bulk_out()
471 ctx->cbw.dCBWDataTransferLength = in msc_handle_bulk_out()
472 sys_le32_to_cpu(ctx->cbw.dCBWDataTransferLength); in msc_handle_bulk_out()
475 ctx->csw.dCSWTag = ctx->cbw.dCBWTag; in msc_handle_bulk_out()
476 ctx->csw.dCSWDataResidue = ctx->cbw.dCBWDataTransferLength; in msc_handle_bulk_out()
512 struct scsi_ctx *lun = &ctx->luns[ctx->cbw.bCBWLUN]; in msc_handle_bulk_in()