On Mon, 31 Jul 2006, Aleksey Gorelov wrote:

> > Why do you need to change the bus glue?  Wouldn't it be a lot simpler just 
> > to add ehci_shutdown as a member of ehci_pci_driver, for instance, with 
> > similar changes to ehci_hcd_au1xxx_driver and ehci_hcd_fsl_driver?
> > 
> > Alan Stern
> 
>   This avoids code duplication for common for both ehci and ohci code

What code duplication?  Doing it the way I suggested doesn't require 
adding any new code at all.  You, on the other hand, added several 
routines for bus glue that does virtually nothing.

> (and possibly for uhci, but
> it currently does not have any notifier/shutdown handler),

Yes it does.  From uhci-hcd.c:

static struct pci_driver uhci_pci_driver = {
        .name =         (char *)hcd_name,
        .id_table =     uhci_pci_ids,

        .probe =        usb_hcd_pci_probe,
        .remove =       usb_hcd_pci_remove,
        .shutdown =     uhci_shutdown,
        ^
--------^ See this?

#ifdef  CONFIG_PM
        .suspend =      usb_hcd_pci_suspend,
        .resume =       usb_hcd_pci_resume,
#endif  /* PM */
};


> and is consistent with other functions
> there.

The shutdown routine doesn't have to be consistent with other functions 
because it runs in a very special environment.  Furthermore, those other 
functions use bus glue because they need to do a lot of things in common 
with other HCDs.  A shutdown method doesn't need to do those things.

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to