diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-02-21 18:31:35 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-02-27 17:40:51 -0500 |
commit | 136733d6124a152ed2b61c3d38008c6581fc8685 (patch) | |
tree | 60121cb26c1d75f9f77d7633a1412d6bcc94cdb0 /drivers/usb/musb/musb_host.c | |
parent | 3ecdb9acf343bbcf2bb2c287dc524ab709cfad7e (diff) |
USB: musb: use right poll limit for low speed devices
Remove wrongly applied upper limit on the interrupt transfer
interval for low speed devices (not much of an error per se,
according to USB specs).
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/musb/musb_host.c')
-rw-r--r-- | drivers/usb/musb/musb_host.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 23d3890fd54d..6dbbd0786a6a 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c | |||
@@ -1863,19 +1863,21 @@ static int musb_urb_enqueue( | |||
1863 | } | 1863 | } |
1864 | qh->type_reg = type_reg; | 1864 | qh->type_reg = type_reg; |
1865 | 1865 | ||
1866 | /* precompute rxinterval/txinterval register */ | 1866 | /* Precompute RXINTERVAL/TXINTERVAL register */ |
1867 | interval = min((u8)16, epd->bInterval); /* log encoding */ | ||
1868 | switch (qh->type) { | 1867 | switch (qh->type) { |
1869 | case USB_ENDPOINT_XFER_INT: | 1868 | case USB_ENDPOINT_XFER_INT: |
1870 | /* fullspeed uses linear encoding */ | 1869 | /* |
1871 | if (USB_SPEED_FULL == urb->dev->speed) { | 1870 | * Full/low speeds use the linear encoding, |
1872 | interval = epd->bInterval; | 1871 | * high speed uses the logarithmic encoding. |
1873 | if (!interval) | 1872 | */ |
1874 | interval = 1; | 1873 | if (urb->dev->speed <= USB_SPEED_FULL) { |
1874 | interval = max_t(u8, epd->bInterval, 1); | ||
1875 | break; | ||
1875 | } | 1876 | } |
1876 | /* FALLTHROUGH */ | 1877 | /* FALLTHROUGH */ |
1877 | case USB_ENDPOINT_XFER_ISOC: | 1878 | case USB_ENDPOINT_XFER_ISOC: |
1878 | /* iso always uses log encoding */ | 1879 | /* ISO always uses logarithmic encoding */ |
1880 | interval = min_t(u8, epd->bInterval, 16); | ||
1879 | break; | 1881 | break; |
1880 | default: | 1882 | default: |
1881 | /* REVISIT we actually want to use NAK limits, hinting to the | 1883 | /* REVISIT we actually want to use NAK limits, hinting to the |