]> Git Repo - J-u-boot.git/blob - include/scsi_emul.h
scsi: Move vendor/product info into the shared struct
[J-u-boot.git] / include / scsi_emul.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Emulation of enough SCSI commands to find and read from a unit
4  *
5  * Copyright 2022 Google LLC
6  * Written by Simon Glass <[email protected]>
7  *
8  * implementations of SCSI functions required so that CONFIG_SCSI can be enabled
9  * for sandbox
10  */
11
12 #ifndef __scsi_emul_h
13 #define __scsi_emul_h
14
15 /**
16  * struct scsi_emul_info - information for emulating a SCSI device
17  *
18  * @vendor: Vendor name
19  * @product: Product name
20  *
21  * @phase: Current SCSI phase
22  * @buff_used: Number of bytes ready to transfer back to host
23  * @read_len: Number of bytes of data left in the current read command
24  * @alloc_len: Allocation length from the last incoming command
25  * @transfer_len: Transfer length from CBW header
26  * @buff: Data buffer for outgoing data
27  */
28 struct scsi_emul_info {
29         /* provided by the caller: */
30         void *buff;
31         const char *vendor;
32         const char *product;
33
34         /* state maintained by the emulator: */
35         enum scsi_cmd_phase phase;
36         int buff_used;
37         int read_len;
38         int alloc_len;
39         uint transfer_len;
40 };
41
42 #endif
This page took 0.02864 seconds and 4 git commands to generate.