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 c978d622fa8a..177e78ed241b 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig | |||
@@ -156,7 +156,7 @@ config USB_OHCI_HCD_PCI | |||
156 | 156 | ||
157 | config USB_OHCI_HCD_SSB | 157 | config USB_OHCI_HCD_SSB |
158 | bool "OHCI support for Broadcom SSB OHCI core" | 158 | bool "OHCI support for Broadcom SSB OHCI core" |
159 | depends on USB_OHCI_HCD && SSB && EXPERIMENTAL | 159 | depends on USB_OHCI_HCD && (SSB = y || SSB = CONFIG_USB_OHCI_HCD) && EXPERIMENTAL |
160 | default n | 160 | default n |
161 | ---help--- | 161 | ---help--- |
162 | Support for the Sonics Silicon Backplane (SSB) attached | 162 | 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 240c7f507541..704f33fdd2f1 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"; | |||
80 | static void ohci_dump (struct ohci_hcd *ohci, int verbose); | 80 | static void ohci_dump (struct ohci_hcd *ohci, int verbose); |
81 | static int ohci_init (struct ohci_hcd *ohci); | 81 | static int ohci_init (struct ohci_hcd *ohci); |
82 | static void ohci_stop (struct usb_hcd *hcd); | 82 | static void ohci_stop (struct usb_hcd *hcd); |
83 | |||
84 | #if defined(CONFIG_PM) || defined(CONFIG_PCI) | ||
83 | static int ohci_restart (struct ohci_hcd *ohci); | 85 | static int ohci_restart (struct ohci_hcd *ohci); |
86 | #endif | ||
84 | 87 | ||
85 | #include "ohci-hub.c" | 88 | #include "ohci-hub.c" |
86 | #include "ohci-dbg.c" | 89 | #include "ohci-dbg.c" |
@@ -396,7 +399,7 @@ static int check_ed(struct ohci_hcd *ohci, struct ed *ed) | |||
396 | */ | 399 | */ |
397 | static void unlink_watchdog_func(unsigned long _ohci) | 400 | static void unlink_watchdog_func(unsigned long _ohci) |
398 | { | 401 | { |
399 | long flags; | 402 | unsigned long flags; |
400 | unsigned max; | 403 | unsigned max; |
401 | unsigned seen_count = 0; | 404 | unsigned seen_count = 0; |
402 | unsigned i; | 405 | unsigned i; |
@@ -893,6 +896,8 @@ static void ohci_stop (struct usb_hcd *hcd) | |||
893 | 896 | ||
894 | /*-------------------------------------------------------------------------*/ | 897 | /*-------------------------------------------------------------------------*/ |
895 | 898 | ||
899 | #if defined(CONFIG_PM) || defined(CONFIG_PCI) | ||
900 | |||
896 | /* must not be called from interrupt context */ | 901 | /* must not be called from interrupt context */ |
897 | static int ohci_restart (struct ohci_hcd *ohci) | 902 | static int ohci_restart (struct ohci_hcd *ohci) |
898 | { | 903 | { |
@@ -954,6 +959,8 @@ static int ohci_restart (struct ohci_hcd *ohci) | |||
954 | return 0; | 959 | return 0; |
955 | } | 960 | } |
956 | 961 | ||
962 | #endif | ||
963 | |||
957 | /*-------------------------------------------------------------------------*/ | 964 | /*-------------------------------------------------------------------------*/ |
958 | 965 | ||
959 | #define DRIVER_INFO DRIVER_VERSION " " DRIVER_DESC | 966 | #define DRIVER_INFO DRIVER_VERSION " " DRIVER_DESC |
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c index e5d60d5b105a..60379b17bbc1 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, | |||
1271 | } else if (qh->period != urb->interval) { | 1271 | } else if (qh->period != urb->interval) { |
1272 | return -EINVAL; /* Can't change the period */ | 1272 | return -EINVAL; /* Can't change the period */ |
1273 | 1273 | ||
1274 | } else { /* Pick up where the last URB leaves off */ | 1274 | } else { |
1275 | /* Find the next unused frame */ | ||
1275 | if (list_empty(&qh->queue)) { | 1276 | if (list_empty(&qh->queue)) { |
1276 | frame = qh->iso_frame; | 1277 | frame = qh->iso_frame; |
1277 | } else { | 1278 | } else { |
@@ -1283,10 +1284,18 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb, | |||
1283 | lurb->number_of_packets * | 1284 | lurb->number_of_packets * |
1284 | lurb->interval; | 1285 | lurb->interval; |
1285 | } | 1286 | } |
1286 | if (urb->transfer_flags & URB_ISO_ASAP) | 1287 | if (urb->transfer_flags & URB_ISO_ASAP) { |
1287 | urb->start_frame = frame; | 1288 | /* Skip some frames if necessary to insure |
1288 | else if (urb->start_frame != frame) | 1289 | * the start frame is in the future. |
1289 | return -EINVAL; | 1290 | */ |
1291 | uhci_get_current_frame_number(uhci); | ||
1292 | if (uhci_frame_before_eq(frame, uhci->frame_number)) { | ||
1293 | frame = uhci->frame_number + 1; | ||
1294 | frame += ((qh->phase - frame) & | ||
1295 | (qh->period - 1)); | ||
1296 | } | ||
1297 | } /* Otherwise pick up where the last URB leaves off */ | ||
1298 | urb->start_frame = frame; | ||
1290 | } | 1299 | } |
1291 | 1300 | ||
1292 | /* Make sure we won't have to go too far into the future */ | 1301 | /* Make sure we won't have to go too far into the future */ |