All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] usb: Do not compile USB_STORAGE with !BLK && !DM_USB
@ 2018-10-19 12:43 Alexander Graf
  2018-10-19 12:45 ` Marek Vasut
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Graf @ 2018-10-19 12:43 UTC (permalink / raw)
  To: u-boot

The USB storage driver does not compile when CONFIG_BLK is set,
but DM_USB is not set, as we're missing the DM device links for
CONFIG_BLK enabled code paths.

So far it looks like nobody fell into this trap, because no board
enabled CONFIG_BLK and CONFIG_USB_STORAGE while not enabling
CONFIG_DM_USB, but we should still reflect that dependency properly
in Kconfig so that implicit enabling of CONFIG_USB_STORAGE works.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 drivers/usb/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
index 4fbe172e05..297dda1511 100644
--- a/drivers/usb/Kconfig
+++ b/drivers/usb/Kconfig
@@ -65,6 +65,7 @@ comment "USB peripherals"
 
 config USB_STORAGE
 	bool "USB Mass Storage support"
+	depends on DM_USB || !BLK
 	---help---
 	  Say Y here if you want to connect USB mass storage devices to your
 	  board's USB port.
-- 
2.12.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] usb: Do not compile USB_STORAGE with !BLK && !DM_USB
  2018-10-19 12:43 [U-Boot] [PATCH] usb: Do not compile USB_STORAGE with !BLK && !DM_USB Alexander Graf
@ 2018-10-19 12:45 ` Marek Vasut
  2018-10-19 12:47   ` Alexander Graf
  0 siblings, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2018-10-19 12:45 UTC (permalink / raw)
  To: u-boot

On 10/19/2018 02:43 PM, Alexander Graf wrote:
> The USB storage driver does not compile when CONFIG_BLK is set,
> but DM_USB is not set, as we're missing the DM device links for
> CONFIG_BLK enabled code paths.
> 
> So far it looks like nobody fell into this trap, because no board
> enabled CONFIG_BLK and CONFIG_USB_STORAGE while not enabling
> CONFIG_DM_USB, but we should still reflect that dependency properly
> in Kconfig so that implicit enabling of CONFIG_USB_STORAGE works.
> 
> Signed-off-by: Alexander Graf <agraf@suse.de>

Can we fix it such that it'd compile ? :)

> ---
>  drivers/usb/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
> index 4fbe172e05..297dda1511 100644
> --- a/drivers/usb/Kconfig
> +++ b/drivers/usb/Kconfig
> @@ -65,6 +65,7 @@ comment "USB peripherals"
>  
>  config USB_STORAGE
>  	bool "USB Mass Storage support"
> +	depends on DM_USB || !BLK
>  	---help---
>  	  Say Y here if you want to connect USB mass storage devices to your
>  	  board's USB port.
> 


-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] usb: Do not compile USB_STORAGE with !BLK && !DM_USB
  2018-10-19 12:45 ` Marek Vasut
@ 2018-10-19 12:47   ` Alexander Graf
  2018-10-19 12:48     ` Marek Vasut
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Graf @ 2018-10-19 12:47 UTC (permalink / raw)
  To: u-boot



On 19.10.18 14:45, Marek Vasut wrote:
> On 10/19/2018 02:43 PM, Alexander Graf wrote:
>> The USB storage driver does not compile when CONFIG_BLK is set,
>> but DM_USB is not set, as we're missing the DM device links for
>> CONFIG_BLK enabled code paths.
>>
>> So far it looks like nobody fell into this trap, because no board
>> enabled CONFIG_BLK and CONFIG_USB_STORAGE while not enabling
>> CONFIG_DM_USB, but we should still reflect that dependency properly
>> in Kconfig so that implicit enabling of CONFIG_USB_STORAGE works.
>>
>> Signed-off-by: Alexander Graf <agraf@suse.de>
> 
> Can we fix it such that it'd compile ? :)

I'm not sure. It feels awkward to allow code to use DM enabled block
functions, but not DM enabled USB functionality. I can definitely see
why the code tripped over :).

