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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CC1DC433F5 for ; Sun, 10 Oct 2021 14:17:33 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 227476058D for ; Sun, 10 Oct 2021 14:17:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 227476058D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 85D81836F3; Sun, 10 Oct 2021 16:16:43 +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="CoyTmg01"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EAF6D83698; Sun, 10 Oct 2021 16:14:53 +0200 (CEST) Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) (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 21A2183695 for ; Sun, 10 Oct 2021 16:14:43 +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@google.com Received: by mail-oi1-x22d.google.com with SMTP id u69so8454359oie.3 for ; Sun, 10 Oct 2021 07:14:43 -0700 (PDT) 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=cESkKw/gFxpNoPUygkXl1bJ69ecuVQeYTscTYS74X0Q=; b=CoyTmg013Nrn/21/t1cy8uBXBxwBB0XULJlYnmLdBtMYJWdqmY7a30ofmzLpmlOkH6 gdSpjM/vPZWfNLiowNV6PON8jlSLP23SfEOyHgnVy1pp+zMXV37nOmFSEOancfsWNVxP j05/R3u8pa0FIjSqp7NYMXXRympz3vEDpyxlU= 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=cESkKw/gFxpNoPUygkXl1bJ69ecuVQeYTscTYS74X0Q=; b=nLwVeiu3JGJ+2KFJ8LYcVcQ0I/L14B1q5AsjWSJgiybu7ArjfAHAq3L7fru5z1K7E5 n9AoqLaXtLTOgC1zvMGinjqzax2f75pHQBCIvIzEcG8aW0Th/7uQf6roenUE+yxKUG6O Dyli5Szp6GQLfNA9P4ZBj113NiAqcV0IBeJqjYnB20BCeGDyfUY2v+zouMXDGyA1iW1f iberR6yUM7gdsAqwtYY58k5pgAoVYPJEuPqM5SO89T+rSTZxFZ5hd1bw6RWZyg0Kg13l gZDtoJ2HTsEgmz/mth3A/02Rwr5uniO8NltCIauSAElOcKecXOvIqiGXninydSxhTQDL cmMg== X-Gm-Message-State: AOAM533IRbccDF5PJNbhT7Vstx86jq0DWCgF7HwLiKBssnImzI3wU2i3 bYbX57Zl7T1iq0ek3yO4kT1z7ilyt32oVGIm8sEIu0CTmHg= X-Google-Smtp-Source: ABdhPJxJf1Ou49Elq4bR26hLXykMrs+cMoL3x+02GAzTZhzjArkQL+0xylDsIAPj0kugqHd6RMrH9uRDTFgqcZrsx/I= X-Received: by 2002:a54:4818:: with SMTP id j24mr14820794oij.150.1633875281479; Sun, 10 Oct 2021 07:14:41 -0700 (PDT) MIME-Version: 1.0 References: <20211001050228.55183-1-takahiro.akashi@linaro.org> <20211001050228.55183-38-takahiro.akashi@linaro.org> In-Reply-To: <20211001050228.55183-38-takahiro.akashi@linaro.org> From: Simon Glass Date: Sun, 10 Oct 2021 08:14:29 -0600 Message-ID: Subject: Re: [RFC 19/22] dm: blk: call efi's device-removal hook To: AKASHI Takahiro Cc: Heinrich Schuchardt , Alex Graf , Ilias Apalodimas , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 Hi Takahiro, On Thu, 30 Sept 2021 at 23:05, AKASHI Takahiro wrote: > > Adding the callback function, efi_disk_delete(), in block devices's > pre_remove hook will allows for automatically deleting efi_disk objects > per block device. > > This will eliminate any improper efi_disk objects which hold a link to > non-existing udevice structures when associated block devices are physically > un-plugged or udevices are once removed (and re-created) by executing commands > like "scsi rescan." > > Signed-off-by: AKASHI Takahiro > --- > drivers/block/blk-uclass.c | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) Should use event mechanism as mentioned in previous patch. Regards, Simon