linux/drivers/staging/dwc2
Matthijs Kooijman 3b9edf8847 staging: dwc2: fix off-by-one in check for max_packet_count parameter
Previously, the max_packet_count could be set to 1 << x, where x is the
number of bits available (width + 4 in the code). Since 1 << x requires
x + 1 bits to represent, this will not work. The real maximum value is
(1 << x) - 1. This value is already used the default when the set value
is invalid, but the upper limit for the set value was off-by-one.

This change makes the check the same as the one for max_transfer_size,
which was already correct.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-30 14:14:51 -07:00
..
core_intr.c
core.c staging: dwc2: fix off-by-one in check for max_packet_count parameter 2013-08-30 14:14:51 -07:00
core.h staging: dwc2: reorder some kernel doc comments and struct members 2013-08-12 15:21:41 -07:00
hcd_ddma.c staging: dwc2: refactor dwc2_host_complete() 2013-07-23 14:54:48 -07:00
hcd_intr.c staging: dwc2: reduce noisy debug messages 2013-07-23 14:54:49 -07:00
hcd_queue.c staging: dwc2: fix dwc2_hcd_qtd_add() 2013-07-23 14:54:48 -07:00
hcd.c staging: dwc2: Don't touch the dma_mask when dma is disabled 2013-07-25 13:38:09 -07:00
hcd.h staging: dwc2: reorder some kernel doc comments and struct members 2013-08-12 15:21:41 -07:00
hw.h staging: dwc2: remove specific fifo size constants 2013-08-30 14:14:51 -07:00
Kconfig staging: dwc2: remove use of bus_to_virt() 2013-07-23 14:54:49 -07:00
Makefile
pci.c staging: dwc2: add driver parameter to set AHB config register value 2013-07-23 14:56:19 -07:00
platform.c Staging driver fixes for 3.10-rc2 2013-05-23 09:27:49 -07:00