Re: [linux-usb-devel] [PATCH] Properly unregister reboot notifier in case of failure in ehci hcd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux