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 845BDC433EF for ; Mon, 13 Dec 2021 12:52:52 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 076938377D; Mon, 13 Dec 2021 13:52:36 +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="bAfkb0OK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 67ACE8376D; Mon, 13 Dec 2021 13:52:07 +0100 (CET) Received: from mail-ua1-x933.google.com (mail-ua1-x933.google.com [IPv6:2607:f8b0:4864:20::933]) (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 7AF3483759 for ; Mon, 13 Dec 2021 13:51:56 +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@google.com Received: by mail-ua1-x933.google.com with SMTP id i6so28929464uae.6 for ; Mon, 13 Dec 2021 04:51:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6zpJQgCYWy3qUzH94U10OFcVn+ztN8gHDwmnklu/tIw=; b=bAfkb0OKJ3biiqYPN3Dh9wlm9TpcqJHZNMzvGXVtNNRL0VVCIsVYtSH+2Krv96gCLw uG/wySguFvWQ8PJzkp6KGgbPGZQJYNjPiXwtQGPBP/H/pGzl3a/g41a2cdYs7qiT+weN AZbe+B5y9KmOqfXTcYUJNS5Cbd7ZGL4zfhuCI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6zpJQgCYWy3qUzH94U10OFcVn+ztN8gHDwmnklu/tIw=; b=ZqaKTqJ8LsBaag4n5p0bVkhT5g9DbXcXNYedS8MvTyT+TRSqCLryKZ4seREvLVcbsC lUCO2yDXZFXiE8Lx0FOA6rzMIn2/rVk28auLeaEmqwrjch5WvCp9TXhXM5dUudGVfWLo YwEjPTPbmQoOdy1clEzbkukdkIsu44XDS6rt5T6TqaLP+77zRsCWmk7kI3jNRRZrSyOL my4E9GEcdxMQeGJMunYUkxenNmETBTHuurontPAtheNEOCMg7RCEdmRmHJGTW3P6Ptw7 aKK8+cpsTo1xbJShXgC/+uq1NFT9S6NsijIcL2UpLV8UPEpEwmnbVNJTNG8X+vCC4xLK oe3w== X-Gm-Message-State: AOAM533gLpief2d7kB9psIxPEugZV8ipLHRXOvwSITpHTEyhaKcdDUOv H/1JnGlY7PL0MX1S6hojIICPbs5YA7mSR1LN77KVyA== X-Google-Smtp-Source: ABdhPJy8MI39H+cxXAtrdzGVtaJ2Fw636z2apz313qvV4XmHqIzXJU6EwTx9Yj/B9CCOspOSqCwMuoZm2XkoBM6JszI= X-Received: by 2002:a67:e003:: with SMTP id c3mr27411254vsl.51.1639399914922; Mon, 13 Dec 2021 04:51:54 -0800 (PST) MIME-Version: 1.0 References: <20211210064947.73361-1-takahiro.akashi@linaro.org> <20211210064947.73361-11-takahiro.akashi@linaro.org> In-Reply-To: <20211210064947.73361-11-takahiro.akashi@linaro.org> From: Simon Glass Date: Mon, 13 Dec 2021 05:51:44 -0700 Message-ID: Subject: Re: [RFC v2 10/20] virtio: call device_probe() in scanning To: AKASHI Takahiro Cc: xypron.glpk@gmx.de, agraf@csgraf.de, ilias.apalodimas@linaro.org, masami.hiramatsu@linaro.org, u-boot@lists.denx.de Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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.2 at phobos.denx.de X-Virus-Status: Clean On Fri, 10 Dec 2021 at 00:00, AKASHI Takahiro wrote: > > virtio_init() enumerates all the peripherals that are to be materialised > with udevices(UCLASS_VIRIO) and creates particular device instances > (UCLASS_BlK or whatever else) as children. > On the other hand, device_probe() won't be invoked against those resultant > udevices unlike other ordinary device drivers do in the driver model. > > This is particularly incovenient when we want to add "event notification" > callback so that we will be able to automatically create all efi_disk > objects in a later patch. > > With this patch applied, "virtio scan" will work in a similar way > to "scsi rescan", "usb start" or others in term of 'probe' semantics. > > I didn't add this change to virtio_init() itself because this function > may be called in board_init_r() (indrectly in board_late_init()) > before UEFI subsustem is initialized. > > Signed-off-by: AKASHI Takahiro > --- > cmd/virtio.c | 21 +++++++++++++++++++-- > 1 file changed, 19 insertions(+), 2 deletions(-) Reviewed-by: Simon Glass