From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 835FDC0502A for ; Sat, 27 Aug 2022 15:17:57 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DC40884909; Sat, 27 Aug 2022 17:16:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="hO+kECFM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E418884946; Sat, 27 Aug 2022 17:16:24 +0200 (CEST) Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1053984934 for ; Sat, 27 Aug 2022 17:16:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-11e9a7135easo3153073fac.6 for ; Sat, 27 Aug 2022 08:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=uDmMcfMk7zg7iSWfJS97rhrlMZsYT+9m+sxj6ikBv8s=; b=hO+kECFMYUf6q5D8nQiCIhQqd54D7dq4en7Gd6DN7l1YScYn+DTeN2SCXtvxmTc87I /jyvx4J4y+pDsabu70OrgeuiFtBy0L+9z2vEEDfubpx52CalXc5yyIX4RkfsOYMHrbpB F80aZXBVJkH81btSqcl8FOB9Qmyjf/Fj2A6Pg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=uDmMcfMk7zg7iSWfJS97rhrlMZsYT+9m+sxj6ikBv8s=; b=5GkpNpWNNV7blnWEkQzsVpwzncZi/dFaNOaOJoI8cAl4RK4PPjxGaHdwstZ0SYF0RK jWanRfDoWkZqfpQiNEdELcv14UIwLciI2MzMKBHuABrBGoKijT2rk2ja1xESLr03z7ZN nmxNIESwmbhosO3jrASGLlPkMaEdWNAw51KF7qZJDh2l4m00DHhqPjNinPhZpmxQ7I+y EacOf0C10wrXvN3YDdZW+syg354DnQ05ouny94VcGvfKbcKzaQldxkPfnH1AJTxQ6Lax NGHgpQVCT7vBsNaugpRRDyDdoYGJXL4COb+YWX2BghG1xV3v5LxRo/ebNayr5qjdyxp1 p03A== X-Gm-Message-State: ACgBeo2loMYJW2Xru+EUKxzwWcKtqen2+JiGim2xUkPjHdIgTtI3QJhB lFm4pm+fewGYEZePCB+NDgOSuskdIy0IaA== X-Google-Smtp-Source: AA6agR6/kWyy9jSrr5N+qPL2PnlwHNhz7HD39IbH88eUsQprMkQlIANg3RrhChPSz50d1tTAkW+P5A== X-Received: by 2002:a05:6870:1787:b0:11c:eb96:7748 with SMTP id r7-20020a056870178700b0011ceb967748mr4074149oae.63.1661613352188; Sat, 27 Aug 2022 08:15:52 -0700 (PDT) Received: from sjg1.lan (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id e9-20020acab509000000b00344a22e71a9sm2466876oif.9.2022.08.27.08.15.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Aug 2022 08:15:51 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass , Andrew Scull , Heinrich Schuchardt , Marek Vasut , Rob Herring , Sean Anderson , Stefan Roese Subject: [PATCH 11/15] sandbox: scsi: Move structs to header file Date: Sat, 27 Aug 2022 09:15:09 -0600 Message-Id: <20220827151513.736395-12-sjg@chromium.org> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog In-Reply-To: <20220827151513.736395-1-sjg@chromium.org> References: <20220827151513.736395-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Move these to the SCSI header file so we can access them from multiple emulators. Signed-off-by: Simon Glass --- 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 { + 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 * -- 2.37.2.672.g94769d06f0-goog