2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 16:53:54 +08:00

USB fixes for 4.8-rc7

Here are 2 small fixes, and one new device id, for 4.8-rc7
 
 The fixes solve a build error that was reported in your tree for the
 blackfin arch, and resolve an issue with a number of broken USB devices
 that reported the wrong interval rate.  Included here is also a new
 device id for the usb-serial driver.
 
 All have been in linux-next with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iFYEABECABYFAlfebRsPHGdyZWdAa3JvYWguY29tAAoJEDFH1A3bLfsp2/IAoMbG
 oJUDt8spFWQS1DCbmfdWNNSnAJ4qNSYDvL5uYWH44DkEyHr+4MekDg==
 =QA88
 -----END PGP SIGNATURE-----

Merge tag 'usb-4.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are two small fixes, and one new device id, for 4.8-rc7

  The fixes solve a build error that was reported in your tree for the
  blackfin arch, and resolve an issue with a number of broken USB
  devices that reported the wrong interval rate.  Included here is also
  a new device id for the usb-serial driver.

  All have been in linux-next with no reported issues"

* tag 'usb-4.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: change bInterval default to 10 ms
  usb: musb: Fix tusb6010 compile error on blackfin
  USB: serial: simple: add support for another Infineon flashloader
This commit is contained in:
Linus Torvalds 2016-09-18 12:07:05 -07:00
commit b01cf67683
3 changed files with 20 additions and 13 deletions

View File

@ -240,8 +240,10 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
memcpy(&endpoint->desc, d, n); memcpy(&endpoint->desc, d, n);
INIT_LIST_HEAD(&endpoint->urb_list); INIT_LIST_HEAD(&endpoint->urb_list);
/* Fix up bInterval values outside the legal range. Use 32 ms if no /*
* proper value can be guessed. */ * Fix up bInterval values outside the legal range.
* Use 10 or 8 ms if no proper value can be guessed.
*/
i = 0; /* i = min, j = max, n = default */ i = 0; /* i = min, j = max, n = default */
j = 255; j = 255;
if (usb_endpoint_xfer_int(d)) { if (usb_endpoint_xfer_int(d)) {
@ -250,13 +252,15 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
case USB_SPEED_SUPER_PLUS: case USB_SPEED_SUPER_PLUS:
case USB_SPEED_SUPER: case USB_SPEED_SUPER:
case USB_SPEED_HIGH: case USB_SPEED_HIGH:
/* Many device manufacturers are using full-speed /*
* Many device manufacturers are using full-speed
* bInterval values in high-speed interrupt endpoint * bInterval values in high-speed interrupt endpoint
* descriptors. Try to fix those and fall back to a * descriptors. Try to fix those and fall back to an
* 32 ms default value otherwise. */ * 8-ms default value otherwise.
*/
n = fls(d->bInterval*8); n = fls(d->bInterval*8);
if (n == 0) if (n == 0)
n = 9; /* 32 ms = 2^(9-1) uframes */ n = 7; /* 8 ms = 2^(7-1) uframes */
j = 16; j = 16;
/* /*
@ -271,10 +275,12 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
} }
break; break;
default: /* USB_SPEED_FULL or _LOW */ default: /* USB_SPEED_FULL or _LOW */
/* For low-speed, 10 ms is the official minimum. /*
* For low-speed, 10 ms is the official minimum.
* But some "overclocked" devices might want faster * But some "overclocked" devices might want faster
* polling so we'll allow it. */ * polling so we'll allow it.
n = 32; */
n = 10;
break; break;
} }
} else if (usb_endpoint_xfer_isoc(d)) { } else if (usb_endpoint_xfer_isoc(d)) {
@ -282,10 +288,10 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
j = 16; j = 16;
switch (to_usb_device(ddev)->speed) { switch (to_usb_device(ddev)->speed) {
case USB_SPEED_HIGH: case USB_SPEED_HIGH:
n = 9; /* 32 ms = 2^(9-1) uframes */ n = 7; /* 8 ms = 2^(7-1) uframes */
break; break;
default: /* USB_SPEED_FULL */ default: /* USB_SPEED_FULL */
n = 6; /* 32 ms = 2^(6-1) frames */ n = 4; /* 8 ms = 2^(4-1) frames */
break; break;
} }
} }

View File

@ -87,7 +87,7 @@ config USB_MUSB_DA8XX
config USB_MUSB_TUSB6010 config USB_MUSB_TUSB6010
tristate "TUSB6010" tristate "TUSB6010"
depends on HAS_IOMEM depends on HAS_IOMEM
depends on ARCH_OMAP2PLUS || COMPILE_TEST depends on (ARCH_OMAP2PLUS || COMPILE_TEST) && !BLACKFIN
depends on NOP_USB_XCEIV = USB_MUSB_HDRC # both built-in or both modules depends on NOP_USB_XCEIV = USB_MUSB_HDRC # both built-in or both modules
config USB_MUSB_OMAP2PLUS config USB_MUSB_OMAP2PLUS

View File

@ -54,7 +54,8 @@ DEVICE(funsoft, FUNSOFT_IDS);
/* Infineon Flashloader driver */ /* Infineon Flashloader driver */
#define FLASHLOADER_IDS() \ #define FLASHLOADER_IDS() \
{ USB_DEVICE_INTERFACE_CLASS(0x058b, 0x0041, USB_CLASS_CDC_DATA) }, \ { USB_DEVICE_INTERFACE_CLASS(0x058b, 0x0041, USB_CLASS_CDC_DATA) }, \
{ USB_DEVICE(0x8087, 0x0716) } { USB_DEVICE(0x8087, 0x0716) }, \
{ USB_DEVICE(0x8087, 0x0801) }
DEVICE(flashloader, FLASHLOADER_IDS); DEVICE(flashloader, FLASHLOADER_IDS);
/* Google Serial USB SubClass */ /* Google Serial USB SubClass */