From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 25/32] dm: usb: Convert USB storage to use driver-model for block devs
Date: Sun, 13 Mar 2016 18:41:25 +0100 [thread overview]
Message-ID: <56E5A645.6020209@denx.de> (raw)
In-Reply-To: <CAPnjgZ3btfmLayevgf2Gfd47nhKakG0ZfUn6UwNHpyJgR0OEZw@mail.gmail.com>
On 03/13/2016 02:53 AM, Simon Glass wrote:
> Hi Marek,
>
> On 29 February 2016 at 16:04, Marek Vasut <marex@denx.de> wrote:
>> On 02/29/2016 11:25 PM, Simon Glass wrote:
>>> Update this code to support CONFIG_BLK. Each USB storage device can have
>>> one or more block devices as children, each one representing a LUN
>>> (logical unit) of the USB device.
>>>
>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>> ---
>>>
>>> Changes in v2: None
>>>
>>> common/usb_storage.c | 141 ++++++++++++++++++++++++++++++++++++++++++++++++---
>>> 1 file changed, 135 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/common/usb_storage.c b/common/usb_storage.c
>>> index 0475123..1472824 100644
>>> --- a/common/usb_storage.c
>>> +++ b/common/usb_storage.c
>>> @@ -43,6 +43,7 @@
>>> #include <asm/byteorder.h>
>>> #include <asm/processor.h>
>>> #include <dm/device-internal.h>
>>> +#include <dm/lists.h>
>>>
>>> #include <part.h>
>>> #include <usb.h>
>>> @@ -67,7 +68,9 @@ static __u32 CBWTag;
>>>
>>> static int usb_max_devs; /* number of highest available usb device */
>>>
>>> +#ifndef CONFIG_BLK
>>> static struct blk_desc usb_dev_desc[USB_MAX_STOR_DEV];
>>> +#endif
>>
>> You might want to use __maybe_unused to avoid the ifdef, do you think it
>> makes sense ?
>
> This is something that should not exist when driver model is used. So
> I'd rather have it explicit so it is obvious that it can be removed
> with the driver-model conversion is done.
OK fine.
>>
>>> struct us_data;
>>> typedef int (*trans_cmnd)(ccb *cb, struct us_data *data);
>>
>> Other than that:
>>
>> Reviewed-by: Marek Vasut <marex@denx.de>
>>
>> --
>> Best regards,
>> Marek Vasut
>
> Regards,
> Simon
>
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2016-03-13 17:41 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 [this message]
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
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=56E5A645.6020209@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