Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] Philips PNX8550 USB Host driver compile fix
@ 2005-12-06 18:22 Vladimir A. Barinov
  0 siblings, 0 replies; 5+ messages in thread
From: Vladimir A. Barinov @ 2005-12-06 18:22 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf, ppopov

Hello, Ralf, Pete,

The current ohci-hcd driver is a littel defective.
It's unable to use usb-ohci as modules in the case when PCI and on-chip 
USB are enabled.
It just willn't be compiled since there are two calls if module_init in 
ohci-hcd.

Please look at the patch attached.
I 'm not sure is this patch well for this situation.
Any suggestions are very appretiated.

TIA,
Vladimir

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

* [PATCH] Philips PNX8550 USB Host driver compile fix
@ 2005-12-06 18:23 Vladimir A. Barinov
  2005-12-06 19:35 ` Peter Popov
  0 siblings, 1 reply; 5+ messages in thread
From: Vladimir A. Barinov @ 2005-12-06 18:23 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf, ppopov

[-- Attachment #1: Type: text/plain, Size: 389 bytes --]

Hello, Ralf, Pete,

The current ohci-hcd driver is a little defective.
It's unable to use usb-ohci as modules in the case when PCI and on-chip 
USB are enabled.
It just will not be compiled since there are two calls if module_init in 
ohci-hcd.

Please look at the patch attached.
I 'm not sure is this patch well for this situation.
Any suggestions are very appreciated.

TIA,
Vladimir



[-- Attachment #2: usb_modules.patch --]
[-- Type: text/plain, Size: 828 bytes --]

--- linux-2.6.10.orig/drivers/usb/host/ohci-hcd.c	2005-12-02 16:37:59.000000000 +0300
+++ linux-2.6.10/drivers/usb/host/ohci-hcd.c	2005-12-02 19:34:21.000000000 +0300
@@ -906,8 +906,12 @@ MODULE_LICENSE ("GPL");
 #endif
 
 #ifdef CONFIG_PNX8550
+#if defined(CONFIG_PCI) && defined(CONFIG_USB_OHCI_HCD_MODULE)
+#error "unable to compile PNX8550 USB and PCI USB as modules simultaneously until usb hcd stack is rewritten"
+#else
 #include "ohci-pnx8550.c"
 #endif
+#endif
 
 #ifdef CONFIG_USB_OHCI_HCD_PPC_SOC
 #include "ohci-ppc-soc.c"
@@ -919,6 +923,7 @@ MODULE_LICENSE ("GPL");
       || defined (CONFIG_ARCH_LH7A404) \
       || defined (CONFIG_PXA27x) \
       || defined (CONFIG_SOC_AU1X00) \
+      || defined (CONFIG_PNX8550) \
       || defined (CONFIG_USB_OHCI_HCD_PPC_SOC) \
 	)
 #error "missing bus glue for ohci-hcd"

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

* Re: [PATCH] Philips PNX8550 USB Host driver compile fix
  2005-12-06 18:23 [PATCH] Philips PNX8550 USB Host driver compile fix Vladimir A. Barinov
@ 2005-12-06 19:35 ` Peter Popov
  2005-12-08 16:51   ` Vladimir A. Barinov
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Popov @ 2005-12-06 19:35 UTC (permalink / raw)
  To: Vladimir A. Barinov, linux-mips; +Cc: ralf



I suppose the right solution is to be able to use the
on-chip usb controller as well as an external pci
controller. I don't think anyone will do that though.
I have one board with an external USB controller but
that was done in order to add usb 2.0 support, so the
on-chip usb controller is not used. So the simple fix
below works fine for me, but Ralf and David B. may
have higher standards ;)

Pete

--- "Vladimir A. Barinov" <vbarinov@ru.mvista.com>
wrote:

> Hello, Ralf, Pete,
> 
> The current ohci-hcd driver is a little defective.
> It's unable to use usb-ohci as modules in the case
> when PCI and on-chip 
> USB are enabled.
> It just will not be compiled since there are two
> calls if module_init in 
> ohci-hcd.
> 
> Please look at the patch attached.
> I 'm not sure is this patch well for this situation.
> Any suggestions are very appreciated.
> 
> TIA,
> Vladimir
> 
> 
> > --- linux-2.6.10.orig/drivers/usb/host/ohci-hcd.c
> 2005-12-02 16:37:59.000000000 +0300
> +++ linux-2.6.10/drivers/usb/host/ohci-hcd.c
> 2005-12-02 19:34:21.000000000 +0300
> @@ -906,8 +906,12 @@ MODULE_LICENSE ("GPL");
>  #endif
>  
>  #ifdef CONFIG_PNX8550
> +#if defined(CONFIG_PCI) &&
> defined(CONFIG_USB_OHCI_HCD_MODULE)
> +#error "unable to compile PNX8550 USB and PCI USB
> as modules simultaneously until usb hcd stack is
> rewritten"
> +#else
>  #include "ohci-pnx8550.c"
>  #endif
> +#endif
>  
>  #ifdef CONFIG_USB_OHCI_HCD_PPC_SOC
>  #include "ohci-ppc-soc.c"
> @@ -919,6 +923,7 @@ MODULE_LICENSE ("GPL");
>        || defined (CONFIG_ARCH_LH7A404) \
>        || defined (CONFIG_PXA27x) \
>        || defined (CONFIG_SOC_AU1X00) \
> +      || defined (CONFIG_PNX8550) \
>        || defined (CONFIG_USB_OHCI_HCD_PPC_SOC) \
>  	)
>  #error "missing bus glue for ohci-hcd"
> 

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

* Re: [PATCH] Philips PNX8550 USB Host driver compile fix
  2005-12-06 19:35 ` Peter Popov
