Return-Path: X-Original-To: colinomail@colino.net Delivered-To: colinomail@colino.net Received: by paperstreet.colino.net (Postfix, from userid 1015) id D4F77101D9; Tue, 5 Apr 2005 23:04:04 +0200 (CEST) Received: from ylpvm43.prodigy.net (ylpvm43-ext.prodigy.net [207.115.57.74]) by paperstreet.colino.net (Postfix) with ESMTP id 1AB45101D8 for ; Tue, 5 Apr 2005 23:03:59 +0200 (CEST) Received: from pimout5-ext.prodigy.net (pimout5-ext.prodigy.net [207.115.63.73]) by ylpvm43.prodigy.net (8.12.10 outbound/8.12.10) with ESMTP id j35L3xtF003177 for ; Tue, 5 Apr 2005 17:03:59 -0400 X-ORBL: [69.107.61.180] Received: from ascent (adsl-69-107-61-180.dsl.pltn13.pacbell.net [69.107.61.180]) by pimout5-ext.prodigy.net (8.12.10 milter /8.12.10) with ESMTP id j35L3wnG060514; Tue, 5 Apr 2005 17:03:58 -0400 From: David Brownell To: linux-usb-devel@lists.sourceforge.net Subject: [patch 2.6.12-rc2] usb_suspend_device() signature change, fixes Date: Tue, 5 Apr 2005 14:03:58 -0700 User-Agent: KMail/1.7.1 Cc: Colin Leroy References: <20050405204449.5ab0cdea@jack.colino.net> In-Reply-To: <20050405204449.5ab0cdea@jack.colino.net> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_+0vUC/5ZoZwX1SM" Message-Id: <200504051403.58795.david-b@pacbell.net> X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on paperstreet.colino.net X-Spam-Level: X-Spam-Status: No, hits=0.1 required=5.0 tests=AWL autolearn=no version=2.64 X-UIDL: ]C#"!e%'#!aK2"!G7k!! --Boundary-00=_+0vUC/5ZoZwX1SM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Another resend, this is in 2.6.12-rc2-mm1 too. - Dave --Boundary-00=_+0vUC/5ZoZwX1SM Content-Type: text/x-diff; charset="us-ascii"; name="susp-0330c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="susp-0330c.patch" This patch includes minor "sparse -Wbitwise" updates for the PCI based HCDs. Almost all of them involve just changing the second parameter of the suspend() method to a pm_message_t ... the others relate to how the EHCI code walks in-memory data structures. (There's a minor bug fixed there too ... affecting the big-endian sysfs async schedule dump.) Signed-off-by: David Brownell Signed-off-by: Andrew Morton 25-akpm/drivers/usb/core/hcd.h | 4 ++-- 25-akpm/drivers/usb/host/ehci-dbg.c | 2 +- 25-akpm/drivers/usb/host/ehci-hcd.c | 4 ++-- 25-akpm/drivers/usb/host/ehci-sched.c | 4 ++-- 25-akpm/drivers/usb/host/ehci.h | 2 +- 25-akpm/drivers/usb/host/ohci-pci.c | 4 ++-- 25-akpm/drivers/usb/host/uhci-hcd.c | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) --- 25/drivers/usb/core/hcd.h~hcd-suspend-uses-pm_message_t Wed Mar 30 13:26:36 2005 +++ 25-akpm/drivers/usb/core/hcd.h Wed Mar 30 13:26:36 2005 @@ -177,7 +177,7 @@ struct hc_driver { * a whole, not just the root hub; they're for bus glue. */ /* called after all devices were suspended */ - int (*suspend) (struct usb_hcd *hcd, u32 state); + int (*suspend) (struct usb_hcd *hcd, pm_message_t message); /* called before any devices get resumed */ int (*resume) (struct usb_hcd *hcd); @@ -226,7 +226,7 @@ extern int usb_hcd_pci_probe (struct pci extern void usb_hcd_pci_remove (struct pci_dev *dev); #ifdef CONFIG_PM -extern int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state); +extern int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t state); extern int usb_hcd_pci_resume (struct pci_dev *dev); #endif /* CONFIG_PM */ --- 25/drivers/usb/host/ehci-dbg.c~hcd-suspend-uses-pm_message_t Wed Mar 30 13:26:36 2005 +++ 25-akpm/drivers/usb/host/ehci-dbg.c Wed Mar 30 13:26:36 2005 @@ -394,7 +394,7 @@ static void qh_lines ( mark = ' '; if (hw_curr == td->qtd_dma) mark = '*'; - else if (qh->hw_qtd_next == td->qtd_dma) + else if (qh->hw_qtd_next == cpu_to_le32(td->qtd_dma)) mark = '+'; else if (QTD_LENGTH (scratch)) { if (td->hw_alt_next == ehci->async->hw_alt_next) --- 25/drivers/usb/host/ehci.h~hcd-suspend-uses-pm_message_t Wed Mar 30 13:26:36 2005 +++ 25-akpm/drivers/usb/host/ehci.h Wed Mar 30 13:26:36 2005 @@ -364,7 +364,7 @@ union ehci_shadow { struct ehci_itd *itd; /* Q_TYPE_ITD */ struct ehci_sitd *sitd; /* Q_TYPE_SITD */ struct ehci_fstn *fstn; /* Q_TYPE_FSTN */ - u32 *hw_next; /* (all types) */ + __le32 *hw_next; /* (all types) */ void *ptr; }; --- 25/drivers/usb/host/ehci-hcd.c~hcd-suspend-uses-pm_message_t Wed Mar 30 13:26:36 2005 +++ 25-akpm/drivers/usb/host/ehci-hcd.c Wed Mar 30 13:26:36 2005 @@ -721,7 +721,7 @@ static int ehci_get_frame (struct usb_hc * the right sort of wakeup. */ -static int ehci_suspend (struct usb_hcd *hcd, u32 state) +static int ehci_suspend (struct usb_hcd *hcd, pm_message_t message) { struct ehci_hcd *ehci = hcd_to_ehci (hcd); @@ -729,7 +729,7 @@ static int ehci_suspend (struct usb_hcd msleep (100); #ifdef CONFIG_USB_SUSPEND - (void) usb_suspend_device (hcd->self.root_hub, state); + (void) usb_suspend_device (hcd->self.root_hub, message); #else usb_lock_device (hcd->self.root_hub); (void) ehci_hub_suspend (hcd); --- 25/drivers/usb/host/ehci-sched.c~hcd-suspend-uses-pm_message_t Wed Mar 30 13:26:36 2005 +++ 25-akpm/drivers/usb/host/ehci-sched.c Wed Mar 30 13:26:36 2005 @@ -310,9 +310,9 @@ static int qh_link_periodic (struct ehci for (i = qh->start; i < ehci->periodic_size; i += period) { union ehci_shadow *prev = &ehci->pshadow [i]; - u32 *hw_p = &ehci->periodic [i]; + __le32 *hw_p = &ehci->periodic [i]; union ehci_shadow here = *prev; - u32 type = 0; + __le32 type = 0; /* skip the iso nodes at list head */ while (here.ptr) { --- 25/drivers/usb/host/ohci-pci.c~hcd-suspend-uses-pm_message_t Wed Mar 30 13:26:36 2005 +++ 25-akpm/drivers/usb/host/ohci-pci.c Wed Mar 30 13:26:36 2005 @@ -102,7 +102,7 @@ ohci_pci_start (struct usb_hcd *hcd) #ifdef CONFIG_PM -static int ohci_pci_suspend (struct usb_hcd *hcd, u32 state) +static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message) { struct ohci_hcd *ohci = hcd_to_ohci (hcd); @@ -111,7 +111,7 @@ static int ohci_pci_suspend (struct usb_ msleep (100); #ifdef CONFIG_USB_SUSPEND - (void) usb_suspend_device (hcd->self.root_hub, state); + (void) usb_suspend_device (hcd->self.root_hub, message); #else usb_lock_device (hcd->self.root_hub); (void) ohci_hub_suspend (hcd); --- 25/drivers/usb/host/uhci-hcd.c~hcd-suspend-uses-pm_message_t Wed Mar 30 13:26:36 2005 +++ 25-akpm/drivers/usb/host/uhci-hcd.c Wed Mar 30 13:26:36 2005 @@ -716,7 +716,7 @@ static void uhci_stop(struct usb_hcd *hc } #ifdef CONFIG_PM -static int uhci_suspend(struct usb_hcd *hcd, u32 state) +static int uhci_suspend(struct usb_hcd *hcd, pm_message_t message) { struct uhci_hcd *uhci = hcd_to_uhci(hcd); _ --Boundary-00=_+0vUC/5ZoZwX1SM--