Linux kernel source tree
Go to file
William Wu 86d92b4524 usb: dwc2: hcd: fix isoc out transfer with unaligned dma address
This DWC2 driver has handled the unaligned DMA address problem
for urb->transfer_buffer and split in transfer. But it still
has problem to handle the isoc out transfer with unaligned DMA
address.

I test an USB Audio device which supports 24bits 96KHz 3LE format:

usb 1-1: new full-speed USB device number 2 using dwc2
usb 1-1: New USB device found, idVendor=21b4, idProduct=0083, bcdDevice= 1.06
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: AudioQuest DragonFly Black v1.5
usb 1-1: Manufacturer: AudioQuest
usb 1-1: SerialNumber: AQDFBL0100023815

When play 24bits 96KHz WAV file, noise occurs.

The rootcause is that the DWC2 controller use internal DMA to
transfer USB audio data, and the DMA address of data buffer must
be 4 bytes aligned, otherwise, the dwc2 will fail to transfer the
data. In this test case, the USB audio may transfer 572 bytes or
582 bytes in one usb transaction. And one URB contains multiple
usb transactions, if the DWC2 transfer the 582 Bytes in the middle
of the URB, the DMA address will not be 4 bytes aligned.

This patch allocates new aligned buf for isoc out transfer with
unaligned DMA address.

