On Mon, Jan 30, 2023, at 19:54, Biju Das wrote: > Hi all, > >> Subject: [usb:usb-next 35/35] kismet: WARNING: unmet direct dependencies >> detected for USB_RZV2M_USB3DRD when selected by USB_XHCI_RZV2M >> >> tree: >> head: c52c9acc415eb6ff54f658492f8c53da0fc3528a >> commit: c52c9acc415eb6ff54f658492f8c53da0fc3528a [35/35] xhci: host: Add >> Renesas RZ/V2M SoC support >> git remote add usb >> git fetch --no-tags usb usb-next >> git checkout c52c9acc415eb6ff54f658492f8c53da0fc3528a >> # 1. reproduce by kismet >> # install kmax per >> kismet --linux-ksrc=linux --selectees CONFIG_USB_RZV2M_USB3DRD -- >> selectors CONFIG_USB_XHCI_RZV2M -a=csky >> # 2. reproduce by make >> # save the config file to linux source tree >> cd linux >> make ARCH=csky olddefconfig >> >> If you fix the issue, kindly add following tag where applicable >> | Reported-by: kernel test robot <lkp@xxxxxxxxx> >> >> kismet warnings: (new ones prefixed by >>) >> >> kismet: WARNING: unmet direct dependencies detected for USB_RZV2M_USB3DRD >> when selected by USB_XHCI_RZV2M >> .config:4492:warning: symbol value 'ONFIG_ARCH_MMAP_RND_BITS_MI' invalid >> for ARCH_MMAP_RND_BITS >> >> WARNING: unmet direct dependencies detected for USB_RZV2M_USB3DRD >> Depends on [n]: USB_SUPPORT [=y] && USB_GADGET [=n] && (ARCH_R9A09G011 >> [=n] || COMPILE_TEST [=y]) >> Selected by [y]: >> - USB_XHCI_RZV2M [=y] && USB_SUPPORT [=y] && USB [=y] && USB_XHCI_HCD >> [=y] && USB_XHCI_PLATFORM [=y] && (ARCH_R9A09G011 [=n] || COMPILE_TEST [=y]) > > I have investigated this issue, > > Just for testing, I have reverted Arnd's patch[1] and then done the > below changes > which is fixing unmet dependencies reported by the bot. > > Looks like USB_RZV2M_USB3DRD should depend upon both USB and > USB_GADGET. Previously > It depends only on USB_GADGET. > > Also the USB3DRD driver should be in "driver/usb/renesas_usb3drd" > directory instead > of "driver/usb/gadget/udc" as both HOST and device ctrlr need this > driver. > > So not sure, > > 1) Use Arnd's patch for fixing this issue > > 2) Use the changes from [2] > > Or > > 3) Arnd's changes + changes from [2]. > > Please let me know. > > [2] > diff --git a/drivers/usb/renesas_usb3drd/Kconfig > b/drivers/usb/renesas_usb3drd/Kconfig > new file mode 100644 > index 000000000000..6205d815d283 > --- /dev/null > +++ b/drivers/usb/renesas_usb3drd/Kconfig > @@ -0,0 +1,14 @@ > +# SPDX-License-Identifier: GPL-2.0 > + > +config USB_RZV2M_USB3DRD > + tristate 'Renesas USB3.1 DRD controller' > + depends on (USB || USB_GADGET) > + depends on ARCH_R9A09G011 || COMPILE_TEST > + default USB_XHCI_RZV2M > + default USB_RENESAS_USB3 > + help > + Renesas USB3.1 DRD controller is a USB DRD controller > + that supports both host and device switching. > + > + Say "y" to link the driver statically, or "m" to build a > + dynamically linked module called "rzv2m_usb3drd". I found yet another regression, and I don't think any of the above fully address this. Let me try to come up with a better fix that also addresses this one: arm-linux-gnueabi-ld: drivers/usb/host/xhci-rzv2m.o: in function `xhci_rzv2m_init_quirk': xhci-rzv2m.c:(.text+0x20): undefined reference to `rzv2m_usb3drd_reset' arm-linux-gnueabi-ld: drivers/usb/gadget/udc/renesas_usb3.o: in function `handle_ext_role_switch_states': renesas_usb3.c:(.text+0x3148): undefined reference to `rzv2m_usb3drd_reset' arm-linux-gnueabi-ld: renesas_usb3.c:(.text+0x31b8): undefined reference to `rzv2m_usb3drd_reset' arm-linux-gnueabi-ld: renesas_usb3.c:(.text+0x3338): undefined reference to `rzv2m_usb3drd_reset' arm-linux-gnueabi-ld: drivers/usb/gadget/udc/renesas_usb3.o: in function `renesas_usb3_start': renesas_usb3.c:(.text+0x36b8): undefined reference to `rzv2m_usb3drd_reset' arm-linux-gnueabi-ld: drivers/usb/gadget/udc/renesas_usb3.o:renesas_usb3.c:(.text+0x3764): more undefined references to `rzv2m_usb3drd_reset' follow The main problem here is that the xhci-platform driver has reverse dependencies on the soc specific portions, unlike drivers elsewhere that handle this by having a soc specific driver that calls into the more generic code library. Arnd