From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: Simon Glass <sjg@chromium.org>
Cc: Andrew Scull <ascull@google.com>, Marek Vasut <marex@denx.de>,
Rob Herring <rob.herring@calxeda.com>,
Sean Anderson <seanga2@gmail.com>, Stefan Roese <sr@denx.de>,
U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH 11/15] sandbox: scsi: Move structs to header file
Date: Mon, 29 Aug 2022 16:51:37 +0200 [thread overview]
Message-ID: <441979b4-10b0-d4ed-b878-960c02339113@gmx.de> (raw)
In-Reply-To: <20220827151513.736395-12-sjg@chromium.org>
On 8/27/22 17:15, Simon Glass wrote:
> Move these to the SCSI header file so we can access them from multiple
> emulators.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> drivers/usb/emul/sandbox_flash.c | 26 --------------------------
> include/scsi.h | 26 ++++++++++++++++++++++++++
> 2 files changed, 26 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/usb/emul/sandbox_flash.c b/drivers/usb/emul/sandbox_flash.c
> index 7b9a99c1a38..2059fc7fe42 100644
> --- a/drivers/usb/emul/sandbox_flash.c
> +++ b/drivers/usb/emul/sandbox_flash.c
> @@ -57,32 +57,6 @@ struct sandbox_flash_plat {
> struct usb_string flash_strings[STRINGID_COUNT];
> };
>
> -struct scsi_inquiry_resp {
> - u8 type;
> - u8 flags;
> - u8 version;
> - u8 data_format;
> - u8 additional_len;
> - u8 spare[3];
> - char vendor[8];
> - char product[16];
> - char revision[4];
> -};
> -
> -struct scsi_read_capacity_resp {
> - u32 last_block_addr;
> - u32 block_len;
> -};
> -
> -struct __packed scsi_read10_req {
> - u8 cmd;
> - u8 lun_flags;
> - u32 lba;
> - u8 spare;
> - u16 xfer_len;
> - u8 spare2[3];
> -};
> -
> static struct usb_device_descriptor flash_device_desc = {
> .bLength = sizeof(flash_device_desc),
> .bDescriptorType = USB_DT_DEVICE,
> diff --git a/include/scsi.h b/include/scsi.h
> index 5d63963bed0..d8f0d9c7dcd 100644
> --- a/include/scsi.h
> +++ b/include/scsi.h
> @@ -173,6 +173,32 @@ enum scsi_cmd_phase {
> SCSIPH_STATUS,
> };
>
> +struct scsi_inquiry_resp {
Where is the (Sphinx style) description?
Best regards
Heinrich
> + u8 type;
> + u8 flags;
> + u8 version;
> + u8 data_format;
> + u8 additional_len;
> + u8 spare[3];
> + char vendor[8];
> + char product[16];
> + char revision[4];
> +};
> +
> +struct scsi_read_capacity_resp {
> + u32 last_block_addr;
> + u32 block_len;
> +};
> +
> +struct __packed scsi_read10_req {
> + u8 cmd;
> + u8 lun_flags;
> + u32 lba;
> + u8 spare;
> + u16 xfer_len;
> + u8 spare2[3];
> +};
> +
> /**
> * struct scsi_plat - stores information about SCSI controller
> *
next prev parent reply other threads:[~2022-08-29 14:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-27 15:14 [PATCH 00/15] scsi: Convert sandbox SCSI to driver model Simon Glass
2022-08-27 15:14 ` [PATCH 01/15] scsi: Tidy up comments for struct scsi_cmd Simon Glass
2022-08-29 14:49 ` Heinrich Schuchardt
2022-08-27 15:15 ` [PATCH 02/15] sandbox: usb: Rename transfer_len in protocol struct Simon Glass
2022-08-27 15:15 ` [PATCH 03/15] scsi: Move cmd_phase enum to the header Simon Glass
2022-08-29 14:50 ` Heinrich Schuchardt
2022-08-27 15:15 ` [PATCH 04/15] scsi: Move core emulation state into a new struct Simon Glass
2022-08-27 15:15 ` [PATCH 05/15] sandbox: Move buffer to scsi_emul_info Simon Glass
2022-08-27 15:15 ` [PATCH 06/15] scsi: Move vendor/product info into the shared struct Simon Glass
2022-08-27 15:15 ` [PATCH 07/15] sandbox: scsi: Move block size into " Simon Glass
2022-08-27 15:15 ` [PATCH 08/15] sandbox: scsi: Move file " Simon Glass
2022-08-27 15:15 ` [PATCH 09/15] sandbox: scsi: Move reply setup out of helper Simon Glass
2022-08-27 15:15 ` [PATCH 10/15] sandbox: scsi: Remove setup calls from handle_read() Simon Glass
2022-08-27 15:15 ` [PATCH 11/15] sandbox: scsi: Move structs to header file Simon Glass
2022-08-29 14:51 ` Heinrich Schuchardt [this message]
2022-08-27 15:15 ` [PATCH 12/15] sandbox: Enable SCSI for all builds Simon Glass
2022-08-27 15:15 ` [PATCH 13/15] sandbox: scsi: Move request-handling code to scsi_emul Simon Glass
2022-08-27 15:15 ` [PATCH 14/15] sandbox: Convert to use driver model for SCSI Simon Glass
2022-08-27 15:15 ` [PATCH 15/15] sandbox: Add a test " Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=441979b4-10b0-d4ed-b878-960c02339113@gmx.de \
--to=xypron.glpk@gmx.de \
--cc=ascull@google.com \
--cc=marex@denx.de \
--cc=rob.herring@calxeda.com \
--cc=seanga2@gmail.com \
--cc=sjg@chromium.org \
--cc=sr@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).