Message ID | 20221207085137.445249-42-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=W6WxtOfS; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NRrtH3rD6z23pB for <incoming@patchwork.ozlabs.org>; Wed, 7 Dec 2022 20:03:35 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C42B5856DD; Wed, 7 Dec 2022 09:56:27 +0100 (CET) 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="W6WxtOfS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E6AB685643; Wed, 7 Dec 2022 09:56:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (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 98125856A6 for <u-boot@lists.denx.de>; Wed, 7 Dec 2022 09:56:18 +0100 (CET) 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-pj1-x102d.google.com with SMTP id fa4-20020a17090af0c400b002198d1328a0so3351198pjb.0 for <u-boot@lists.denx.de>; Wed, 07 Dec 2022 00:56:18 -0800 (PST) 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:subject:date :message-id:reply-to; bh=R9MEjfs27ZJAjVeKLv3f7CUxFSjgPUmSmgcQtJ7mSeo=; b=W6WxtOfS0YjCgaSe+MFNR/7a0xUNBrvBLQ1Pq7rKSE+QiWNFrL0od6JQCBGMyHBQPy s1g7Oi2uQw4P9WPAgBYv4qw1DOCZmZtpxxqVHzJj8BEXDeCc51jA9wWk0Ge6Xug7lybv qN25WUBkvgLvre2NoSNiOfrwnwoMK6G2uCesM= 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 :subject:date:message-id:reply-to; bh=R9MEjfs27ZJAjVeKLv3f7CUxFSjgPUmSmgcQtJ7mSeo=; b=u3ECcbPXpiZ8QmCx+hSkb3VeZni4dt8s5UsZDFKBpit1MX4+VJooMzNSdVxxv032wx h/Ty5WLVEF9oXSt6x0RtSfvDNMiUr3K4Qccbb02aZ3lccAobVSUKvVpXTwXUkcN/PyK0 LWp+1YekVp9PBq6+1ikjw+/ylIlUaeJ744MAld9jNwSYzUcXtV5o8FAEyXDIumQQmP5E Hjf/cbvVxxT0wRwuQzcjQTEjrz5GTneWFk9EP2UEoKOVvZHCOxwXpRq1q42tLROUoeXU b9KPIvnTHAzcK1CWpXRS2je9hstQ/GGz9yFMflioXCMm2jHjgjIJbv4YS8IkBICKInsc 00JQ== X-Gm-Message-State: ANoB5pmohYiZizzVX54RGA7+MPtlyycbi2eOFWBbvPxUNUPBJ9tUi51V nRUCN77oHe8wbtqO7krXMWt0qW6cHn+LQjIU X-Google-Smtp-Source: AA0mqf7atNsZCTaN4BR8M9+diseDz11ilZu99w/Lvgru9UoW9BAfsH6LEKuN9WNBOrMZYRVC1pC1Ig== X-Received: by 2002:a17:90a:6c8f:b0:219:661f:9916 with SMTP id y15-20020a17090a6c8f00b00219661f9916mr35493687pjj.200.1670403376810; Wed, 07 Dec 2022 00:56:16 -0800 (PST) Received: from localhost.localdomain ([27.110.126.54]) by smtp.gmail.com with ESMTPSA id l16-20020a170903121000b0018157b415dbsm14145514plh.63.2022.12.07.00.56.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 00:56:16 -0800 (PST) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: U-Boot Custodians <u-boot-custodians@lists.denx.de>, Simon Glass <sjg@chromium.org>, Bin Meng <bmeng.cn@gmail.com> Subject: [PATCH 41/71] virtio: Avoid strange behaviour on removal Date: Wed, 7 Dec 2022 21:51:07 +1300 Message-Id: <20221207085137.445249-42-sjg@chromium.org> X-Mailer: git-send-email 2.39.0.rc0.267.gcb52ba06e7-goog In-Reply-To: <20221207085137.445249-1-sjg@chromium.org> References: <20221207085137.445249-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 <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean |
Series |
bootstd: Allow migration from distro_bootcmd scripts
|
expand
|
diff --git a/drivers/virtio/virtio_sandbox.c b/drivers/virtio/virtio_sandbox.c index 5484ae3a1a0..cf7761c75ee 100644 --- a/drivers/virtio/virtio_sandbox.c +++ b/drivers/virtio/virtio_sandbox.c @@ -167,18 +167,6 @@ static int virtio_sandbox_probe(struct udevice *udev) return 0; } -/* check virtio device driver's remove routine was called to reset the device */ -static int virtio_sandbox_child_post_remove(struct udevice *vdev) -{ - u8 status; - - virtio_get_status(vdev, &status); - if (status) - panic("virtio device was not reset\n"); - - return 0; -} - static const struct dm_virtio_ops virtio_sandbox1_ops = { .get_config = virtio_sandbox_get_config, .set_config = virtio_sandbox_set_config, @@ -203,7 +191,6 @@ U_BOOT_DRIVER(virtio_sandbox1) = { .of_match = virtio_sandbox1_ids, .ops = &virtio_sandbox1_ops, .probe = virtio_sandbox_probe, - .child_post_remove = virtio_sandbox_child_post_remove, .priv_auto = sizeof(struct virtio_sandbox_priv), }; diff --git a/test/dm/virtio_device.c b/test/dm/virtio_device.c index b5c4523a028..fdda4da4178 100644 --- a/test/dm/virtio_device.c +++ b/test/dm/virtio_device.c @@ -100,6 +100,7 @@ DM_TEST(dm_test_virtio_all_ops, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); static int dm_test_virtio_remove(struct unit_test_state *uts) { struct udevice *bus, *dev; + u8 status; /* check probe success */ ut_assertok(uclass_first_device_err(UCLASS_VIRTIO, &bus)); @@ -117,6 +118,8 @@ static int dm_test_virtio_remove(struct unit_test_state *uts) ut_asserteq(-EKEYREJECTED, device_remove(bus, DM_REMOVE_ACTIVE_ALL)); ut_asserteq(false, device_active(dev)); + virtio_get_status(dev, &status); + ut_assertok(status); return 0; }
This device does a check on removal which is better handled in the actual test. Move it. Signed-off-by: Simon Glass <sjg@chromium.org> --- drivers/virtio/virtio_sandbox.c | 13 ------------- test/dm/virtio_device.c | 3 +++ 2 files changed, 3 insertions(+), 13 deletions(-)