mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] USB: consolidate error values from EHCI,UHCI and OHCI _suspend()
@ 2006-09-19  1:44 Jiri Kosina
  2006-09-19  2:09 ` [linux-usb-devel] [PATCH] USB: consolidate error values from EHCI, UHCI " David Brownell
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Kosina @ 2006-09-19  1:44 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-usb-devel, dbrownell, weissg

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.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-09-19 20:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-19  1:44 [PATCH] USB: consolidate error values from EHCI,UHCI and OHCI _suspend() Jiri Kosina
2006-09-19  2:09 ` [linux-usb-devel] [PATCH] USB: consolidate error values from EHCI, UHCI " David Brownell
2006-09-19 10:43   ` Jiri Kosina
2006-09-19 14:25     ` Alan Stern
2006-09-19 16:13     ` David Brownell
2006-09-19 20:32       ` Alan Stern

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