usb: Correct dependencies around USB_EMUL
PATCH 1/1 usb: Correct dependencies around USB_EMUL
The symbol USB_EMUL is how sandbox has access to USB. It's implementation however enforces a few other requirements. It must have SCSI enabled, and in turn that means it must have BLK enabled. Finally, we should not be using SANDBOX itself as a symbol to decide what to build or not build here, as SANDBOX is selected for COMPILE_TEST builds as well and so may not have enabled the sandbox specific USB support.
---
Cc: Marek Vasut <[email protected]>
--- drivers/usb/emul/Kconfig | 2 ++ drivers/usb/host/Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/usb/emul/Kconfig +2 -0
@@ -1,7 +1,9 @@ config USB_EMUL bool "Support for USB device emulation" depends on SANDBOX + select BLK select DM_USB + select SCSI select USB_HOST help Since sandbox does not have access to a real USB bus, it is possible
drivers/usb/host/Makefile +1 -1
@@ -5,7 +5,7 @@ ifdef CONFIG_$(PHASE_)DM_USB obj-y += usb-uclass.o -obj-$(CONFIG_SANDBOX) += usb-sandbox.o +obj-$(CONFIG_USB_EMUL) += usb-sandbox.o endif ifdef CONFIG_$(PHASE_)USB_STORAGE
Signature · 1 line
2.43.0
Quoted 20 lines · Tom Rini
The symbol
USB_EMULis how sandbox has access to USB. It's implementation however enforces a few other requirements. It must have SCSI enabled, and in turn that means it must have BLK enabled. Finally, we should not be using SANDBOX itself as a symbol to decide what to build or not build here, as SANDBOX is selected forCOMPILE_TESTbuilds as well and so may not have enabled the sandbox specific USB support.Signed-off-by Tom Rini <[email protected]>---
Cc: Marek Vasut <[email protected]>--- drivers/usb/emul/Kconfig | 2 ++ drivers/usb/host/Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)drivers/usb/emul/Kconfig +0
-0
drivers/usb/emul/Kconfig line 4
Quoted 4 lines
drivers/usb/emul/Kconfig +1
-0@@ -1,7 +1,9 @@ config USB_EMUL bool "Support for USB device emulation" depends on SANDBOX + select BLK
The select SCSI and Makefile change I do understand. But why do we also need BLK ? I can't find anything which would interact with BLK in the sandbox USB emulation ?
Quoted 18 lines
drivers/usb/emul/Kconfig +1
-0select DM_USB + select SCSI select USB_HOST help Since sandbox does not have access to a real USB bus, it is possibledrivers/usb/host/Makefile +1
-1@@ -5,7 +5,7 @@ ifdef CONFIG_$(PHASE_)DM_USB obj-y += usb-uclass.o -obj-$(CONFIG_SANDBOX) += usb-sandbox.o +obj-$(CONFIG_USB_EMUL) += usb-sandbox.o endif ifdef CONFIG_$(PHASE_)USB_STORAGE
Quoted 16 lines · Marek Vasut
Quoted 15 lines · Tom Rini
The symbol
USB_EMULis how sandbox has access to USB. It's implementation however enforces a few other requirements. It must have SCSI enabled, and in turn that means it must have BLK enabled. Finally, we should not be using SANDBOX itself as a symbol to decide what to build or not build here, as SANDBOX is selected forCOMPILE_TESTbuilds as well and so may not have enabled the sandbox specific USB support.Signed-off-by Tom Rini <[email protected]>---
Cc: Marek Vasut <[email protected]>--- drivers/usb/emul/Kconfig | 2 ++ drivers/usb/host/Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
Quoted 13 lines
drivers/usb/emul/Kconfig line 4
Quoted 9 lines
drivers/usb/emul/Kconfig +1
-0@@ -1,7 +1,9 @@ config USB_EMUL bool "Support for USB device emulation" depends on SANDBOX + select BLKThe select SCSI and
Makefilechange I do understand. But why do we also need BLK ? I can't find anything which would interact with BLK in the sandbox USB emulation ?
Ah woops, I was fixing too many problems at once then and forgot BLK is select'd by SCSI now, not depends on, so indeed, it's not required here.
Signature · 1 line
Tom
Quoted 31 lines · Tom Rini
Quoted 16 lines · Marek Vasut
Quoted 15 lines · Tom Rini
The symbol
USB_EMULis how sandbox has access to USB. It's implementation however enforces a few other requirements. It must have SCSI enabled, and in turn that means it must have BLK enabled. Finally, we should not be using SANDBOX itself as a symbol to decide what to build or not build here, as SANDBOX is selected forCOMPILE_TESTbuilds as well and so may not have enabled the sandbox specific USB support.Signed-off-by Tom Rini <[email protected]>---
Cc: Marek Vasut <[email protected]>--- drivers/usb/emul/Kconfig | 2 ++ drivers/usb/host/Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)Quoted 13 lines
drivers/usb/emul/Kconfig line 4
Quoted 9 lines
drivers/usb/emul/Kconfig +1
-0@@ -1,7 +1,9 @@ config USB_EMUL bool "Support for USB device emulation" depends on SANDBOX + select BLKThe select SCSI and
Makefilechange I do understand. But why do we also need BLK ? I can't find anything which would interact with BLK in the sandbox USB emulation ?
Quoted 2 lines
Ah woops, I was fixing too many problems at once then and forgot BLK is select'd by SCSI now, not depends on, so indeed, it's not required here.
Excellent, then please do a V2 and then all is fine. Thanks !
PATCH v2 1/1 usb: Correct dependencies around USB_EMUL
In reply to Marek VasutThe symbol USB_EMUL is how sandbox has access to USB. It's implementation however enforces a few other requirements. It must have SCSI enabled, and in turn that means it must have BLK enabled. Finally, we should not be using SANDBOX itself as a symbol to decide what to build or not build here, as SANDBOX is selected for COMPILE_TEST builds as well and so may not have enabled the sandbox specific USB support.
---
Changes in v2:
- Drop erroneous select BLK line, pointed out by Marek
--- drivers/usb/emul/Kconfig | 1 + drivers/usb/host/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/usb/emul/Kconfig +1 -0
@@ -2,6 +2,7 @@ config USB_EMUL bool "Support for USB device emulation" depends on SANDBOX select DM_USB + select SCSI select USB_HOST help Since sandbox does not have access to a real USB bus, it is possible
drivers/usb/host/Makefile +1 -1
@@ -5,7 +5,7 @@ ifdef CONFIG_$(PHASE_)DM_USB obj-y += usb-uclass.o -obj-$(CONFIG_SANDBOX) += usb-sandbox.o +obj-$(CONFIG_USB_EMUL) += usb-sandbox.o endif ifdef CONFIG_$(PHASE_)USB_STORAGE
Signature · 1 line
2.43.0
Quoted 8 lines · Tom Rini
The symbol
USB_EMULis how sandbox has access to USB. It's implementation however enforces a few other requirements. It must have SCSI enabled, and in turn that means it must have BLK enabled. Finally, we should not be using SANDBOX itself as a symbol to decide what to build or not build here, as SANDBOX is selected forCOMPILE_TESTbuilds as well and so may not have enabled the sandbox specific USB support.Signed-off-by Tom Rini <[email protected]>