- 13 3月, 2018 20 次提交
-
-
由 Vardan Mikayelyan 提交于
The probe function doesn't properly handle errors. Fix it so that it properly handles cleanup. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NVardan Mikayelyan <mvardan@synopsys.com> Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Vardan Mikayelyan 提交于
After platform_device_add(), if we error out, we must do platform_device_unregister(), which also does the put. So lets move devm_kzalloc() to simplify error handling and avoid calling of platform_device_unregister(). Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NVardan Mikayelyan <mvardan@synopsys.com> Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Vardan Mikayelyan 提交于
Move usb_phy_generic_register() function call to the top, to simplify error handling. If this fails we can simply return instead of cleaning up. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NVardan Mikayelyan <mvardan@synopsys.com> Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Vardan Mikayelyan 提交于
Use devm_kzalloc() and remove the unnecessary kfree(). Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NVardan Mikayelyan <mvardan@synopsys.com> Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Minas Harutyunyan 提交于
Before flushing fifos required to check AHB master state and lush when AHB master is in IDLE state. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Minas Harutyunyan 提交于
Added missing GUSBCFG programming in host mode, which fixes transaction errors issue on HiKey and Altera Cyclone V boards. These field even if was programmed in device mode (in function dwc2_hsotg_core_init_disconnected()) will be resetting to POR values after core soft reset applied. So, each time when switching to host mode required to set this field to correct value. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Minas Harutyunyan 提交于
According databook in Buffer and External DMA mode non-split periodic channels can't be halted. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Razmik Karapetyan 提交于
Removed unnecessary debug prints about DMA mode for host side from dwc2_gahbcfg_init() function. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NRazmik Karapetyan <razmik@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Grigor Tovmasyan 提交于
Deleted dwc2_hcd_dump_frrem() function, because it used undefined parameters from dwc2_hsotg structure. The function body was in #ifdef statement and was never compiled. Also removed that parameters from dwc2_hsotg structure, which were used only in dwc2_hcd_dump_frrem() function. And also delete dwc2_sample_frrem macro, because without dwc2_hcd_dump_frrem() function it's lose its purpose. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Razmik Karapetyan 提交于
Renamed __orr32 and __bic32 function names to more descriptive dwc2_set_bit and dwc2_clear_bit respectively. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NRazmik Karapetyan <razmik@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Razmik Karapetyan 提交于
Disabled only unmasked endpoints based on DAINTMSK register. This will allow to minimize GINTSTS_GOUTNAKEFF interrupt handling. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NRazmik Karapetyan <razmik@synopsys.com> Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Razmik Karapetyan 提交于
In 'for' loop skipped masked and non-ISOC EPs. Also breaked 'for' loop after setting SGOUTNAK in DCTL,when one enabled EP was detected. This will allow to minimize incomplete ISOC OUT interrupt handling. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NRazmik Karapetyan <razmik@synopsys.com> Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Razmik Karapetyan 提交于
Disabled only that ISOC endpoints,for which interrupt bit was set in the DAINTMSK register. This will allow to minimize incomplete ISOC IN interrupt handling. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NRazmik Karapetyan <razmik@synopsys.com> Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Razmik Karapetyan 提交于
Changed AHB burst size from INCR4 to INCR by default. With this value driver shows excellent DMA performance. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NRazmik Karapetyan <razmik@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Razmik Karapetyan 提交于
In dwc2_hsotg_core_init_disconnected() function used AHB burst size parameter, instead of calculating already calculated value. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NRazmik Karapetyan <razmik@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Sevak Arakelyan 提交于
Move dwc2_hsotg_wait_bit_set function to core.c so it can be used anywhere in the code. Added dwc2_hsotg_wait_bit_clear function in core.c. Replace all the parts of register bit polling code with dwc2_hsotg_wait_bit_set or dwc2_hsotg_wait_bit_clear functions calls depends on code logic. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NSevak Arakelyan <sevaka@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Gevorg Sahakyan 提交于
Only check the ID portion of the GSNPSID register and don’t check the version. This will allow the driver to work with version 4.00a and later of the DWC_hsotg IP. Acked-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NGevorg Sahakyan <sahakyan@synopsys.com> Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Lars-Peter Clausen 提交于
Some UDC drivers (like the DWC3) expect that the response to a setup() request is queued from within the setup function itself so that it is available as soon as setup() has completed. Upon receiving a setup request the function fs driver creates an event that is made available to userspace. And only once userspace has acknowledged that event the response to the setup request is queued. So it violates the requirement of those UDC drivers and random failures can be observed. This is basically a race condition and if userspace is able to read the event and queue the response fast enough all is good. But if it is not, for example because other processes are currently scheduled to run, the USB host that sent the setup request will observe an error. To avoid this the gadget framework provides the USB_GADGET_DELAYED_STATUS return code. If a setup() callback returns this value the UDC driver is aware that response is not yet available and can uses the appropriate methods to handle this case. Since in the case of function fs the response will never be available when the setup() function returns make sure that this status code is used. This fixed random occasional failures that were previously observed on a DWC3 based system under high system load. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Lars-Peter Clausen 提交于
When using a AIO read() operation on the function FS gadget driver a URB is submitted asynchronously and on URB completion the received data is copied to the userspace buffer associated with the read operation. This is done from a kernel worker thread invoking copy_to_user() (through copy_to_iter()). And while the user space process memory is made available to the kernel thread using use_mm(), some architecture require in addition to this that the operation runs with USER_DS set. Otherwise the userspace memory access will fail. For example on ARM64 with Privileged Access Never (PAN) and User Access Override (UAO) enabled the following crash occurs. Internal error: Accessing user space memory with fs=KERNEL_DS: 9600004f [#1] SMP Modules linked in: CPU: 2 PID: 1636 Comm: kworker/2:1 Not tainted 4.9.0-04081-g8ab2dfb-dirty #487 Hardware name: ZynqMP ZCU102 Rev1.0 (DT) Workqueue: events ffs_user_copy_worker task: ffffffc87afc8080 task.stack: ffffffc87a00c000 PC is at __arch_copy_to_user+0x190/0x220 LR is at copy_to_iter+0x78/0x3c8 [...] [<ffffff800847b790>] __arch_copy_to_user+0x190/0x220 [<ffffff80086f25d8>] ffs_user_copy_worker+0x70/0x130 [<ffffff80080b8c64>] process_one_work+0x1dc/0x460 [<ffffff80080b8f38>] worker_thread+0x50/0x4b0 [<ffffff80080bf5a0>] kthread+0xd8/0xf0 [<ffffff8008083680>] ret_from_fork+0x10/0x50 Address this by placing a set_fs(USER_DS) before of the copy operation and revert it again once the copy operation has finished. This patch is analogous to commit d7ffde35 ("vhost: use USER_DS in vhost_worker thread") which addresses the same underlying issue. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Thinh Nguyen 提交于
Increase max_speed of the mass_storage driver for UDCs that support SuperSpeed Plus. The composite driver will pass this value to UDC core to set the device speed on probe (actual speed may be different depending on whether the USB controller supports it or other external factors). Signed-off-by: NThinh Nguyen <thinhn@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 08 3月, 2018 15 次提交
-
-
由 Chris Dickens 提交于
When the host wants to fetch OS descriptors, it sends two requests. The first is only for the header and the second for the full amount specified by the header in the first request. The OS descriptor handling code is distinguishing the header-only requests based on the wLength of the setup packet, but the same code is executed in both cases to construct the actual header. Simplify this by always constructing the header and then filling out the rest of the request if the wLength is greater than the size of the header. Also remove the duplicate code for queueing the request to ep0 by adding a goto label. Signed-off-by: NChris Dickens <christopher.a.dickens@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Chris Dickens 提交于
When handling an OS descriptor request, one of the first operations is to zero out the request buffer using the wLength from the setup packet. There is no bounds checking, so a wLength > 4096 would clobber memory adjacent to the request buffer. Fix this by taking the min of wLength and the request buffer length prior to the memset. While at it, define the buffer length in a header file so that magic numbers don't appear throughout the code. When returning data to the host, the data length should be the min of the wLength and the valid data we have to return. Currently we are returning wLength, thus requests for a wLength greater than the amount of data in the OS descriptor buffer would return invalid (albeit zero'd) data following the valid descriptor data. Fix this by counting the number of bytes when constructing the data and using this when determining the length of the request. Signed-off-by: NChris Dickens <christopher.a.dickens@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Vardan Mikayelyan 提交于
The irq is available in hsotg already, so there's no need to pass it as separate function parameter. Signed-off-by: NVardan Mikayelyan <mvardan@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Ladislav Michl 提交于
As devm_ioremap_resource() checks for valid resource, make use of it instead of testing ourselves. As a bonus memory region is requested. Acked-by: NNicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: NLadislav Michl <ladis@linux-mips.org> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Colin Ian King 提交于
Pointer tv_nexus is being initialized a value and this is never read and is later being updated with the same value. Remove the redundant initialization so that the assignment to tv_nexus is performed later and more local to when it is being read. Cleans up clang warning: drivers/usb/gadget/function/f_tcm.c:1097:25: warning: Value stored to 'tv_nexus' during its initialization is never read Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Wolfram Sang 提交于
Due to a typo, the mask was destroyed by a comparison instead of a bit shift. Reported-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Stefan Agner 提交于
The local variable event is of type enum usb_phy_events. Use the same enum value USB_EVENT_NONE instead of UX500_MUSB_NONE. This avoids a warning when building with clang: drivers/usb/phy/phy-ab8500-usb.c:906:30: warning: implicit conversion from enumeration type 'enum ux500_musb_vbus_id_status' to different enumeration type 'enum usb_phy_events' [-Wenum-conversion] enum usb_phy_events event = UX500_MUSB_NONE; ~~~~~ ^~~~~~~~~~~~~~~ Signed-off-by: NStefan Agner <stefan@agner.ch> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Fabio Estevam 提交于
mxs_charger_secondary_detection() is only used in this file, so make it static. This fixes the following sparse warning: drivers/usb/phy/phy-mxs-usb.c:581:23: warning: symbol 'mxs_charger_secondary_detection' was not declared. Should it be static? Acked-by: NJun Li <jun.li@nxp.com> Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Souptick Joarder 提交于
Use dma_pool_zalloc instead of dma_pool_alloc + memset Signed-off-by: NSouptick Joarder <jrdr.linux@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Andy Shevchenko 提交于
...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Cc: Daniel Mack <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Andy Shevchenko 提交于
...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Cc: Daniel Mack <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Andy Shevchenko 提交于
...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Andy Shevchenko 提交于
...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Cc: Kevin Cernekee <cernekee@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: bcm-kernel-feedback-list@broadcom.com Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Andy Shevchenko 提交于
...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Cc: John Youn <johnyoun@synopsys.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 26 2月, 2018 5 次提交
-
-
由 Linus Torvalds 提交于
-
git://github.com/jcmvbkbc/linux-xtensa由 Linus Torvalds 提交于
Pull Xtensa fixes from Max Filippov: "Two fixes for reserved memory/DMA buffers allocation in high memory on xtensa architecture - fix memory accounting when reserved memory is in high memory region - fix DMA allocation from high memory" * tag 'xtensa-20180225' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: support DMA buffers in high memory xtensa: fix high memory/reserved memory collision
-
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip由 Linus Torvalds 提交于
Pull x86 fixes from Thomas Gleixner: "A small set of fixes: - UAPI data type correction for hyperv - correct the cpu cores field in /proc/cpuinfo on CPU hotplug - return proper error code in the resctrl file system failure path to avoid silent subsequent failures - correct a subtle accounting issue in the new vector allocation code which went unnoticed for a while and caused suspend/resume failures" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/topology: Update the 'cpu cores' field in /proc/cpuinfo correctly across CPU hotplug operations x86/topology: Fix function name in documentation x86/intel_rdt: Fix incorrect returned value when creating rdgroup sub-directory in resctrl file system x86/apic/vector: Handle vector release on CPU unplug correctly genirq/matrix: Handle CPU offlining proper x86/headers/UAPI: Use __u64 instead of u64 in <uapi/asm/hyperv.h>
-
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip由 Linus Torvalds 提交于
Pull perf fix from Thomas Gleixner: "A single commit which shuts up a bogus GCC-8 warning" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/oprofile: Fix bogus GCC-8 warning in nmi_setup()
-
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip由 Linus Torvalds 提交于
Pull locking fixes from Thomas Gleixner: "Three patches to fix memory ordering issues on ALPHA and a comment to clarify the usage scope of a mutex internal function" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/xchg/alpha: Fix xchg() and cmpxchg() memory ordering bugs locking/xchg/alpha: Clean up barrier usage by using smp_mb() in place of __ASM__MB locking/xchg/alpha: Add unconditional memory barrier to cmpxchg() locking/mutex: Add comment to __mutex_owner() to deter usage
-