lkml.org 
[lkml]   [2006]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [linux-usb-devel] [PATCH] Properly unregister reboot notifier in case of failure in ehci hcd
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-31 21:01    [W:0.056 / U:1.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site