@ 2005-12-08 16:51   ` Vladimir A. Barinov
  2005-12-09 23:20     ` David Brownell
  0 siblings, 1 reply; 5+ messages in thread
From: Vladimir A. Barinov @ 2005-12-08 16:51 UTC (permalink / raw)
  To: Peter Popov, David Brownell; +Cc: linux-mips, ralf, linux-usb-devel

Hello Ralf, David,

Could you please advise.
What is the right solution in the situation when USB PCI and on-chip USB 
used in the situation when we want ohci-hcd to be a module?

Vladimir

Peter Popov wrote:

>I suppose the right solution is to be able to use the
>on-chip usb controller as well as an external pci
>controller. I don't think anyone will do that though.
>I have one board with an external USB controller but
>that was done in order to add usb 2.0 support, so the
>on-chip usb controller is not used. So the simple fix
>below works fine for me, but Ralf and David B. may
>have higher standards ;)
>
>Pete
>
>--- "Vladimir A. Barinov" <vbarinov@ru.mvista.com>
>wrote:
>
>  
>
>>Hello, Ralf, Pete,
>>
>>The current ohci-hcd driver is a little defective.
>>It's unable to use usb-ohci as modules in the case
>>when PCI and on-chip 
>>USB are enabled.
>>It just will not be compiled since there are two
>>calls if module_init in 
>>ohci-hcd.
>>
>>Please look at the patch attached.
>>I 'm not sure is this patch well for this situation.
>>Any suggestions are very appreciated.
>>
>>TIA,
>>Vladimir
>>
>>
>>    
>>
>>>--- linux-2.6.10.orig/drivers/usb/host/ohci-hcd.c
>>>      
>>>
>>2005-12-02 16:37:59.000000000 +0300
>>+++ linux-2.6.10/drivers/usb/host/ohci-hcd.c
>>2005-12-02 19:34:21.000000000 +0300
>>@@ -906,8 +906,12 @@ MODULE_LICENSE ("GPL");
>> #endif
>> 
>> #ifdef CONFIG_PNX8550
>>+#if defined(CONFIG_PCI) &&
>>defined(CONFIG_USB_OHCI_HCD_MODULE)
>>+#error "unable to compile PNX8550 USB and PCI USB
>>as modules simultaneously until usb hcd stack is
>>rewritten"
>>+#else
>> #include "ohci-pnx8550.c"
>> #endif
>>+#endif
>> 
>> #ifdef CONFIG_USB_OHCI_HCD_PPC_SOC
>> #include "ohci-ppc-soc.c"
>>@@ -919,6 +923,7 @@ MODULE_LICENSE ("GPL");
>>       || defined (CONFIG_ARCH_LH7A404) \
>>       || defined (CONFIG_PXA27x) \
>>       || defined (CONFIG_SOC_AU1X00) \
>>+      || defined (CONFIG_PNX8550) \
>>       || defined (CONFIG_USB_OHCI_HCD_PPC_SOC) \
>> 	)
>> #error "missing bus glue for ohci-hcd"
>>
>>    
>>
>
>
>  
>

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

* Re: [PATCH] Philips PNX8550 USB Host driver compile fix
  2005-12-08 16:51   ` Vladimir A. Barinov
@ 2005-12-09 23:20     ` David Brownell
  0 siblings, 0 replies; 5+ messages in thread
From: David Brownell @ 2005-12-09 23:20 UTC (permalink / raw)
  To: Vladimir A. Barinov; +Cc: Peter Popov, linux-mips, ralf, linux-usb-devel

On Thursday 08 December 2005 8:51 am, Vladimir A. Barinov wrote:
> Hello Ralf, David,
> 
> Could you please advise.
> What is the right solution in the situation when USB PCI and on-chip USB 
> used in the situation when we want ohci-hcd to be a module?
> 
> Vladimir
> 
> Peter Popov wrote:
> 
> >I suppose the right solution is to be able to use the
> >on-chip usb controller as well as an external pci
> >controller. I don't think anyone will do that though.

I'm not sure why they wouldn't.  Full speed controllers
have limited bandwidth, people sometimes want more than
one just to get enough bandwidth to do whatever it is
they need USB to help with.


> >>The current ohci-hcd driver is a little defective.
> >>It's unable to use usb-ohci as modules in the case
> >>when PCI and on-chip USB are enabled.
> >>It just will not be compiled since there are two
> >>calls if module_init in ohci-hcd.

I think it'd be reasonable to expect that the two
options be (a) PCI version and/or (b) some SOC version.
Since I've never heard of a discrete OHCI part, I'll
suspect the posibillity of having several of them on
some external parallel bus is low...

Suggesting that what's needed is more at the level of
having the module_init code call a pair of #definable
routnes -- call them 'register_platform_ohci()' and
'register_pci_ohci() -- to handle either or both cases.

Then #ifndef register_platform_ohci, #define it as NOP;
likewise for the PCI version.  And for the unregisters.

I'd certainly OK merging that; it'd be general enough
to work on non-PNX hardware too.

- Dave

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

end of thread, other threads:[~2005-12-09 23:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-06 18:23 [PATCH] Philips PNX8550 USB Host driver compile fix Vladimir A. Barinov
2005-12-06 19:35 ` Peter Popov
2005-12-08 16:51   ` Vladimir A. Barinov
2005-12-09 23:20     ` David Brownell
  -- strict thread matches above, loose matches on Subject: below --
2005-12-06 18:22 Vladimir A. Barinov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox