Re: Question about EHCI PCI/platform drivers

Tzachi Perelstein <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
David Brownell wrote:
> On Tuesday 15 May 2007, Tzachi Perelstein wrote:
>> David Brownell wrote:
>>> On Sunday 13 May 2007, Tzachi Perelstein wrote:
>>>> Hello,
>>>>
>>>> I'm working on EHCI HC glue port for Marvell Orion SoC. The Orion has
>>>> a PCI/PCIE interfaces as well as an integrated USB controller.
>>>>
>>>> While looking at ehci-hcd.c it looks like there's some kind of dependency
>>>> between PCI_DRIVER and PLATFORM_DRIVER. I saw some previous threads
>>>> about the ehci-fsl.c regarding this issue, but I'm not sure I understand,
>>>> for example, why in module_init if pci_register_driver fails the platform
>>>> driver is unregistered? Shouldn't these two types of drivers be independent?
>>> If the platform has PCI but you can't register a PCI driver, it's
>>> quite broken.  How broken must a platform be before you fix those
>>> bugs, rather than expect drivers to work around them?
>> I have no problem with my PCI, it works just fine! Who said anything about
>> bugs workaround???
> 
> You -- by asking why a bug (pci_register_driver fails) should
> be handled differently (working around the failure).

Asking about some existing implementation does not necessarily mean one need a workaround.
I just wanted to better understand this dependency and perhaps improving it. That's all.

>> I was just wondering if there is a _real_ reason why *if* pci_register_driver
>> fails then the platform driver will be unregistered. Theoretically it could be that
>> PCI will fail but platform driver will work ok, so why unregistering it?? Why not
>> just dumping an error message and continuing??
> 
> No; "theoretically" pci_register_driver() has no reason to fail
> on a correctly working system.

I agree with that. However, the existing implementation _does_ handle this theoretical
pci_register_driver failure by unregistering the *platform* driver (?).
Besides arguing with me if I have a buggy PCI or not, you couldn't explain _why_ this
is the appropriate handling.

It's not that important, so you can just forget it.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.