public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, linux-usb-devel@lists.sourceforge.net
Cc: david-b@pacbell.net
Subject: [PATCH] USB: ehci fixups
Date: Tue, 29 Nov 2005 21:58:37 -0800	[thread overview]
Message-ID: <1133330317542@kroah.com> (raw)
In-Reply-To: <1133330317951@kroah.com>

[PATCH] USB: ehci fixups

Rename the EHCI "reset" routine so it better matches what it does (setup);
and move the one-time data structure setup earlier, before doing anything
that implicitly relies on it having been completed already.

From: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
commit 8926bfa7462d4c3f8b05cca929e0c4bcde93ae38
tree 52f6841e035827751efee6b4616f84606db70663
parent 8de98402652c01839ae321be6cb3054cf5735d83
author David Brownell <david-b@pacbell.net> Mon, 28 Nov 2005 08:40:38 -0800
committer Greg Kroah-Hartman <gregkh@suse.de> Tue, 29 Nov 2005 21:39:23 -0800

 drivers/usb/host/ehci-pci.c |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 14fff57..13f73a8 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -121,8 +121,8 @@ static int ehci_pci_reinit(struct ehci_h
 	return 0;
 }
 
-/* called by khubd or root hub (re)init threads; leaves HC in halt state */
-static int ehci_pci_reset(struct usb_hcd *hcd)
+/* called during probe() after chip reset completes */
+static int ehci_pci_setup(struct usb_hcd *hcd)
 {
 	struct ehci_hcd		*ehci = hcd_to_ehci(hcd);
 	struct pci_dev		*pdev = to_pci_dev(hcd->self.controller);
@@ -141,6 +141,11 @@ static int ehci_pci_reset(struct usb_hcd
 	if (retval)
 		return retval;
 
+	/* data structure init */
+	retval = ehci_init(hcd);
+	if (retval)
+		return retval;
+
 	/* NOTE:  only the parts below this line are PCI-specific */
 
 	switch (pdev->vendor) {
@@ -154,7 +159,8 @@ static int ehci_pci_reset(struct usb_hcd
 		/* AMD8111 EHCI doesn't work, according to AMD errata */
 		if (pdev->device == 0x7463) {
 			ehci_info(ehci, "ignoring AMD8111 (errata)\n");
-			return -EIO;
+			retval = -EIO;
+			goto done;
 		}
 		break;
 	case PCI_VENDOR_ID_NVIDIA:
@@ -207,9 +213,8 @@ static int ehci_pci_reset(struct usb_hcd
 	/* REVISIT:  per-port wake capability (PCI 0x62) currently unused */
 
 	retval = ehci_pci_reinit(ehci, pdev);
-
-	/* finish init */
-	return ehci_init(hcd);
+done:
+	return retval;
 }
 
 /*-------------------------------------------------------------------------*/
@@ -344,7 +349,7 @@ static const struct hc_driver ehci_pci_h
 	/*
 	 * basic lifecycle operations
 	 */
-	.reset =		ehci_pci_reset,
+	.reset =		ehci_pci_setup,
 	.start =		ehci_run,
 #ifdef	CONFIG_PM
 	.suspend =		ehci_pci_suspend,


  reply	other threads:[~2005-11-30  5:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-30  5:56 [GIT PATCH] USB patches for 2.6.15-rc3 Greg KH
2005-11-30  5:58 ` [PATCH] USB: documentation update Greg KH
2005-11-30  5:58   ` [PATCH] hwmon: w83792d fix unused fan pins Greg KH
2005-11-30  5:58     ` [PATCH] pci_ids.h: remove duplicate entries Greg KH
2005-11-30  5:58       ` [PATCH] Additional device ID for Conexant AccessRunner USB driver Greg KH
2005-11-30  5:58         ` Greg KH [this message]
2005-11-30  5:58           ` [PATCH] USB: Fix USB suspend/resume crasher (#2) Greg KH
2005-11-30  8:09         ` [linux-usb-devel] [PATCH] Additional device ID for Conexant AccessRunner USB driver Duncan Sands
2005-11-30 22:30           ` Greg KH
2005-12-01  7:50             ` Duncan Sands
2005-11-30 18:23 ` [GIT PATCH] USB patches for 2.6.15-rc3 Linus Torvalds
2005-11-30 19:35   ` Greg KH
2005-11-30 20:35     ` Grant Coady
2005-12-01  4:10     ` (no subject) Glenn L Shurson
2005-11-30 19:39 ` [GIT PATCH] USB patches for 2.6.15-rc3 Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1133330317542@kroah.com \
    --to=gregkh@suse.de \
    --cc=david-b@pacbell.net \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox