From: Greg Kroah-Hartman Date: Tue, 11 Apr 2017 14:47:26 +0000 (+0200) Subject: Merge tag 'usb-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi... X-Git-Tag: Ubuntu-4.12.0-11.12~1193^2~25 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ba7756d08212f71a009a4ac7439b8e661e469f7d;p=mirror_ubuntu-artful-kernel.git Merge tag 'usb-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: changes for v4.12 With 51 non-merge commits, this is one of the smallest USB Gadget pull requests. Apart from your expected set of non-critical fixes, and other miscellaneous items, we have most of the changes in dwc3 (52.5%) with all other UDCs following with 34.8%. As for the actual changes, the most important of them are all the recent changes to reduce memory footprint of dwc3, bare minimum dual-role support on dwc3 and reworked endpoint count and initialization routines. --- ba7756d08212f71a009a4ac7439b8e661e469f7d diff --cc drivers/usb/gadget/udc/Kconfig index c6cc9d3270ac,c90a4a223916..1c14c283cc47 --- a/drivers/usb/gadget/udc/Kconfig +++ b/drivers/usb/gadget/udc/Kconfig @@@ -277,7 -293,8 +293,8 @@@ source "drivers/usb/gadget/udc/bdc/Kcon config USB_AMD5536UDC tristate "AMD5536 UDC" - depends on PCI + depends on USB_PCI + select USB_SNP_CORE help The AMD5536 UDC is part of the AMD Geode CS5536, an x86 southbridge. It is a USB Highspeed DMA capable USB device controller. Beside ep0 diff --cc drivers/usb/gadget/udc/amd5536udc.c index 270876b438ab,91d0f1a4dac1..4ecd2f20ea48 --- a/drivers/usb/gadget/udc/amd5536udc.c +++ b/drivers/usb/gadget/udc/amd5536udc.c @@@ -618,17 -579,12 +579,12 @@@ static void udc_free_dma_chain(struct u DBG(dev, "free chain req = %p\n", req); /* do not free first desc., will be done by free for request */ - td_last = req->td_data; - td = phys_to_virt(td_last->next); - for (i = 1; i < req->chain_len; i++) { - dma_pool_free(dev->data_requests, td, - (dma_addr_t)td_last->next); - td_last = td; - td = phys_to_virt(td_last->next); + td = phys_to_virt(addr); + addr_next = (dma_addr_t)td->next; - pci_pool_free(dev->data_requests, td, addr); ++ dma_pool_free(dev->data_requests, td, addr); + addr = addr_next; } - - return ret_val; } /* Frees request packet, called by gadget driver */