[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0607311450120.8671-100000@iolanthe.rowland.org>
Date: Mon, 31 Jul 2006 14:58:07 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Aleksey Gorelov <dared1st@...oo.com>
cc: David Brownell <david-b@...bell.net>,
<linux-usb-devel@...ts.sourceforge.net>,
Andrew Morton <akpm@...l.org>, <gregkh@...e.de>,
<linux-kernel@...r.kernel.org>
Subject: Re: [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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists