public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 26/32] dm: usb: Unbind old block devices when shutting down USB
Date: Tue, 01 Mar 2016 00:05:08 +0100	[thread overview]
Message-ID: <56D4CEA4.5020203@denx.de> (raw)
In-Reply-To: <1456784765-10788-27-git-send-email-sjg@chromium.org>

On 02/29/2016 11:25 PM, Simon Glass wrote:
> We don't want old block devices hanging around since they can still appear
> visible in some way.

OK

> Possibly we should unbind all devices which don't cause problems by being
> unbound. Most likely we can remove everything except USB controllers, hubs
> and emulators. We can consider that later.

Can you please expand on this bit of the commit message ? It's not very
clear.

Thanks!

> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v2: None
> 
>  drivers/usb/host/usb-uclass.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
> index 50538e0..69c9a50 100644
> --- a/drivers/usb/host/usb-uclass.c
> +++ b/drivers/usb/host/usb-uclass.c
> @@ -159,7 +159,11 @@ int usb_stop(void)
>  		if (ret && !err)
>  			err = ret;
>  	}
> -
> +#ifdef CONFIG_BLK
> +	ret = blk_unbind_all(IF_TYPE_USB);
> +	if (ret && !err)
> +		err = ret;
> +#endif
>  #ifdef CONFIG_SANDBOX
>  	struct udevice *dev;
>  
> 


-- 
Best regards,
Marek Vasut

  reply	other threads:[~2016-02-29 23:05 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-29 22:25 [U-Boot] [PATCH v2 01/32] dm: Drop the block_dev_desc_t typedef Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 02/32] dm: pci: Break out the common region display code Simon Glass
2016-03-13  1:52   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 03/32] dm: part: Correct a sandbox build warning Simon Glass
2016-03-13  1:52   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 04/32] dm: fdtdec: " Simon Glass
2016-03-13  1:52   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 05/32] dm: part: Drop the common.h header Simon Glass
2016-03-13  1:52   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 06/32] dm: Add a new header for block devices Simon Glass
2016-03-13  1:52   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 07/32] dm: blk: Convert interface type to an enum Simon Glass
2016-03-13  1:52   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 08/32] dm: blk: Add comments to a few functions Simon Glass
2016-03-13  1:52   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 09/32] dm: blk: Rename get_dev() to blk_get_dev() Simon Glass
2016-03-13  1:52   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 10/32] dm: blk: Rename get_device() to blk_get_device_by_str() Simon Glass
2016-03-13  1:52   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 11/32] dm: blk: Rename get_device_and_partition() Simon Glass
2016-03-13  1:52   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 12/32] dm: part: Add a cast to avoid a compiler warning Simon Glass
2016-03-13  1:52   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 13/32] dm: sandbox: Enable all partition types Simon Glass
2016-03-13  1:52   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 14/32] dm: part: Convert partition API use to linker lists Simon Glass
2016-03-13  1:52   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 15/32] dm: part: Rename some partition functions Simon Glass
2016-03-13  1:53   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 16/32] dm: cbfs: Fix handling of invalid type Simon Glass
2016-03-13  1:53   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 17/32] dm: sandbox: Enable cbfs and cramfs Simon Glass
2016-03-13  1:53   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 18/32] dm: block: Rename device number member dev to devnum Simon Glass
2016-03-13  1:53   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 19/32] dm: block: Adjust device calls to go through helpers function Simon Glass
2016-03-13  1:53   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 20/32] dm: usb: Avoid exceeding available array size for storage devices Simon Glass
2016-02-29 23:00   ` Marek Vasut
2016-03-13  1:53   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 21/32] dm: usb: Tidy up storage code ready for driver model conversion Simon Glass
2016-02-29 23:02   ` Marek Vasut
2016-03-13  1:53   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 22/32] dm: blk: Add a block-device uclass Simon Glass
2016-03-13  1:53   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 23/32] dm: sandbox: Prepare block driver for driver-model conversion Simon Glass
2016-03-13  1:53   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 24/32] dm: sandbox: Add driver-model block-device support for sandbox Simon Glass
2016-03-13  1:53   ` Simon Glass
2016-02-29 22:25 ` [U-Boot] [PATCH v2 25/32] dm: usb: Convert USB storage to use driver-model for block devs Simon Glass
2016-02-29 23:04   ` Marek Vasut
2016-03-13  1:53     ` Simon Glass
2016-03-13 17:41       ` Marek Vasut
2016-03-13  1:53   ` Simon Glass
2016-03-14 18:01   ` Stephen Warren
2016-02-29 22:25 ` [U-Boot] [PATCH v2 26/32] dm: usb: Unbind old block devices when shutting down USB Simon Glass
2016-02-29 23:05   ` Marek Vasut [this message]
2016-02-29 22:26 ` [U-Boot] [PATCH v2 27/32] dm: sandbox: Switch over to use DM for block devices Simon Glass
2016-02-29 22:26 ` [U-Boot] [PATCH v2 28/32] dm: sandbox: Drop the pre-DM host implementation Simon Glass
2016-02-29 22:26 ` [U-Boot] [PATCH v2 29/32] dm: usb: Clean up USB after each test Simon Glass
2016-03-13  1:53   ` Simon Glass
2016-02-29 22:26 ` [U-Boot] [PATCH v2 30/32] dm: blk: Add tests for block devices Simon Glass
2016-02-29 22:26 ` [U-Boot] [PATCH v2 31/32] part: Rename test_part_xx() and print_part_xx() Simon Glass
2016-03-13  1:53   ` Simon Glass
2016-02-29 22:26 ` [U-Boot] [PATCH v2 32/32] Drop CONFIG_CRAMFS_CMDLINE Simon Glass
2016-03-13  1:53   ` Simon Glass
2016-03-01 19:29 ` [U-Boot] [PATCH v2 01/32] dm: Drop the block_dev_desc_t typedef Stephen Warren
2016-03-13  1:52 ` 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=56D4CEA4.5020203@denx.de \
    --to=marex@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