For isoc split out transfer, this patch sets the start schedule at
the 2 * DWC2_SLICES_PER_UFRAME to transfer the SSPLIT-begin OUT
transaction like EHCI controller. Without this patch, the SSPLIT-begin
OUT transaction starts in the seventh microframe, and this makes the
USB HUB unhappy. This patch sets the the SSPLIT-begin OUT transaction
starts in the first microframe.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I251ccf804e062312f9bd348552493f3bab504beb
2020-04-26 22:04:39 +08:00
arch arm64: rockchip_defconfig: update by savedefconfig 2020-04-23 21:34:01 +08:00
block Merge remote branch 'android-4.19' of https://android.googlesource.com/kernel/common 2020-03-21 19:46:46 +08:00
certs rk: revert to v4.4 2019-02-10 00:33:21 +08:00
crypto crypto: algboss - Don't create test kthread when CONFIG_CRYPTO_MANAGER_DISABLE_TESTS 2020-03-23 14:43:20 +08:00
Documentation Revert "BACKPORT: mm: reclaim small amounts of memory when an external fragmentation event occurs" 2020-04-22 14:10:19 +08:00
drivers usb: dwc2: hcd: fix isoc out transfer with unaligned dma address 2020-04-26 22:04:39 +08:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:21:29 +01:00
fs f2fs: Fix recovery is too slow when power fail on much fsync 2020-04-16 20:14:35 +08:00
include Revert "BACKPORT: mm: move zone watermark accesses behind an accessor" 2020-04-22 14:10:19 +08:00
init Merge remote branch 'android-4.19' of https://android.googlesource.com/kernel/common 2020-03-21 19:46:46 +08:00
ipc This is the 4.19.107 stable release 2020-03-03 07:33:01 +01:00
kernel Revert "BACKPORT: mm: reclaim small amounts of memory when an external fragmentation event occurs" 2020-04-22 14:10:19 +08:00
lib Merge remote branch 'android-4.19' of https://android.googlesource.com/kernel/common 2020-03-21 19:46:46 +08:00
LICENSES LICENSES: Remove CC-BY-SA-4.0 license text 2018-10-18 11:28:50 +02:00
mm Revert "UPSTREAM: mm, page_alloc: spread allocations across zones before introducing fragmentation" 2020-04-22 14:10:19 +08:00
net rfkill: Introduce Rockchip RFKILL driver 2020-03-28 17:17:28 +08:00
samples FROMGIT: samples/hw_breakpoint: drop use of kallsyms_lookup_name() 2020-03-12 11:18:49 +00:00
scripts rk: kbuild: Introduce CONFIG_DTC_SYMBOLS 2020-04-09 21:29:21 +08:00
security Merge remote branch 'android-4.19' of https://android.googlesource.com/kernel/common 2020-03-21 19:46:46 +08:00
sound ASoC: rockchip: rk817-codec: Increase the classD's current limit and close hpout when classD out 2020-04-20 15:40:42 +08:00
tools Merge remote branch 'android-4.19' of https://android.googlesource.com/kernel/common 2020-03-21 19:46:46 +08:00
usr kbuild: clean compressed initramfs image 2019-10-07 18:57:16 +02:00
virt KVM: Check for a bad hva before dropping into the ghc slow path 2020-03-05 16:42:21 +01:00
.checkpatch.conf rk: add .checkpatch.conf to enable strict check 2015-11-19 12:04:19 +08:00
.clang-format clang-format: Set IndentWrappedFunctionNames false 2018-08-01 18:38:51 +02:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore rk: .gitignore: ignore boot.img/kernel.img/resource.img/zboot.mg 2019-02-15 18:31:05 +08:00
.mailmap rk: revert to v4.4 2019-02-10 00:33:21 +08:00
.scmversion
abi_gki_aarch64_cuttlefish_whitelist ANDROID: ABI/Whitelist: update for Cuttlefish 2020-02-12 11:11:16 +00:00
abi_gki_aarch64_qcom_whitelist ANDROID: Update ABI whitelist for qcom SoCs 2020-03-06 14:50:51 -08:00
abi_gki_aarch64_whitelist ANDROID: abi_gki_aarch64_whitelist: add module_layout and task_struct 2020-03-05 09:07:15 +00:00
abi_gki_aarch64.xml ANDROID: update the ABI xml representation 2020-03-20 11:54:49 -07:00
build.config.aarch64 ANDROID: refactor build.config files to remove duplication 2019-10-22 18:27:12 -07:00
build.config.allmodconfig ANDROID: Don't base allmodconfig on gki_defconfig 2019-12-05 12:48:26 +00:00
build.config.allmodconfig.aarch64 ANDROID: Add allmodconfig build.configs for x86_64 and aarch64 2019-11-12 20:55:23 +00:00
build.config.allmodconfig.arm ANDROID: Add build.config files for ARM 32-bit 2020-03-16 17:43:55 +00:00
build.config.allmodconfig.x86_64 ANDROID: Add allmodconfig build.configs for x86_64 and aarch64 2019-11-12 20:55:23 +00:00
build.config.arm ANDROID: Add build.config files for ARM 32-bit 2020-03-16 17:43:55 +00:00
build.config.common ANDROID: clang: update to 10.0.4 2020-02-19 19:33:36 +00:00
build.config.cuttlefish.aarch64 ANDROID: cf build: Use merge_configs 2020-02-18 21:19:23 +00:00
build.config.cuttlefish.x86_64 ANDROID: cf build: Use merge_configs 2020-02-18 21:19:23 +00:00
build.config.gki ANDROID: gki: Removed cf modules from gki_defconfig 2020-01-31 16:23:38 -08:00
build.config.gki-debug.aarch64 ANDROID: Add build.config.gki-debug.aarch64 2020-03-16 14:29:13 +00:00
build.config.gki-debug.x86_64 ANDROID: Add build.config.gki-debug.x86_64 2020-03-16 14:29:13 +00:00
build.config.gki.aarch64 ANDROID: Add ABI Whitelist for qcom 2020-02-28 23:45:43 +00:00
build.config.gki.x86_64 ANDROID: refactor build.config files to remove duplication 2019-10-22 18:27:12 -07:00
build.config.x86_64 ANDROID: refactor build.config files to remove duplication 2019-10-22 18:27:12 -07:00
COPYING COPYING: use the new text with points to the license files 2018-03-23 12:41:45 -06:00
CREDITS 9p: remove Ron Minnich from MAINTAINERS 2018-08-17 16:20:26 -07:00
cuttlefish.fragment ANDROID: Add TPM support and the vTPM proxy to Cuttlefish. 2020-03-13 17:19:53 +00:00
Kbuild rk: revert to v4.4 2019-02-10 00:33:21 +08:00
Kconfig kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt 2018-08-02 08:06:55 +09:00
logo_kernel.bmp rk: logo: update logo file 2019-08-29 19:45:37 +08:00
logo.bmp rk: logo: update logo file 2019-08-29 19:45:37 +08:00
MAINTAINERS This is the 4.19.107 stable release 2020-03-03 07:33:01 +01:00
Makefile Merge remote branch 'android-4.19' of https://android.googlesource.com/kernel/common 2020-03-21 19:46:46 +08:00
README Docs: Added a pointer to the formatted docs to README 2018-03-21 09:02:53 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.