diff options
author | Hans Petter Selasky <hans.petter.selasky@stericsson.com> | 2010-08-13 14:14:54 +0200 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:03:04 +0200 |
commit | 8b9ca446cf0bf461ce30a2f5f698a7ec5543c901 (patch) | |
tree | b166128ac5358474da02e9494ef507fa43a7c012 /drivers/usb/core | |
parent | 81bcbe738d08c523aa6794eae78323cd130d8bd3 (diff) |
Workaround for hardware problem in host mode for the MUSB chipset. Add missed TXPKTRDY check.
FIFOFLUSH is broken when a real packet is in the FIFO. This
hardware feature only works when the FIFO is empty.
The workaround described requires limiting the maximum
number of USB devices to 126, 128 - 2.
Signed-off-by: Hans Petter Selasky <hans.petter.selasky@stericsson.com>
Signed-off-by: Praveena Nadahally <praveen.nadahally@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/hub.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index ec6c97dadbe..98d9df0920f 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -1612,12 +1612,14 @@ static void choose_devnum(struct usb_device *udev) * bus->devnum_next. */ devnum = find_next_zero_bit(bus->devmap.devicemap, 128, bus->devnum_next); - if (devnum >= 128) + /* Due to Hardware bugs we need to reserve a device address + * for flushing of endpoints. */ + if (devnum >= 127) devnum = find_next_zero_bit(bus->devmap.devicemap, 128, 1); - bus->devnum_next = ( devnum >= 127 ? 1 : devnum + 1); + bus->devnum_next = devnum >= 126 ? 1 : devnum + 1; } - if (devnum < 128) { + if (devnum < 127) { set_bit(devnum, bus->devmap.devicemap); udev->devnum = devnum; } |