ChangeSet 1.2181.4.39, 2005/03/21 14:43:56-08:00, [EMAIL PROTECTED]
[PATCH] USBcore and HCD updates
This is the second of five updates to usbcore:
Rename the hcd->state constants so that they all begin with
HC_STATE. Right now some of them start with HCD_STATE and
others with USB_STATE, which can be very confusing.
Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
core/hcd-pci.c | 14 +++++++-------
core/hcd.c | 22 +++++++++++-----------
core/hcd.h | 14 +++++++-------
gadget/dummy_hcd.c | 4 ++--
host/ehci-hcd.c | 24 ++++++++++++------------
host/ehci-hub.c | 10 +++++-----
host/ehci-q.c | 14 +++++++-------
host/ehci-sched.c | 12 ++++++------
host/ohci-hcd.c | 18 +++++++++---------
host/ohci-hub.c | 14 +++++++-------
host/ohci-omap.c | 2 +-
host/ohci-q.c | 10 +++++-----
host/ohci.h | 2 +-
host/sl811-hcd.c | 6 +++---
host/uhci-hcd.c | 4 ++--
15 files changed, 85 insertions(+), 85 deletions(-)
diff -Nru a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
--- a/drivers/usb/core/hcd-pci.c 2005-03-30 15:12:24 -08:00
+++ b/drivers/usb/core/hcd-pci.c 2005-03-30 15:12:24 -08:00
@@ -226,8 +226,8 @@
/* entry if root hub wasn't yet suspended ... from sysfs,
* without autosuspend, or if USB_SUSPEND isn't configured.
*/
- case USB_STATE_RUNNING:
- hcd->state = USB_STATE_QUIESCING;
+ case HC_STATE_RUNNING:
+ hcd->state = HC_STATE_QUIESCING;
retval = hcd->driver->suspend (hcd, state);
if (retval) {
dev_dbg (hcd->self.controller,
@@ -235,7 +235,7 @@
retval);
break;
}
- hcd->state = HCD_STATE_SUSPENDED;
+ hcd->state = HC_STATE_SUSPENDED;
/* FALLTHROUGH */
/* entry with CONFIG_USB_SUSPEND, or hcds that autosuspend: the
@@ -245,7 +245,7 @@
* FIXME only CONFIG_USB_SUSPEND guarantees hub_suspend() will
* have been called, otherwise root hub timers still run ...
*/
- case HCD_STATE_SUSPENDED:
+ case HC_STATE_SUSPENDED:
if (state <= dev->current_state)
break;
@@ -311,7 +311,7 @@
int has_pci_pm;
hcd = pci_get_drvdata(dev);
- if (hcd->state != HCD_STATE_SUSPENDED) {
+ if (hcd->state != HC_STATE_SUSPENDED) {
dev_dbg (hcd->self.controller,
"can't resume, not suspended!\n");
return 0;
@@ -323,7 +323,7 @@
pci_state(dev->current_state),
has_pci_pm ? "" : " (legacy)");
- hcd->state = USB_STATE_RESUMING;
+ hcd->state = HC_STATE_RESUMING;
if (has_pci_pm)
pci_set_power_state (dev, 0);
@@ -343,7 +343,7 @@
#endif
retval = hcd->driver->resume (hcd);
- if (!HCD_IS_RUNNING (hcd->state)) {
+ if (!HC_IS_RUNNING (hcd->state)) {
dev_dbg (hcd->self.controller,
"resume fail, retval %d\n", retval);
usb_hc_died (hcd);
diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
--- a/drivers/usb/core/hcd.c 2005-03-30 15:12:24 -08:00
+++ b/drivers/usb/core/hcd.c 2005-03-30 15:12:24 -08:00
@@ -455,7 +455,7 @@
default:
/* non-generic request */
- if (HCD_IS_SUSPENDED (hcd->state))
+ if (HC_IS_SUSPENDED (hcd->state))
status = -EAGAIN;
else {
switch (typeReq) {
@@ -1117,8 +1117,8 @@
else if (unlikely (urb->reject))
status = -EPERM;
else switch (hcd->state) {
- case USB_STATE_RUNNING:
- case USB_STATE_RESUMING:
+ case HC_STATE_RUNNING:
+ case HC_STATE_RESUMING:
usb_get_dev (urb->dev);
list_add_tail (&urb->urb_list, &ep->urb_list);
status = 0;
@@ -1192,7 +1192,7 @@
static int hcd_get_frame_number (struct usb_device *udev)
{
struct usb_hcd *hcd = (struct usb_hcd *)udev->bus->hcpriv;
- if (!HCD_IS_RUNNING (hcd->state))
+ if (!HC_IS_RUNNING (hcd->state))
return -ESHUTDOWN;
return hcd->driver->get_frame_number (hcd);
}
@@ -1274,7 +1274,7 @@
* halted ~= no unlink handshake is needed
* suspended, resuming == should never happen
*/
- WARN_ON (!HCD_IS_RUNNING (hcd->state) && hcd->state != USB_STATE_HALT);
+ WARN_ON (!HC_IS_RUNNING (hcd->state) && hcd->state != HC_STATE_HALT);
/* insist the urb is still queued */
list_for_each(tmp, &ep->urb_list) {
@@ -1341,7 +1341,7 @@
hcd = udev->bus->hcpriv;
- WARN_ON (!HCD_IS_RUNNING (hcd->state) && hcd->state != USB_STATE_HALT);
+ WARN_ON (!HC_IS_RUNNING (hcd->state) && hcd->state != HC_STATE_HALT);
local_irq_disable ();
@@ -1552,13 +1552,13 @@
struct usb_hcd *hcd = __hcd;
int start = hcd->state;
- if (start == USB_STATE_HALT)
+ if (start == HC_STATE_HALT)
return IRQ_NONE;
if (hcd->driver->irq (hcd, r) == IRQ_NONE)
return IRQ_NONE;
hcd->saw_irq = 1;
- if (hcd->state != start && hcd->state == USB_STATE_HALT)
+ if (hcd->state != start && hcd->state == HC_STATE_HALT)
usb_hc_died (hcd);
return IRQ_HANDLED;
}
@@ -1733,14 +1733,14 @@
{
dev_info(hcd->self.controller, "remove, state %x\n", hcd->state);
- if (HCD_IS_RUNNING (hcd->state))
- hcd->state = USB_STATE_QUIESCING;
+ if (HC_IS_RUNNING (hcd->state))
+ hcd->state = HC_STATE_QUIESCING;
dev_dbg(hcd->self.controller, "roothub graceful disconnect\n");
usb_disconnect(&hcd->self.root_hub);
hcd->driver->stop(hcd);
- hcd->state = USB_STATE_HALT;
+ hcd->state = HC_STATE_HALT;
if (hcd->irq >= 0)
free_irq(hcd->irq, hcd);
diff -Nru a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h
--- a/drivers/usb/core/hcd.h 2005-03-30 15:12:24 -08:00
+++ b/drivers/usb/core/hcd.h 2005-03-30 15:12:24 -08:00
@@ -87,14 +87,14 @@
# define __SUSPEND 0x04
# define __TRANSIENT 0x80
-# define USB_STATE_HALT 0
-# define USB_STATE_RUNNING (__ACTIVE)
-# define USB_STATE_QUIESCING (__SUSPEND|__TRANSIENT|__ACTIVE)
-# define USB_STATE_RESUMING (__SUSPEND|__TRANSIENT)
-# define HCD_STATE_SUSPENDED (__SUSPEND)
+# define HC_STATE_HALT 0
+# define HC_STATE_RUNNING (__ACTIVE)
+# define HC_STATE_QUIESCING (__SUSPEND|__TRANSIENT|__ACTIVE)
+# define HC_STATE_RESUMING (__SUSPEND|__TRANSIENT)
+# define HC_STATE_SUSPENDED (__SUSPEND)
-#define HCD_IS_RUNNING(state) ((state) & __ACTIVE)
-#define HCD_IS_SUSPENDED(state) ((state) & __SUSPEND)
+#define HC_IS_RUNNING(state) ((state) & __ACTIVE)
+#define HC_IS_SUSPENDED(state) ((state) & __SUSPEND)
/* more shared queuing code would be good; it should support
* smarter scheduling, handle transaction translators, etc;
diff -Nru a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
--- a/drivers/usb/gadget/dummy_hcd.c 2005-03-30 15:12:24 -08:00
+++ b/drivers/usb/gadget/dummy_hcd.c 2005-03-30 15:12:24 -08:00
@@ -1647,7 +1647,7 @@
return -ENOMEM;
/* root hub enters addressed state... */
- hcd->state = USB_STATE_RUNNING;
+ hcd->state = HC_STATE_RUNNING;
root->speed = USB_SPEED_HIGH;
/* ...then configured, so khubd sees us. */
@@ -1669,7 +1669,7 @@
usb_disconnect (&hcd->self.root_hub);
err1:
usb_put_dev (root);
- hcd->state = USB_STATE_QUIESCING;
+ hcd->state = HC_STATE_QUIESCING;
return retval;
}
diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
--- a/drivers/usb/host/ehci-hcd.c 2005-03-30 15:12:24 -08:00
+++ b/drivers/usb/host/ehci-hcd.c 2005-03-30 15:12:24 -08:00
@@ -212,7 +212,7 @@
command |= CMD_RESET;
dbg_cmd (ehci, "reset", command);
writel (command, &ehci->regs->command);
- ehci_to_hcd(ehci)->state = USB_STATE_HALT;
+ ehci_to_hcd(ehci)->state = HC_STATE_HALT;
ehci->next_statechange = jiffies;
retval = handshake (&ehci->regs->command, CMD_RESET, 0, 250 * 1000);
@@ -231,7 +231,7 @@
u32 temp;
#ifdef DEBUG
- if (!HCD_IS_RUNNING (ehci_to_hcd(ehci)->state))
+ if (!HC_IS_RUNNING (ehci_to_hcd(ehci)->state))
BUG ();
#endif
@@ -240,7 +240,7 @@
temp &= STS_ASS | STS_PSS;
if (handshake (&ehci->regs->status, STS_ASS | STS_PSS,
temp, 16 * 125) != 0) {
- ehci_to_hcd(ehci)->state = USB_STATE_HALT;
+ ehci_to_hcd(ehci)->state = HC_STATE_HALT;
return;
}
@@ -252,7 +252,7 @@
/* hardware can take 16 microframes to turn off ... */
if (handshake (&ehci->regs->status, STS_ASS | STS_PSS,
0, 16 * 125) != 0) {
- ehci_to_hcd(ehci)->state = USB_STATE_HALT;
+ ehci_to_hcd(ehci)->state = HC_STATE_HALT;
return;
}
}
@@ -615,7 +615,7 @@
register_reboot_notifier (&ehci->reboot_notifier);
}
- hcd->state = USB_STATE_RUNNING;
+ hcd->state = HC_STATE_RUNNING;
writel (FLAG_CF, &ehci->regs->configured_flag);
readl (&ehci->regs->command); /* unblock posted write */
@@ -636,7 +636,7 @@
* and device drivers may start it running.
*/
if (first && usb_hcd_register_root_hub (udev, hcd) != 0) {
- if (hcd->state == USB_STATE_RUNNING)
+ if (hcd->state == HC_STATE_RUNNING)
ehci_quiesce (ehci);
ehci_reset (ehci);
usb_put_dev (udev);
@@ -672,7 +672,7 @@
del_timer_sync (&ehci->watchdog);
spin_lock_irq(&ehci->lock);
- if (HCD_IS_RUNNING (hcd->state))
+ if (HC_IS_RUNNING (hcd->state))
ehci_quiesce (ehci);
ehci_reset (ehci);
@@ -839,7 +839,7 @@
* misplace IRQs, and should let us run completely without IRQs.
* such lossage has been observed on both VT6202 and VT8235.
*/
- if (HCD_IS_RUNNING (ehci_to_hcd(ehci)->state) &&
+ if (HC_IS_RUNNING (ehci_to_hcd(ehci)->state) &&
(ehci->async->qh_next.ptr != NULL ||
ehci->periodic_sched != 0))
timer_action (ehci, TIMER_IO_WATCHDOG);
@@ -1000,7 +1000,7 @@
/* if we need to use IAA and it's busy, defer */
if (qh->qh_state == QH_STATE_LINKED
&& ehci->reclaim
- && HCD_IS_RUNNING (ehci_to_hcd(ehci)->state)) {
+ && HC_IS_RUNNING (ehci_to_hcd(ehci)->state)) {
struct ehci_qh *last;
for (last = ehci->reclaim;
@@ -1011,7 +1011,7 @@
last->reclaim = qh;
/* bypass IAA if the hc can't care */
- } else if (!HCD_IS_RUNNING (ehci_to_hcd(ehci)->state) && ehci->reclaim)
+ } else if (!HC_IS_RUNNING (ehci_to_hcd(ehci)->state) && ehci->reclaim)
end_unlink_async (ehci, NULL);
/* something else might have unlinked the qh by now */
@@ -1059,7 +1059,7 @@
/* reschedule QH iff another request is queued */
if (!list_empty (&qh->qtd_list)
- && HCD_IS_RUNNING (hcd->state)) {
+ && HC_IS_RUNNING (hcd->state)) {
int status;
status = qh_schedule (ehci, qh);
@@ -1115,7 +1115,7 @@
goto idle_timeout;
}
- if (!HCD_IS_RUNNING (hcd->state))
+ if (!HC_IS_RUNNING (hcd->state))
qh->qh_state = QH_STATE_IDLE;
switch (qh->qh_state) {
case QH_STATE_LINKED:
diff -Nru a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
--- a/drivers/usb/host/ehci-hub.c 2005-03-30 15:12:24 -08:00
+++ b/drivers/usb/host/ehci-hub.c 2005-03-30 15:12:24 -08:00
@@ -42,9 +42,9 @@
spin_lock_irq (&ehci->lock);
/* stop schedules, clean any completed work */
- if (HCD_IS_RUNNING(hcd->state)) {
+ if (HC_IS_RUNNING(hcd->state)) {
ehci_quiesce (ehci);
- hcd->state = USB_STATE_QUIESCING;
+ hcd->state = HC_STATE_QUIESCING;
}
ehci->command = readl (&ehci->regs->command);
if (ehci->reclaim)
@@ -73,7 +73,7 @@
/* turn off now-idle HC */
ehci_halt (ehci);
- hcd->state = HCD_STATE_SUSPENDED;
+ hcd->state = HC_STATE_SUSPENDED;
ehci->next_statechange = jiffies + msecs_to_jiffies(10);
spin_unlock_irq (&ehci->lock);
@@ -145,7 +145,7 @@
}
ehci->next_statechange = jiffies + msecs_to_jiffies(5);
- hcd->state = USB_STATE_RUNNING;
+ hcd->state = HC_STATE_RUNNING;
/* Now we can safely re-enable irqs */
if (intr_enable)
@@ -212,7 +212,7 @@
unsigned long flags;
/* if !USB_SUSPEND, root hub timers won't get shut down ... */
- if (!HCD_IS_RUNNING(hcd->state))
+ if (!HC_IS_RUNNING(hcd->state))
return 0;
/* init status to no-changes */
diff -Nru a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
--- a/drivers/usb/host/ehci-q.c 2005-03-30 15:12:24 -08:00
+++ b/drivers/usb/host/ehci-q.c 2005-03-30 15:12:24 -08:00
@@ -349,13 +349,13 @@
/* stop scanning when we reach qtds the hc is using */
} else if (likely (!stopped
- && HCD_IS_RUNNING (ehci_to_hcd(ehci)->state))) {
+ && HC_IS_RUNNING (ehci_to_hcd(ehci)->state))) {
break;
} else {
stopped = 1;
- if (unlikely (!HCD_IS_RUNNING
(ehci_to_hcd(ehci)->state)))
+ if (unlikely (!HC_IS_RUNNING
(ehci_to_hcd(ehci)->state)))
urb->status = -ESHUTDOWN;
/* ignore active urbs unless some previous qtd
@@ -781,7 +781,7 @@
(void) handshake (&ehci->regs->status, STS_ASS, 0, 150);
cmd |= CMD_ASE | CMD_RUN;
writel (cmd, &ehci->regs->command);
- ehci_to_hcd(ehci)->state = USB_STATE_RUNNING;
+ ehci_to_hcd(ehci)->state = HC_STATE_RUNNING;
/* posted write need not be known to HC yet ... */
}
}
@@ -960,7 +960,7 @@
qh_completions (ehci, qh, regs);
if (!list_empty (&qh->qtd_list)
- && HCD_IS_RUNNING (ehci_to_hcd(ehci)->state))
+ && HC_IS_RUNNING (ehci_to_hcd(ehci)->state))
qh_link_async (ehci, qh);
else {
qh_put (qh); // refcount from async list
@@ -968,7 +968,7 @@
/* it's not free to turn the async schedule on/off; leave it
* active but idle for a while once it empties.
*/
- if (HCD_IS_RUNNING (ehci_to_hcd(ehci)->state)
+ if (HC_IS_RUNNING (ehci_to_hcd(ehci)->state)
&& ehci->async->qh_next.qh == NULL)
timer_action (ehci, TIMER_ASYNC_OFF);
}
@@ -999,7 +999,7 @@
/* stop async schedule right now? */
if (unlikely (qh == ehci->async)) {
/* can't get here without STS_ASS set */
- if (ehci_to_hcd(ehci)->state != USB_STATE_HALT) {
+ if (ehci_to_hcd(ehci)->state != HC_STATE_HALT) {
writel (cmd & ~CMD_ASE, &ehci->regs->command);
wmb ();
// handshake later, if we need to
@@ -1019,7 +1019,7 @@
prev->qh_next = qh->qh_next;
wmb ();
- if (unlikely (ehci_to_hcd(ehci)->state == USB_STATE_HALT)) {
+ if (unlikely (ehci_to_hcd(ehci)->state == HC_STATE_HALT)) {
/* if (unlikely (qh->reclaim != 0))
* this will recurse, probably not much
*/
diff -Nru a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
--- a/drivers/usb/host/ehci-sched.c 2005-03-30 15:12:24 -08:00
+++ b/drivers/usb/host/ehci-sched.c 2005-03-30 15:12:24 -08:00
@@ -249,14 +249,14 @@
*/
status = handshake (&ehci->regs->status, STS_PSS, 0, 9 * 125);
if (status != 0) {
- ehci_to_hcd(ehci)->state = USB_STATE_HALT;
+ ehci_to_hcd(ehci)->state = HC_STATE_HALT;
return status;
}
cmd = readl (&ehci->regs->command) | CMD_PSE;
writel (cmd, &ehci->regs->command);
/* posted write ... PSS happens later */
- ehci_to_hcd(ehci)->state = USB_STATE_RUNNING;
+ ehci_to_hcd(ehci)->state = HC_STATE_RUNNING;
/* make sure ehci_work scans these */
ehci->next_uframe = readl (&ehci->regs->frame_index)
@@ -274,7 +274,7 @@
*/
status = handshake (&ehci->regs->status, STS_PSS, STS_PSS, 9 * 125);
if (status != 0) {
- ehci_to_hcd(ehci)->state = USB_STATE_HALT;
+ ehci_to_hcd(ehci)->state = HC_STATE_HALT;
return status;
}
@@ -1864,7 +1864,7 @@
* Touches as few pages as possible: cache-friendly.
*/
now_uframe = ehci->next_uframe;
- if (HCD_IS_RUNNING (ehci_to_hcd(ehci)->state))
+ if (HC_IS_RUNNING (ehci_to_hcd(ehci)->state))
clock = readl (&ehci->regs->frame_index);
else
clock = now_uframe + mod - 1;
@@ -1898,7 +1898,7 @@
union ehci_shadow temp;
int live;
- live = HCD_IS_RUNNING (ehci_to_hcd(ehci)->state);
+ live = HC_IS_RUNNING (ehci_to_hcd(ehci)->state);
switch (type) {
case Q_TYPE_QH:
/* handle any completions */
@@ -1987,7 +1987,7 @@
if (now_uframe == clock) {
unsigned now;
- if (!HCD_IS_RUNNING (ehci_to_hcd(ehci)->state))
+ if (!HC_IS_RUNNING (ehci_to_hcd(ehci)->state))
break;
ehci->next_uframe = now_uframe;
now = readl (&ehci->regs->frame_index) % mod;
diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
--- a/drivers/usb/host/ohci-hcd.c 2005-03-30 15:12:24 -08:00
+++ b/drivers/usb/host/ohci-hcd.c 2005-03-30 15:12:24 -08:00
@@ -252,7 +252,7 @@
spin_lock_irqsave (&ohci->lock, flags);
/* don't submit to a dead HC */
- if (!HCD_IS_RUNNING(hcd->state)) {
+ if (!HC_IS_RUNNING(hcd->state)) {
retval = -ENODEV;
goto fail;
}
@@ -320,7 +320,7 @@
#endif
spin_lock_irqsave (&ohci->lock, flags);
- if (HCD_IS_RUNNING(hcd->state)) {
+ if (HC_IS_RUNNING(hcd->state)) {
urb_priv_t *urb_priv;
/* Unless an IRQ completed the unlink while it was being
@@ -367,7 +367,7 @@
rescan:
spin_lock_irqsave (&ohci->lock, flags);
- if (!HCD_IS_RUNNING (hcd->state)) {
+ if (!HC_IS_RUNNING (hcd->state)) {
sanitize:
ed->state = ED_IDLE;
finish_unlinks (ohci, 0, NULL);
@@ -620,7 +620,7 @@
ohci->hc_control &= OHCI_CTRL_RWC;
ohci->hc_control |= OHCI_CONTROL_INIT | OHCI_USB_OPER;
ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
- ohci_to_hcd(ohci)->state = USB_STATE_RUNNING;
+ ohci_to_hcd(ohci)->state = HC_STATE_RUNNING;
/* wake on ConnectStatusChange, matching external hubs */
ohci_writel (ohci, RH_HS_DRWE, &ohci->regs->roothub.status);
@@ -656,7 +656,7 @@
// POTPGT delay is bits 24-31, in 2 ms units.
mdelay ((temp >> 23) & 0x1fe);
bus = &ohci_to_hcd(ohci)->self;
- ohci_to_hcd(ohci)->state = USB_STATE_RUNNING;
+ ohci_to_hcd(ohci)->state = HC_STATE_RUNNING;
ohci_dump (ohci, 1);
@@ -732,12 +732,12 @@
}
if (ints & OHCI_INTR_WDH) {
- if (HCD_IS_RUNNING(hcd->state))
+ if (HC_IS_RUNNING(hcd->state))
ohci_writel (ohci, OHCI_INTR_WDH, ®s->intrdisable);
spin_lock (&ohci->lock);
dl_done_list (ohci, ptregs);
spin_unlock (&ohci->lock);
- if (HCD_IS_RUNNING(hcd->state))
+ if (HC_IS_RUNNING(hcd->state))
ohci_writel (ohci, OHCI_INTR_WDH, ®s->intrenable);
}
@@ -750,11 +750,11 @@
if (ohci->ed_rm_list)
finish_unlinks (ohci, ohci_frame_no(ohci), ptregs);
if ((ints & OHCI_INTR_SF) != 0 && !ohci->ed_rm_list
- && HCD_IS_RUNNING(hcd->state))
+ && HC_IS_RUNNING(hcd->state))
ohci_writel (ohci, OHCI_INTR_SF, ®s->intrdisable);
spin_unlock (&ohci->lock);
- if (HCD_IS_RUNNING(hcd->state)) {
+ if (HC_IS_RUNNING(hcd->state)) {
ohci_writel (ohci, ints, ®s->intrstatus);
ohci_writel (ohci, OHCI_INTR_MIE, ®s->intrenable);
// flush those writes
diff -Nru a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
--- a/drivers/usb/host/ohci-hub.c 2005-03-30 15:12:24 -08:00
+++ b/drivers/usb/host/ohci-hub.c 2005-03-30 15:12:24 -08:00
@@ -73,7 +73,7 @@
ohci_dbg (ohci, "suspend root hub\n");
/* First stop any processing */
- hcd->state = USB_STATE_QUIESCING;
+ hcd->state = HC_STATE_QUIESCING;
if (ohci->hc_control & OHCI_SCHED_ENABLES) {
int limit;
@@ -119,7 +119,7 @@
done:
if (status == 0)
- hcd->state = HCD_STATE_SUSPENDED;
+ hcd->state = HC_STATE_SUSPENDED;
spin_unlock_irqrestore (&ohci->lock, flags);
return status;
}
@@ -147,7 +147,7 @@
if (ohci->hc_control & (OHCI_CTRL_IR | OHCI_SCHED_ENABLES)) {
/* this can happen after suspend-to-disk */
- if (hcd->state == USB_STATE_RESUMING) {
+ if (hcd->state == HC_STATE_RESUMING) {
ohci_dbg (ohci, "BIOS/SMM active, control %03x\n",
ohci->hc_control);
status = -EBUSY;
@@ -198,7 +198,7 @@
}
/* Some controllers (lucent) need extra-long delays */
- hcd->state = USB_STATE_RESUMING;
+ hcd->state = HC_STATE_RESUMING;
mdelay (20 /* usb 11.5.1.10 */ + 15);
temp = ohci_readl (ohci, &ohci->regs->control);
@@ -272,7 +272,7 @@
(void) ohci_readl (ohci, &ohci->regs->control);
}
- hcd->state = USB_STATE_RUNNING;
+ hcd->state = HC_STATE_RUNNING;
return 0;
}
@@ -313,7 +313,7 @@
* letting khubd or root hub timer see state changes.
*/
if ((ohci->hc_control & OHCI_CTRL_HCFS) != OHCI_USB_OPER
- || !HCD_IS_RUNNING(hcd->state)) {
+ || !HC_IS_RUNNING(hcd->state)) {
can_suspend = 0;
goto done;
}
@@ -378,7 +378,7 @@
) {
ohci_vdbg (ohci, "autosuspend\n");
(void) ohci_hub_suspend (hcd);
- hcd->state = USB_STATE_RUNNING;
+ hcd->state = HC_STATE_RUNNING;
usb_unlock_device (hcd->self.root_hub);
}
#endif
diff -Nru a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
--- a/drivers/usb/host/ohci-omap.c 2005-03-30 15:12:24 -08:00
+++ b/drivers/usb/host/ohci-omap.c 2005-03-30 15:12:24 -08:00
@@ -499,7 +499,7 @@
USB_STATE_SUSPENDED;
state = 4;
}
- ohci_to_hcd(ohci)->state = HCD_STATE_SUSPENDED;
+ ohci_to_hcd(ohci)->state = HC_STATE_SUSPENDED;
dev->power.power_state = state;
}
up(&ohci_to_hcd(ohci)->self.root_hub->serialize);
diff -Nru a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
--- a/drivers/usb/host/ohci-q.c 2005-03-30 15:12:24 -08:00
+++ b/drivers/usb/host/ohci-q.c 2005-03-30 15:12:24 -08:00
@@ -172,7 +172,7 @@
{
int branch;
- if (ohci_to_hcd(ohci)->state == USB_STATE_QUIESCING)
+ if (ohci_to_hcd(ohci)->state == HC_STATE_QUIESCING)
return -EAGAIN;
ed->state = ED_OPER;
@@ -923,7 +923,7 @@
/* only take off EDs that the HC isn't using, accounting for
* frame counter wraps and EDs with partially retired TDs
*/
- if (likely (regs && HCD_IS_RUNNING(ohci_to_hcd(ohci)->state))) {
+ if (likely (regs && HC_IS_RUNNING(ohci_to_hcd(ohci)->state))) {
if (tick_before (tick, ed->tick)) {
skip_ed:
last = &ed->ed_next;
@@ -1005,7 +1005,7 @@
/* but if there's work queued, reschedule */
if (!list_empty (&ed->td_list)) {
- if (HCD_IS_RUNNING(ohci_to_hcd(ohci)->state))
+ if (HC_IS_RUNNING(ohci_to_hcd(ohci)->state))
ed_schedule (ohci, ed);
}
@@ -1014,8 +1014,8 @@
}
/* maybe reenable control and bulk lists */
- if (HCD_IS_RUNNING(ohci_to_hcd(ohci)->state)
- && ohci_to_hcd(ohci)->state != USB_STATE_QUIESCING
+ if (HC_IS_RUNNING(ohci_to_hcd(ohci)->state)
+ && ohci_to_hcd(ohci)->state != HC_STATE_QUIESCING
&& !ohci->ed_rm_list) {
u32 command = 0, control = 0;
diff -Nru a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
--- a/drivers/usb/host/ohci.h 2005-03-30 15:12:24 -08:00
+++ b/drivers/usb/host/ohci.h 2005-03-30 15:12:24 -08:00
@@ -594,7 +594,7 @@
static inline void disable (struct ohci_hcd *ohci)
{
- ohci_to_hcd(ohci)->state = USB_STATE_HALT;
+ ohci_to_hcd(ohci)->state = HC_STATE_HALT;
}
#define FI 0x2edf /* 12000 bits per frame
(-1) */
diff -Nru a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
--- a/drivers/usb/host/sl811-hcd.c 2005-03-30 15:12:24 -08:00
+++ b/drivers/usb/host/sl811-hcd.c 2005-03-30 15:12:24 -08:00
@@ -105,7 +105,7 @@
} else {
sl811->port1 = 0;
sl811->irq_enable = 0;
- hcd->state = USB_STATE_HALT;
+ hcd->state = HC_STATE_HALT;
hcd->self.controller->power.power_state = PM_SUSPEND_DISK;
}
sl811->ctrl1 = 0;
@@ -834,7 +834,7 @@
/* don't submit to a dead or disabled port */
if (!(sl811->port1 & (1 << USB_PORT_FEAT_ENABLE))
- || !HCD_IS_RUNNING(hcd->state)) {
+ || !HC_IS_RUNNING(hcd->state)) {
retval = -ENODEV;
goto fail;
}
@@ -1562,7 +1562,7 @@
return -ENOMEM;
udev->speed = USB_SPEED_FULL;
- hcd->state = USB_STATE_RUNNING;
+ hcd->state = HC_STATE_RUNNING;
if (sl811->board)
hcd->can_wakeup = sl811->board->can_wakeup;
diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
--- a/drivers/usb/host/uhci-hcd.c 2005-03-30 15:12:24 -08:00
+++ b/drivers/usb/host/uhci-hcd.c 2005-03-30 15:12:24 -08:00
@@ -414,7 +414,7 @@
}
/* Mark controller as running before we enable interrupts */
- uhci_to_hcd(uhci)->state = USB_STATE_RUNNING;
+ uhci_to_hcd(uhci)->state = HC_STATE_RUNNING;
/* Turn on PIRQ and all interrupts */
pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP,
@@ -803,7 +803,7 @@
if ((rc = start_hc(uhci)) != 0)
return rc;
}
- hcd->state = USB_STATE_RUNNING;
+ hcd->state = HC_STATE_RUNNING;
return 0;
}
#endif
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html