diff options
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/Kconfig | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-hcd.c | 9 | ||||
-rw-r--r-- | drivers/usb/host/uhci-q.c | 19 |
3 files changed, 23 insertions, 7 deletions
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index c978d62..177e78e 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -156,7 +156,7 @@ config USB_OHCI_HCD_PCI config USB_OHCI_HCD_SSB bool "OHCI support for Broadcom SSB OHCI core" - depends on USB_OHCI_HCD && SSB && EXPERIMENTAL + depends on USB_OHCI_HCD && (SSB = y || SSB = CONFIG_USB_OHCI_HCD) && EXPERIMENTAL default n ---help--- Support for the Sonics Silicon Backplane (SSB) attached diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 240c7f5..704f33f 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -80,7 +80,10 @@ static const char hcd_name [] = "ohci_hcd"; static void ohci_dump (struct ohci_hcd *ohci, int verbose); static int ohci_init (struct ohci_hcd *ohci); static void ohci_stop (struct usb_hcd *hcd); + +#if defined(CONFIG_PM) || defined(CONFIG_PCI) static int ohci_restart (struct ohci_hcd *ohci); +#endif #include "ohci-hub.c" #include "ohci-dbg.c" @@ -396,7 +399,7 @@ static int check_ed(struct ohci_hcd *ohci, struct ed *ed) */ static void unlink_watchdog_func(unsigned long _ohci) { - long flags; + unsigned long flags; unsigned max; unsigned seen_count = 0; unsigned i; @@ -893,6 +896,8 @@ static void ohci_stop (struct usb_hcd *hcd) /*-------------------------------------------------------------------------*/ +#if defined(CONFIG_PM) || defined(CONFIG_PCI) + /* must not be called from interrupt context */ static int ohci_restart (struct ohci_hcd *ohci) { @@ -954,6 +959,8 @@ static int ohci_restart (struct ohci_hcd *ohci) return 0; } +#endif + /*-------------------------------------------------------------------------*/ #define DRIVER_INFO DRIVER_VERSION " " DRIVER_DESC diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c index e5d60d5..60379b1 100644 --- a/drivers/usb/host/uhci-q.c +++ b/drivers/usb/host/uhci-q.c @@ -1271,7 +1271,8 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb, } else if (qh->period != urb->interval) { return -EINVAL; /* Can't change the period */ - } else { /* Pick up where the last URB leaves off */ + } else { + /* Find the next unused frame */ if (list_empty(&qh->queue)) { frame = qh->iso_frame; } else { @@ -1283,10 +1284,18 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb, lurb->number_of_packets * lurb->interval; } - if (urb->transfer_flags & URB_ISO_ASAP) - urb->start_frame = frame; - else if (urb->start_frame != frame) - return -EINVAL; + if (urb->transfer_flags & URB_ISO_ASAP) { + /* Skip some frames if necessary to insure + * the start frame is in the future. + */ + uhci_get_current_frame_number(uhci); + if (uhci_frame_before_eq(frame, uhci->frame_number)) { + frame = uhci->frame_number + 1; + frame += ((qh->phase - frame) & + (qh->period - 1)); + } + } /* Otherwise pick up where the last URB leaves off */ + urb->start_frame = frame; } /* Make sure we won't have to go too far into the future */ |