aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-dbg.c2
-rw-r--r--drivers/usb/host/ehci-hcd.c4
-rw-r--r--drivers/usb/host/ehci-mem.c3
-rw-r--r--drivers/usb/host/ehci-sched.c4
-rw-r--r--drivers/usb/host/ehci.h2
-rw-r--r--drivers/usb/host/ohci-omap.c4
-rw-r--r--drivers/usb/host/ohci-pci.c21
-rw-r--r--drivers/usb/host/ohci-pxa27x.c4
-rw-r--r--drivers/usb/host/ohci-q.c13
-rw-r--r--drivers/usb/host/ohci.h1
-rw-r--r--drivers/usb/host/uhci-hcd.c9
11 files changed, 43 insertions, 24 deletions
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
index 495e2a3ef6f..9b347d76538 100644
--- a/drivers/usb/host/ehci-dbg.c
+++ b/drivers/usb/host/ehci-dbg.c
@@ -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)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index a63bb792e2c..84d2b93aca3 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -721,7 +721,7 @@ static int ehci_get_frame (struct usb_hcd *hcd)
* 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 *hcd, u32 state)
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);
diff --git a/drivers/usb/host/ehci-mem.c b/drivers/usb/host/ehci-mem.c
index 9938697ff36..5c38ad86948 100644
--- a/drivers/usb/host/ehci-mem.c
+++ b/drivers/usb/host/ehci-mem.c
@@ -156,8 +156,7 @@ static void ehci_mem_cleanup (struct ehci_hcd *ehci)
ehci->periodic = NULL;
/* shadow periodic table */
- if (ehci->pshadow)
- kfree (ehci->pshadow);
+ kfree(ehci->pshadow);
ehci->pshadow = NULL;
}
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index f6c86354e30..2fa1ffee5ff 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -310,9 +310,9 @@ static int qh_link_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh)
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) {
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 67988dba9eb..e763a8399a7 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -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;
};
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index 90285f180f8..8aab5907afe 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -458,9 +458,11 @@ static int ohci_hcd_omap_drv_remove(struct device *dev)
/* states match PCI usage, always suspending the root hub except that
* 4 ~= D3cold (ACPI D3) with clock off (resume sees reset).
+ *
+ * FIXME: above comment is not right, and code is wrong, too :-(.
*/
-static int ohci_omap_suspend(struct device *dev, u32 state, u32 level)
+static int ohci_omap_suspend(struct device *dev, pm_message_t state, u32 level)
{
struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev));
int status = -EINVAL;
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
index b611582e6bc..57fd07d0054 100644
--- a/drivers/usb/host/ohci-pci.c
+++ b/drivers/usb/host/ohci-pci.c
@@ -54,7 +54,7 @@ ohci_pci_start (struct usb_hcd *hcd)
if (pdev->vendor == PCI_VENDOR_ID_AMD
&& pdev->device == 0x740c) {
ohci->flags = OHCI_QUIRK_AMD756;
- ohci_info (ohci, "AMD756 erratum 4 workaround\n");
+ ohci_dbg (ohci, "AMD756 erratum 4 workaround\n");
// also somewhat erratum 10 (suspend/resume issues)
}
@@ -68,7 +68,7 @@ ohci_pci_start (struct usb_hcd *hcd)
*/
else if (pdev->vendor == PCI_VENDOR_ID_OPTI
&& pdev->device == 0xc861) {
- ohci_info (ohci,
+ ohci_dbg (ohci,
"WARNING: OPTi workarounds unavailable\n");
}
@@ -84,9 +84,20 @@ ohci_pci_start (struct usb_hcd *hcd)
if (b && b->device == PCI_DEVICE_ID_NS_87560_LIO
&& b->vendor == PCI_VENDOR_ID_NS) {
ohci->flags |= OHCI_QUIRK_SUPERIO;
- ohci_info (ohci, "Using NSC SuperIO setup\n");
+ ohci_dbg (ohci, "Using NSC SuperIO setup\n");
}
}
+
+ /* Check for Compaq's ZFMicro chipset, which needs short
+ * delays before control or bulk queues get re-activated
+ * in finish_unlinks()
+ */
+ else if (pdev->vendor == PCI_VENDOR_ID_COMPAQ
+ && pdev->device == 0xa0f8) {
+ ohci->flags |= OHCI_QUIRK_ZFMICRO;
+ ohci_dbg (ohci,
+ "enabled Compaq ZFMicro chipset quirk\n");
+ }
}
/* NOTE: there may have already been a first reset, to
@@ -102,7 +113,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 +122,7 @@ static int ohci_pci_suspend (struct usb_hcd *hcd, u32 state)
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);
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index 6f3464a9577..e5bc1789d18 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -337,7 +337,7 @@ static int ohci_hcd_pxa27x_drv_remove(struct device *dev)
return 0;
}
-static int ohci_hcd_pxa27x_drv_suspend(struct device *dev, u32 state, u32 level)
+static int ohci_hcd_pxa27x_drv_suspend(struct device *dev, pm_message_t state, u32 level)
{
// struct platform_device *pdev = to_platform_device(dev);
// struct usb_hcd *hcd = dev_get_drvdata(dev);
@@ -346,7 +346,7 @@ static int ohci_hcd_pxa27x_drv_suspend(struct device *dev, u32 state, u32 level)
return 0;
}
-static int ohci_hcd_pxa27x_drv_resume(struct device *dev, u32 state)
+static int ohci_hcd_pxa27x_drv_resume(struct device *dev, u32 level)
{
// struct platform_device *pdev = to_platform_device(dev);
// struct usb_hcd *hcd = dev_get_drvdata(dev);
diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
index c90114a7727..e372306ed0d 100644
--- a/drivers/usb/host/ohci-q.c
+++ b/drivers/usb/host/ohci-q.c
@@ -1021,6 +1021,8 @@ rescan_this:
if (ohci->ed_controltail) {
command |= OHCI_CLF;
+ if (ohci->flags & OHCI_QUIRK_ZFMICRO)
+ mdelay(1);
if (!(ohci->hc_control & OHCI_CTRL_CLE)) {
control |= OHCI_CTRL_CLE;
ohci_writel (ohci, 0,
@@ -1029,6 +1031,8 @@ rescan_this:
}
if (ohci->ed_bulktail) {
command |= OHCI_BLF;
+ if (ohci->flags & OHCI_QUIRK_ZFMICRO)
+ mdelay(1);
if (!(ohci->hc_control & OHCI_CTRL_BLE)) {
control |= OHCI_CTRL_BLE;
ohci_writel (ohci, 0,
@@ -1039,12 +1043,17 @@ rescan_this:
/* CLE/BLE to enable, CLF/BLF to (maybe) kickstart */
if (control) {
ohci->hc_control |= control;
+ if (ohci->flags & OHCI_QUIRK_ZFMICRO)
+ mdelay(1);
ohci_writel (ohci, ohci->hc_control,
&ohci->regs->control);
}
- if (command)
+ if (command) {
+ if (ohci->flags & OHCI_QUIRK_ZFMICRO)
+ mdelay(1);
ohci_writel (ohci, command, &ohci->regs->cmdstatus);
- }
+ }
+ }
}
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index 2ba6e2b0210..22e1ac138ac 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -396,6 +396,7 @@ struct ohci_hcd {
#define OHCI_QUIRK_SUPERIO 0x02 /* natsemi */
#define OHCI_QUIRK_INITRESET 0x04 /* SiS, OPTi, ... */
#define OHCI_BIG_ENDIAN 0x08 /* big endian HC */
+#define OHCI_QUIRK_ZFMICRO 0x10 /* Compaq ZFMicro chipset*/
// there are also chip quirks/bugs in init logic
};
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index 324a1a9bbdb..49bd83ee0c7 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -716,7 +716,7 @@ static void uhci_stop(struct usb_hcd *hcd)
}
#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);
@@ -890,8 +890,7 @@ up_failed:
debugfs_remove(uhci_debugfs_root);
debug_failed:
- if (errbuf)
- kfree(errbuf);
+ kfree(errbuf);
errbuf_failed:
@@ -906,9 +905,7 @@ static void __exit uhci_hcd_cleanup(void)
warn("not all urb_priv's were freed!");
debugfs_remove(uhci_debugfs_root);
-
- if (errbuf)
- kfree(errbuf);
+ kfree(errbuf);
}
module_init(uhci_hcd_init);