Wasn't Simon planning to rip out non-DM enabled devices soon'ish anyways?


Alex

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] usb: Do not compile USB_STORAGE with !BLK && !DM_USB
  2018-10-19 12:47   ` Alexander Graf
@ 2018-10-19 12:48     ` Marek Vasut
  2018-10-19 12:53       ` Alexander Graf
  0 siblings, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2018-10-19 12:48 UTC (permalink / raw)
  To: u-boot

On 10/19/2018 02:47 PM, Alexander Graf wrote:
> 
> 
> On 19.10.18 14:45, Marek Vasut wrote:
>> On 10/19/2018 02:43 PM, Alexander Graf wrote:
>>> The USB storage driver does not compile when CONFIG_BLK is set,
>>> but DM_USB is not set, as we're missing the DM device links for
>>> CONFIG_BLK enabled code paths.
>>>
>>> So far it looks like nobody fell into this trap, because no board
>>> enabled CONFIG_BLK and CONFIG_USB_STORAGE while not enabling
>>> CONFIG_DM_USB, but we should still reflect that dependency properly
>>> in Kconfig so that implicit enabling of CONFIG_USB_STORAGE works.
>>>
>>> Signed-off-by: Alexander Graf <agraf@suse.de>
>>
>> Can we fix it such that it'd compile ? :)
> 
> I'm not sure. It feels awkward to allow code to use DM enabled block
> functions, but not DM enabled USB functionality. I can definitely see
> why the code tripped over :).
> 
> Wasn't Simon planning to rip out non-DM enabled devices soon'ish anyways?

I dunno. Which devices have this problem ?

-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] usb: Do not compile USB_STORAGE with !BLK && !DM_USB
  2018-10-19 12:48     ` Marek Vasut
@ 2018-10-19 12:53       ` Alexander Graf
  0 siblings, 0 replies; 5+ messages in thread
From: Alexander Graf @ 2018-10-19 12:53 UTC (permalink / raw)
  To: u-boot



On 19.10.18 14:48, Marek Vasut wrote:
> On 10/19/2018 02:47 PM, Alexander Graf wrote:
>>
>>
>> On 19.10.18 14:45, Marek Vasut wrote:
>>> On 10/19/2018 02:43 PM, Alexander Graf wrote:
>>>> The USB storage driver does not compile when CONFIG_BLK is set,
>>>> but DM_USB is not set, as we're missing the DM device links for
>>>> CONFIG_BLK enabled code paths.
>>>>
>>>> So far it looks like nobody fell into this trap, because no board
>>>> enabled CONFIG_BLK and CONFIG_USB_STORAGE while not enabling
>>>> CONFIG_DM_USB, but we should still reflect that dependency properly
>>>> in Kconfig so that implicit enabling of CONFIG_USB_STORAGE works.
>>>>
>>>> Signed-off-by: Alexander Graf <agraf@suse.de>
>>>
>>> Can we fix it such that it'd compile ? :)
>>
>> I'm not sure. It feels awkward to allow code to use DM enabled block
>> functions, but not DM enabled USB functionality. I can definitely see
>> why the code tripped over :).
>>
>> Wasn't Simon planning to rip out non-DM enabled devices soon'ish anyways?
> 
> I dunno. Which devices have this problem ?
> 

The ones I've seen (enable DISTRO_DEFAULTS, enable USB, enable
CONFIG_BLK, don't enable DM_USB and don't enable USB_STORAGE today) are
mostly i.MX6 and OMAP/AM[3-5]xxx based.


Alex

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-10-19 12:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-19 12:43 [U-Boot] [PATCH] usb: Do not compile USB_STORAGE with !BLK && !DM_USB Alexander Graf
2018-10-19 12:45 ` Marek Vasut
2018-10-19 12:47   ` Alexander Graf
2018-10-19 12:48     ` Marek Vasut
2018-10-19 12:53       ` Alexander Graf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.