All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: cdnsp: Fix for undefined reference to `usb_hcd_is_primary_hcd'
@ 2020-12-10 16:22 Pawel Laszczak
  2020-12-10 16:50 ` Randy Dunlap
  2020-12-28 14:42 ` Greg KH
  0 siblings, 2 replies; 4+ messages in thread
From: Pawel Laszczak @ 2020-12-10 16:22 UTC (permalink / raw)
  To: peter.chen
  Cc: linux-usb, gregkh, dan.carpenter, kurahul, rdunlap, Pawel Laszczak

Patch fixes the following compilation error:

ld: drivers/usb/cdns3/host.o: in function `xhci_cdns3_suspend_quirk':
host.c:(.text+0x9): undefined reference to `usb_hcd_is_primary_hcd'

This reference to 'usb_hdc_is_primary_hcd' is from hcd_to_xhci(),
which is being built as a loadable module:

int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
{
        struct xhci_hcd *xhci = hcd_to_xhci(hcd);

Issue occurrd for following kernel configuration:
CONFIG_USB_GADGET=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_COMMON=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB=m

CONFIG_USB_CDNS_SUPPORT=y
CONFIG_USB_CDNS_HOST=y
CONFIG_USB_CDNS3=m
CONFIG_USB_CDNS3_GADGET=y
CONFIG_USB_CDNS3_HOST=y

Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
---
 drivers/usb/cdns3/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/cdns3/Makefile b/drivers/usb/cdns3/Makefile
index 01a9a9620044..3f9b7fa8a594 100644
--- a/drivers/usb/cdns3/Makefile
+++ b/drivers/usb/cdns3/Makefile
@@ -6,8 +6,13 @@ CFLAGS_cdnsp-trace.o				:= -I$(src)
 cdns-usb-common-y				:= core.o drd.o
 cdns3-y						:= cdns3-plat.o
 
-obj-$(CONFIG_USB_CDNS3)				+= cdns3.o
+ifeq ($(CONFIG_USB),m)
+obj-m						+= cdns-usb-common.o
+obj-m						+= cdns3.o
+else
 obj-$(CONFIG_USB_CDNS_SUPPORT)			+= cdns-usb-common.o
+obj-$(CONFIG_USB_CDNS3)				+= cdns3.o
+endif
 
 cdns-usb-common-$(CONFIG_USB_CDNS_HOST) 	+= host.o
 cdns3-$(CONFIG_USB_CDNS3_GADGET)		+= cdns3-gadget.o cdns3-ep0.o
-- 
2.17.1


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

* Re: [PATCH] usb: cdnsp: Fix for undefined reference to `usb_hcd_is_primary_hcd'
  2020-12-10 16:22 [PATCH] usb: cdnsp: Fix for undefined reference to `usb_hcd_is_primary_hcd' Pawel Laszczak
@ 2020-12-10 16:50 ` Randy Dunlap
  2020-12-28 14:42 ` Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2020-12-10 16:50 UTC (permalink / raw)
  To: Pawel Laszczak, peter.chen; +Cc: linux-usb, gregkh, dan.carpenter, kurahul

On 12/10/20 8:22 AM, Pawel Laszczak wrote:
> Patch fixes the following compilation error:
> 
> ld: drivers/usb/cdns3/host.o: in function `xhci_cdns3_suspend_quirk':
> host.c:(.text+0x9): undefined reference to `usb_hcd_is_primary_hcd'
> 
> This reference to 'usb_hdc_is_primary_hcd' is from hcd_to_xhci(),
> which is being built as a loadable module:
> 
> int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
> {
>         struct xhci_hcd *xhci = hcd_to_xhci(hcd);
> 
> Issue occurrd for following kernel configuration:
> CONFIG_USB_GADGET=y
> CONFIG_USB_SUPPORT=y
> CONFIG_USB_COMMON=y
> CONFIG_USB_ARCH_HAS_HCD=y
> CONFIG_USB=m
> 
> CONFIG_USB_CDNS_SUPPORT=y
> CONFIG_USB_CDNS_HOST=y
> CONFIG_USB_CDNS3=m
> CONFIG_USB_CDNS3_GADGET=y
> CONFIG_USB_CDNS3_HOST=y
> 
> Signed-off-by: Pawel Laszczak <pawell@cadence.com>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>

Works for me. Thanks.

Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested


> ---
>  drivers/usb/cdns3/Makefile | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/cdns3/Makefile b/drivers/usb/cdns3/Makefile
> index 01a9a9620044..3f9b7fa8a594 100644
> --- a/drivers/usb/cdns3/Makefile
> +++ b/drivers/usb/cdns3/Makefile
> @@ -6,8 +6,13 @@ CFLAGS_cdnsp-trace.o				:= -I$(src)
>  cdns-usb-common-y				:= core.o drd.o
>  cdns3-y						:= cdns3-plat.o
>  
> -obj-$(CONFIG_USB_CDNS3)				+= cdns3.o
> +ifeq ($(CONFIG_USB),m)
> +obj-m						+= cdns-usb-common.o
> +obj-m						+= cdns3.o
> +else
>  obj-$(CONFIG_USB_CDNS_SUPPORT)			+= cdns-usb-common.o
> +obj-$(CONFIG_USB_CDNS3)				+= cdns3.o
> +endif
>  
>  cdns-usb-common-$(CONFIG_USB_CDNS_HOST) 	+= host.o
>  cdns3-$(CONFIG_USB_CDNS3_GADGET)		+= cdns3-gadget.o cdns3-ep0.o
> 


-- 
~Randy

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

* Re: [PATCH] usb: cdnsp: Fix for undefined reference to `usb_hcd_is_primary_hcd'
  2020-12-10 16:22 [PATCH] usb: cdnsp: Fix for undefined reference to `usb_hcd_is_primary_hcd' Pawel Laszczak
  2020-12-10 16:50 ` Randy Dunlap
