]>
git.ipfire.org Git - thirdparty/u-boot.git/blob - include/scsi_emul.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Emulation of enough SCSI commands to find and read from a unit
5 * Copyright 2022 Google LLC
6 * Written by Simon Glass <sjg@chromium.org>
8 * implementations of SCSI functions required so that CONFIG_SCSI can be enabled
16 * struct scsi_emul_info - information for emulating a SCSI device
18 * @vendor: Vendor name
19 * @product: Product name
20 * @block_size: Block size of device in bytes (normally 512)
22 * @phase: Current SCSI phase
23 * @buff_used: Number of bytes ready to transfer back to host
24 * @read_len: Number of bytes of data left in the current read command
25 * @alloc_len: Allocation length from the last incoming command
26 * @transfer_len: Transfer length from CBW header
27 * @buff: Data buffer for outgoing data
29 struct scsi_emul_info
{
30 /* provided by the caller: */
36 /* state maintained by the emulator: */
37 enum scsi_cmd_phase phase
;