From: David Brownell <david-b@pacbell.net>
To: linux-usb-devel@lists.sourceforge.net
Cc: Jiri Kosina <jikos@jikos.cz>, Andrew Morton <akpm@osdl.org>,
dbrownell@users.sourceforge.net, weissg@vienna.at,
linux-kernel@vger.kernel.org
Subject: Re: [linux-usb-devel] [PATCH] USB: consolidate error values from EHCI, UHCI and OHCI _suspend()
Date: Mon, 18 Sep 2006 19:09:52 -0700 [thread overview]
Message-ID: <200609181909.53498.david-b@pacbell.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0609190340310.9787@twin.jikos.cz>
On Monday 18 September 2006 6:44 pm, Jiri Kosina wrote:
> Hi,
>
> EHCI, UHCI and OHCI USB host drivers are not consistent when returining
> error values from their _suspend() functions, in case that the device is
> not in suspended state. This could confuse users, so let all three of them
> return -EBUSY.
Shouldn't you also update uhci_suspend()? Currently it
just ignores hcd->state ...
> Patch against 2.6.18-rc6-mm2.
>
> Signed-off-by: Jiri Kosina <jikos@jikos.cz>
>
> --- linux-2.6.18-rc6-mm2.orig/drivers/usb/host/ehci-pci.c 2006-09-14 16:20:48.000000000 +0200
> +++ linux-2.6.18-rc6-mm2/drivers/usb/host/ehci-pci.c 2006-09-19 03:20:22.000000000 +0200
> @@ -232,7 +232,7 @@ static int ehci_pci_suspend(struct usb_h
> */
> spin_lock_irqsave (&ehci->lock, flags);
> if (hcd->state != HC_STATE_SUSPENDED) {
> - rc = -EINVAL;
> + rc = -EBUSY;
> goto bail;
> }
> writel (0, &ehci->regs->intr_enable);
> --- linux-2.6.18-rc6-mm2.orig/drivers/usb/host/ohci-pci.c 2006-09-14 16:20:48.000000000 +0200
> +++ linux-2.6.18-rc6-mm2/drivers/usb/host/ohci-pci.c 2006-09-19 03:36:35.000000000 +0200
> @@ -130,7 +130,7 @@ static int ohci_pci_suspend (struct usb_
> */
> spin_lock_irqsave (&ohci->lock, flags);
> if (hcd->state != HC_STATE_SUSPENDED) {
> - rc = -EINVAL;
> + rc = -EBUSY;
> goto bail;
> }
> ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
>
> --
> Jiri Kosina
>
> -------------------------------------------------------------------------
> 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
>
next prev parent reply other threads:[~2006-09-19 2:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-19 1:44 [PATCH] USB: consolidate error values from EHCI,UHCI " Jiri Kosina
2006-09-19 2:09 ` David Brownell [this message]
2006-09-19 10:43 ` [linux-usb-devel] [PATCH] USB: consolidate error values from EHCI, UHCI " Jiri Kosina
2006-09-19 14:25 ` Alan Stern
2006-09-19 16:13 ` David Brownell
2006-09-19 20:32 ` Alan Stern
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=200609181909.53498.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=akpm@osdl.org \
--cc=dbrownell@users.sourceforge.net \
--cc=jikos@jikos.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=weissg@vienna.at \
/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
Powered by JetHome