@ 2020-12-28 14:42 ` Greg KH
  2020-12-29  0:53   ` Peter Chen
  1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2020-12-28 14:42 UTC (permalink / raw)
  To: Pawel Laszczak; +Cc: peter.chen, linux-usb, dan.carpenter, kurahul, rdunlap

On Thu, Dec 10, 2020 at 05:22:58PM +0100, Pawel Laszczak wrote:
> Patch fixes the following compilation error:
> 
> ld: drivers/usb/cdns3/host.o: in function `xhci_cdns3_suspend_quirk':
> host.c:(.text+0x9): undefined reference to `usb_hcd_is_primary_hcd'
> 
> This reference to 'usb_hdc_is_primary_hcd' is from hcd_to_xhci(),
> which is being built as a loadable module:
> 
> int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
> {
>         struct xhci_hcd *xhci = hcd_to_xhci(hcd);
> 
> Issue occurrd for following kernel configuration:
> CONFIG_USB_GADGET=y
> CONFIG_USB_SUPPORT=y
> CONFIG_USB_COMMON=y
> CONFIG_USB_ARCH_HAS_HCD=y
> CONFIG_USB=m
> 
> CONFIG_USB_CDNS_SUPPORT=y
> CONFIG_USB_CDNS_HOST=y
> CONFIG_USB_CDNS3=m
> CONFIG_USB_CDNS3_GADGET=y
> CONFIG_USB_CDNS3_HOST=y
> 
> Signed-off-by: Pawel Laszczak <pawell@cadence.com>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> ---
>  drivers/usb/cdns3/Makefile | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

Doesn't apply to 5.11-rc1 :(

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

* RE: [PATCH] usb: cdnsp: Fix for undefined reference to `usb_hcd_is_primary_hcd'
  2020-12-28 14:42 ` Greg KH
@ 2020-12-29  0:53   ` Peter Chen
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Chen @ 2020-12-29  0:53 UTC (permalink / raw)
  To: Greg KH, Pawel Laszczak; +Cc: linux-usb, dan.carpenter, kurahul, rdunlap

 
> >
> > Issue occurrd for following kernel configuration:
> > CONFIG_USB_GADGET=y
> > CONFIG_USB_SUPPORT=y
> > CONFIG_USB_COMMON=y
> > CONFIG_USB_ARCH_HAS_HCD=y
> > CONFIG_USB=m
> >
> > CONFIG_USB_CDNS_SUPPORT=y
> > CONFIG_USB_CDNS_HOST=y
> > CONFIG_USB_CDNS3=m
> > CONFIG_USB_CDNS3_GADGET=y
> > CONFIG_USB_CDNS3_HOST=y
> >
> > Signed-off-by: Pawel Laszczak <pawell@cadence.com>
> > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > ---
> >  drivers/usb/cdns3/Makefile | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> Doesn't apply to 5.11-rc1 :(

Hi Greg,

Cadence USB3 goes to my tree, and the related patches were already at my tree.

Peter

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

end of thread, other threads:[~2020-12-29  0:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 16:22 [PATCH] usb: cdnsp: Fix for undefined reference to `usb_hcd_is_primary_hcd' Pawel Laszczak
2020-12-10 16:50 ` Randy Dunlap
2020-12-28 14:42 ` Greg KH
2020-12-29  0:53   ` Peter Chen

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.