mirror of https://github.com/torvalds/linux.git
In the aspeed UDC setup, we configure the UDC hardware with the assigned
USB device address.
However, we have an off-by-one in the bitmask, so we're only setting the
lower 6 bits of the address (USB addresses being 7 bits, and the
hardware bitmask being bits 0:6).
This means that device enumeration fails if the assigned address is
greater than 64:
[ 344.607255] usb 1-1: new high-speed USB device number 63 using ehci-platform
[ 344.808459] usb 1-1: New USB device found, idVendor=cc00, idProduct=cc00, bcdDevice= 6.10
[ 344.817684] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 344.825671] usb 1-1: Product: Test device
[ 344.831075] usb 1-1: Manufacturer: Test vendor
[ 344.836335] usb 1-1: SerialNumber: 00
[ 349.917181] usb 1-1: USB disconnect, device number 63
[ 352.036775] usb 1-1: new high-speed USB device number 64 using ehci-platform
[ 352.249432] usb 1-1: device descriptor read/all, error -71
[ 352.696740] usb 1-1: new high-speed USB device number 65 using ehci-platform
[ 352.909431] usb 1-1: device descriptor read/all, error -71
Use the correct mask of 0x7f (rather than 0x3f), and generate this
through the GENMASK macro, so we have numbers that correspond exactly
to the hardware register definition.
Fixes:
|
||
|---|---|---|
| .. | ||
| aspeed-vhub | ||
| bdc | ||
| cdns2 | ||
| Kconfig | ||
| Makefile | ||
| amd5536udc.h | ||
| amd5536udc_pci.c | ||
| aspeed_udc.c | ||
| at91_udc.c | ||
| at91_udc.h | ||
| atmel_usba_udc.c | ||
| atmel_usba_udc.h | ||
| bcm63xx_udc.c | ||
| core.c | ||
| dummy_hcd.c | ||
| fsl_qe_udc.c | ||
| fsl_qe_udc.h | ||
| fsl_udc_core.c | ||
| fsl_usb2_udc.h | ||
| fusb300_udc.c | ||
| fusb300_udc.h | ||
| goku_udc.c | ||
| goku_udc.h | ||
| gr_udc.c | ||
| gr_udc.h | ||
| lpc32xx_udc.c | ||
| m66592-udc.c | ||
| m66592-udc.h | ||
| max3420_udc.c | ||
| mv_u3d.h | ||
| mv_u3d_core.c | ||
| mv_udc.h | ||
| mv_udc_core.c | ||
| net2272.c | ||
| net2272.h | ||
| net2280.c | ||
| net2280.h | ||
| omap_udc.c | ||
| omap_udc.h | ||
| pch_udc.c | ||
| pxa25x_udc.c | ||
| pxa25x_udc.h | ||
| pxa27x_udc.c | ||
| pxa27x_udc.h | ||
| r8a66597-udc.c | ||
| r8a66597-udc.h | ||
| renesas_usb3.c | ||
| renesas_usbf.c | ||
| rzv2m_usb3drd.c | ||
| snps_udc_core.c | ||
| snps_udc_plat.c | ||
| tegra-xudc.c | ||
| trace.c | ||
| trace.h | ||
| udc-xilinx.c | ||