[PATCH v3 00/49] usb: dwc2: fixes, enhancements and new features

2017-12-26 Thread Grigor Tovmasyan
This patch series includes new features such us Active Clock Gating(ACG), LPM and Hibernation, enhancements and fixes for already existing features. All this patches were already sent to lkml separately. ACG, LPM and Hibernation were sent as patch series. All patches were tested in our lab. Chan

[PATCH v3 02/49] usb: dwc2: Force mode optimizations

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan If the dr_mode is USB_DR_MODE_OTG, forcing the mode is needed during driver probe to get the host and device specific HW parameters. Then we clear the force mode bits so that the core operates in OTG mode. The force mode bits should not be touched at any other time during

[PATCH v3 01/49] usb: dwc2: eliminate irq parameter from dwc2_gadget_init

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan The irq is available in hsotg already, so there's no need to pass it as separate function parameter. Signed-off-by: Vardan Mikayelyan Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/core.h | 4 ++-- drivers/usb/dwc2/gadget.c | 7 +++ drivers/usb/dwc2/pla

[PATCH v3 03/49] usb: dwc2: Remove version check in GSNPSID

2017-12-26 Thread Grigor Tovmasyan
From: 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. Cc: sta...@vger.kernel.org Signed-off-by: Gevorg Sahakyan Signed-off-by: Minas Harutyunyan Signed-off-by: Gr

[PATCH v3 04/49] usb: dwc2: Set AHB burst size to INCR

2017-12-26 Thread Grigor Tovmasyan
From: Razmik Karapetyan In dwc2_hsotg_core_init_disconnected() function used AHB burst size parameter, instead of calculating already calculated value. Changed AHB burst size from INCR4 to INCR by default. With this value driver show excellent DMA performance. Signed-off-by: Razmik Karapetyan

[PATCH v3 05/49] usb: dwc2: Remove unnecessary debug prints

2017-12-26 Thread Grigor Tovmasyan
From: Razmik Karapetyan Removed unnecessary debug prints about DMA mode for host side from dwc2_gahbcfg_init() function. Signed-off-by: Razmik Karapetyan Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/hcd.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --

[PATCH v3 08/49] usb: dwc2: Add dwc2_enable_acg function

2017-12-26 Thread Grigor Tovmasyan
From: Razmik Karapetyan Added function for supporting Active Clock Gating functionality. New acg_enable field in dwc2_hw_params checks ACG support from hardware side. Similar acg_enable field in dwc2_core_params used for dynamicly disabling/enabling ACG functionality from driver. dwc2_enable_a

[PATCH v3 07/49] usb: dwc2: Define Active Clock Gating support bit in GHWCFG4

2017-12-26 Thread Grigor Tovmasyan
From: Razmik Karapetyan The previously reserved 12th bit in GHWCFG4 now indicates that the controller supports the Dynamic Power Reduction (Active Clock Gating) during no traffic scenarios such as L0, idle, resume and suspend states. Signed-off-by: Razmik Karapetyan Signed-off-by: Grigor Tovmas

[PATCH v3 10/49] usb: dwc2: Update dwc2_handle_incomplete_isoc_in() function

2017-12-26 Thread Grigor Tovmasyan
From: 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. Signed-off-by: Razmik Karapetyan Signed-off-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan --- drivers

[PATCH v3 12/49] usb: dwc2: Update GINTSTS_GOUTNAKEFF interrupt handling

2017-12-26 Thread Grigor Tovmasyan
From: Razmik Karapetyan Disabled only unmasked endpoints based on DAINTMSK register. This will allow to minimize GINTSTS_GOUTNAKEFF interrupt handling. Signed-off-by: Razmik Karapetyan Signed-off-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/gadget.c | 9

[PATCH v3 11/49] usb: dwc2: Update dwc2_handle_incomplete_isoc_out() function

2017-12-26 Thread Grigor Tovmasyan
From: 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. Signed-off-by: Razmik Karapetyan Signed-off-by: Minas Harutyunyan

[PATCH v3 13/49] usb: dwc2: Rename function names

2017-12-26 Thread Grigor Tovmasyan
From: Razmik Karapetyan Renamed __orr32 and __bic32 function names to more descriptive dwc2_set_bit and dwc2_clear_bit respectively. Signed-off-by: Razmik Karapetyan Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/gadget.c | 44 ++-- 1 file changed

[PATCH v3 09/49] usb: dwc2: Backup and restore PCGCCTL1 register

2017-12-26 Thread Grigor Tovmasyan
From: Razmik Karapetyan Backup PCGCCTL1 register when entering hibernation mode and restore it after exiting from hibernation, to keep active ACG feature. Signed-off-by: Razmik Karapetyan Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/core.c | 2 ++ drivers/usb/dwc2/core.h | 1 + 2 file

[PATCH v3 06/49] usb: dwc2: Define PCGCCTL1 register in hw.h

2017-12-26 Thread Grigor Tovmasyan
From: Razmik Karapetyan PCGCCTL1 (Power and Clock Control) register will be used for controlling the core`s active clock gating feature. Signed-off-by: Razmik Karapetyan Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/hw.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/u

[PATCH v3 14/49] usb: dwc2: Delete unused functionality

2017-12-26 Thread 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

[PATCH v3 15/49] usb: dwc2: Make function static

2017-12-26 Thread Grigor Tovmasyan
Declared dwc2_force_mode() function as static, because it was used only in core.c file, for fixing sparse error. Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index

[PATCH v3 16/49] usb: dwc2: Fix GLPMCFG... definitions

2017-12-26 Thread Grigor Tovmasyan
From: Sevak Arakelyan Make field names of GLPMCFG register in definitoins to be the same with the databook. Signed-off-by: Sevak Arakelyan Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/hw.h | 38 -- 1 file changed, 20 insertions(+), 18 deletions(-)

[PATCH v3 17/49] usb: dwc2: Add core parameters for LPM support

2017-12-26 Thread Grigor Tovmasyan
From: Sevak Arakelyan Add lpm, lpm_clock_gating, besl, hird_threshold_en and hird_threshold core parameters. These will indicate LPM and LPM Errata support as well as chosen L1 sleeping mode for the core and PHY. Signed-off-by: Sevak Arakelyan Signed-off-by: Grigor Tovmasyan --- drivers/usb/d

[PATCH v3 18/49] usb: dwc2: gadget: Add functionality to exit from LPM L1 state

2017-12-26 Thread Grigor Tovmasyan
From: Sevak Arakelyan Add a function which will be called if device is in L1 sleep state and Resume/Remote Wakeup Detected interrupt is asserted. Signed-off-by: Sevak Arakelyan Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/core_intr.c | 52

[PATCH v3 20/49] usb: dwc2: Enable LPM Transaction Received interrupt

2017-12-26 Thread Grigor Tovmasyan
From: Sevak Arakelyan Enable LPM Transaction Received interrupt. Signed-off-by: Sevak Arakelyan Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/core_intr.c | 5 +++-- drivers/usb/dwc2/gadget.c| 3 ++- drivers/usb/dwc2/hcd.c | 3 +++ 3 files changed, 8 insertions(+), 3 deletions

[PATCH v3 21/49] usb: dwc2: gadget: Configure the core to enable LPM

2017-12-26 Thread Grigor Tovmasyan
From: Sevak Arakelyan Configure core in device mode to support LPM according to programming guide. Device will start giving valid responses for LPM tokens. After this patch device side LPM will start working. Signed-off-by: Sevak Arakelyan Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/

[PATCH v3 23/49] usb: dwc2: Add core state checking

2017-12-26 Thread Grigor Tovmasyan
Added core state checking in dwc2_hsotg_ep_queue() function to make sure that application will submit requests only in L0 state. Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/gadget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drive

[PATCH v3 19/49] usb: dwc2: gadget: LPM interrupt handler

2017-12-26 Thread Grigor Tovmasyan
From: Sevak Arakelyan This interrupt indicates that an LPM transaction was received on the USB bus. After getting this interrupt we are going from L0 state to L1 state. Signed-off-by: Sevak Arakelyan Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/core_intr.c | 63 +++

[PATCH v3 22/49] usb: dwc2: Add call_gadget() function call

2017-12-26 Thread Grigor Tovmasyan
Added call_gadget() function call when entering to L1 state to inform gadget that core is in L1 state. Did the same thing when exiting from L1 state to inform gadget that core is in L0 state. Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/core_intr.c | 6 ++ 1 file changed, 6 insertio

[PATCH v3 28/49] usb: dwc2: gadget: Fix dwc2_restore_device_registers

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan Add parameter remote_wakeup to dwc2_restore_device_registers() to be able to restore device registers according to programming guide for dwc-otg. It says that in case of rem_wakeup DCTL must not be restored here. Remove setting of DCTL_PWRONPRGDONE from this function, bec

[PATCH v3 27/49] usb: dwc2: gadget: Moved dtxfsiz backup array place

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan Moved dtxfsiz from dwc2_gregs_backup to dwc2_dregs_backup, because it is device register. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/core.c | 8 ++-- drivers/usb/dwc2/core.h | 4 ++-- drivers/

[PATCH v3 25/49] usb: dwc2: Rename hibernation to partial_power_down

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan No-op change, only rename. This code was misnamed originally. It was only responsible for partial power down and not for hibernation. Rename core_params->hibernation to core_params->power_down, dwc2_set_param_hibernation() to dwc2_set_param_power_down(). Signed-off-by:

[PATCH v3 26/49] usb: dwc2: Add hibernation field into dwc2_hw_params

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan Add parameter and it's initialization, needed for hibernation. Reimplement dwc2_set_param_power_down() to support hibernation too. Now 'power_down' parameter can be initialized with 0, 1 or 2. 0 - No 1 - Partial power down 2 - Hibernation Signed-off-by: Vardan Mikayelyan

[PATCH v3 24/49] usb: dwc2: Enable LPM

2017-12-26 Thread Grigor Tovmasyan
From: John Youn Set 'lpm_capable' flag in the gadget structure so indicating that LPM is supported. Signed-off-by: Sevak Arakelyan Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/gadget.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2

[PATCH v3 30/49] usb: dwc2: gadget: Add remote_wakeup_allowed flag

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan It will be set once corresponding set_feature command comes. True if device is allowed to wake-up host by remote-wakeup signalling. This is preparation for remote wake-up support implementation, it will not be implemented until gadget stack provide interface for bringing

[PATCH v3 31/49] usb: dwc2: Changes in registers backup/restore functions

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan Move hptxfsiz to host register's backup/restore functions, not needed to have it in global register's backup/restore functions. Add backup for glpmcfg, and read/write for gi2cctl and pcgcctl. As requires programming guide. Affected functions: dwc2_backup_host_registers()

[PATCH v3 34/49] usb: dwc2: Add dwc2_enter_hibernation(), dwc2_exit_hibernation()

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan These are wrapper functions which are calling device or host enter/exit hibernation functions. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/core.c | 38 ++ drivers/us

[PATCH v3 29/49] usb: dwc2: core: Add hibernated flag

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan True if core is hibernated. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/core.h | 2 ++ drivers/usb/dwc2/platform.c | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/usb/dwc2/core.h b/dr

[PATCH v3 33/49] usb: dwc2: Add host/device hibernation functions

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan Add host/device hibernation functions which must be wrapped by core's dwc2_enter_hibernation()/dwc2_exit_hibernation() functions. Make dwc2_backup_global_registers dwc2_restore_global_register non-static to use them in both host/gadget sides. Added function names: dwc2_

[PATCH v3 35/49] usb: dwc2: Allow entering hibernation from USB_SUSPEND interrupt

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan Do changes to allow entering hibernated state from USB_SUSPEND interrupt. All code is added under if conditions and mustn't impact existing functionality. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/co

[PATCH v3 32/49] usb: dwc2: Add helper functions for restore routine

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan Add common (host/device) helper functions, which will be called while exiting from hibernation, from both sides. dwc2_restore_essential_regs() dwc2_hib_restore_common() Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Artur Petrosyan Signed-off

[PATCH v3 36/49] usb: dwc2: Add dwc2_handle_gpwrdn_intr() handler

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan The GPWRDN interrupts are those that occur in both Host and Device mode while core is in hibernated state. Export dwc2_core_init to be able to use it in GPWRDN_IDSTS interrupt handler. Here we have duplicated init functions in host and gadget sides so I have left things

[PATCH v3 38/49] usb: dwc2: Enable power down

2017-12-26 Thread Grigor Tovmasyan
From: John Youn Enable the power down option based on the core capability. Signed-off-by: John Youn Signed-off-by: Vardan Mikayelyan Signed-off-by: Artur Petrosyan Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/params.c | 16 +++- 1 file changed, 15 insertions(+), 1 deleti

[PATCH v3 37/49] usb: dwc2: Change hub-control to allow hibernation

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan Affected cases: ClearPortFeature's USB_PORT_FEAT_SUSPEND SetPortFeature's USB_PORT_FEAT_SUSPEND USB_PORT_FEAT_RESET Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/hcd.c | 16 +--- 1 file c

[PATCH v3 39/49] usb: dwc2: Change TxFIFO and RxFIFO flushing flow

2017-12-26 Thread Grigor Tovmasyan
From: Minas Harutyunyan Before flushing fifos required to check AHB master state and flush when AHB master is in IDLE state. Added default value for greset in dwc2_flush_tx_fifo() and dwc2_flush_rx_fifo() functions. Signed-off-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan --- drivers

[PATCH v3 40/49] usb: dwc2: hcd: Fix host channel halt flow

2017-12-26 Thread Grigor Tovmasyan
From: Minas Harutyunyan According databook in Buffer and External DMA mode non-split periodic channels can't be halted. Signed-off-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/hcd.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/u

[PATCH v3 41/49] usb: dwc2: Add safety check for STSPHSERCVD intr

2017-12-26 Thread Grigor Tovmasyan
From: Minas Harutyunyan STSPHSERCVD (status phase received) interrupt should be handled when EP0 is in DWC2_EP0_DATA_OUT state. Sometimes STSPHSERCVD interrupt asserted , when EP0 is not in DATA_OUT state. Spurios interrupt. Signed-off-by: Minas Harutyunyan Signed-off-by: Grigor Tovmasyan ---

[PATCH v3 43/49] usb: dwc2: Add safety check in setting of descriptor chain pointers

2017-12-26 Thread Grigor Tovmasyan
From: Minas Harutyunyan In some cases device sending ZLP IN on non EP0 which reassigning EP0 OUT descriptor pointer to that EP. Dedicated for EP0 OUT descriptor multiple time re-used by other EP while that descriptor already in use by EP0 OUT for SETUP transaction. As result when SETUP packet rec

[PATCH v3 46/49] usb: dwc2: pci: Replace kzalloc() with devm_kzalloc()

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan Use devm_kzalloc() and remove the unnecessary kfree(). Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/pci.c b/d

[PATCH v3 44/49] usb: dwc2: Update bit polling functionality

2017-12-26 Thread Grigor Tovmasyan
From: 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

[PATCH v3 45/49] usb: dwc2: Fix dwc2_hsotg_core_init_disconnected()

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan We should call dwc2_hsotg_enqueue_setup() after properly setting lx_state. Because it may cause error-out from dwc2_hsotg_enqueue_setup() due to wrong value in lx_state. Issue can be reproduced by loading driver while connected A-Connector (start in A-HOST mode) then disc

[PATCH v3 42/49] usb: dwc2: host: Fix transaction errors in host mode

2017-12-26 Thread Grigor Tovmasyan
From: 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 r

[PATCH v3 47/49] usb: dwc2: pci: Move usb_phy_generic_register()

2017-12-26 Thread Grigor Tovmasyan
From: 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. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/pci.c | 14 +

[PATCH v3 48/49] usb: dwc2: pci: Move devm_kzalloc() before platform_device_add()

2017-12-26 Thread Grigor Tovmasyan
From: 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(). Signed-off-by: Vardan Mikayelyan Signed-off-by: John

[PATCH v3 49/49] usb: dwc2: pci: Handle error cleanup in probe

2017-12-26 Thread Grigor Tovmasyan
From: Vardan Mikayelyan The probe function doesn't properly handle errors. Fix it so that it properly handles cleanup. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

Re: `pci_apply_final_quirks()` taking half a second

2017-12-26 Thread Paul Menzel
Dear Bjorn, Am 08.04.2017 um 17:41 schrieb Bjorn Helgaas: On Fri, Apr 07, 2017 at 11:07:15PM +0200, Paul Menzel wrote: Measuring where time is spent during boot with `systemd-bootchart` on an Asus A780FullHD, it turns out that half a second is spent in `pci_apply_final_quirks()`. I agree,

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-26 Thread Kirill A. Shutemov
On Fri, Dec 15, 2017 at 02:03:35PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > This results in no change in structure size on 64-bit x86 as it fits in > the padding between the gfp_t and the void *. The patch does more than described in the subject and commit message. At first I was

Re: [PATCH v5 04/78] page cache: Use xa_lock

2017-12-26 Thread Kirill A. Shutemov
On Fri, Dec 15, 2017 at 02:03:36PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > Remove the address_space ->tree_lock and use the xa_lock newly added to > the radix_tree_root. Rename the address_space ->page_tree to ->pages, > since we don't really care that it's a tree. Take the oppo

Re: [PATCH v5 05/78] xarray: Replace exceptional entries

2017-12-26 Thread Kirill A. Shutemov
On Fri, Dec 15, 2017 at 02:03:37PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > Introduce xarray value entries to replace the radix tree exceptional > entry code. This is a slight change in encoding to allow the use of an > extra bit (we can now store BITS_PER_LONG - 1 bits in a value

Re: [PATCH v5 06/78] xarray: Change definition of sibling entries

2017-12-26 Thread Kirill A. Shutemov
On Fri, Dec 15, 2017 at 02:03:38PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > Instead of storing a pointer to the slot containing the canonical entry, > store the offset of the slot. Produces slightly more efficient code > (~300 bytes) and simplifies the implementation. > > Signed-

[PATCH 1/2] usb: musb: remove unused frame variable

2017-12-26 Thread Bin Liu
From: Corentin Labbe This patch fix the following warning drivers/usb/musb/musb_host.c:223:8: warning: variable 'frame' set but not used [-Wunused-but-set-variable] by remove the frame variable in musb_start_urb(). Signed-off-by: Corentin Labbe Signed-off-by: Bin Liu --- drivers/usb/musb/mus

[PATCH 0/2] musb patches for v4.16-rc1

2017-12-26 Thread Bin Liu
Hi Greg, There are two musb patches for v4.16-rc1, removing unused variables. Please let me know if any change is needed. Regards, -Bin. --- Corentin Labbe (2): usb: musb: remove unused frame variable usb: musb: remove unused pipe variable drivers/usb/musb/musb_host.c | 5 - 1 file cha

[PATCH 2/2] usb: musb: remove unused pipe variable

2017-12-26 Thread Bin Liu
From: Corentin Labbe This patch fix the following build warning: drivers/usb/musb/musb_host.c:1809:8: warning: variable 'pipe' set but not used [-Wunused-but-set-variable] by removing the pipe variable in musb_host_rx() Signed-off-by: Corentin Labbe Signed-off-by: Bin Liu --- drivers/usb/mus

Re: [PATCH v3 00/49] usb: dwc2: fixes, enhancements and new features

2017-12-26 Thread Stefan Wahren
Hi Grigor, > Grigor Tovmasyan hat am 26. Dezember 2017 um > 12:21 geschrieben: > > > This patch series includes new features such us Active Clock Gating(ACG), > LPM and Hibernation, enhancements and fixes for already existing features. > All this patches were already sent to lkml separately.

Re: [PATCH 1/2] Revert "Bluetooth: btusb: fix QCA Rome suspend/resume"

2017-12-26 Thread Marcel Holtmann
Hi Kai-Heng, > This reverts commit fd865802c66bc451dc515ed89360f84376ce1a56. > > This commit causes a regression on some QCA ROME chips. The USB device > reset happens in btusb_open(), hence firmware loading gets interrupted. > > Furthermore, this commit stops working after commit > ("a0085f2510

Re: [PATCH 2/2] usb: quirks: Add reset-resume quirk for Dell DW1820 QCA Rome Bluetooth

2017-12-26 Thread Marcel Holtmann
Hi Greg, > Commit ("fd865802c66bc451dc515ed89360f84376ce1a56 Bluetooth: btusb: fix > QCA Rome suspend/resume") enables reset_resume in btusb_probe(). This > makes the device resets during btusb_open(), firmware loading gets > interrupted as a result. > > We still want to reset the device to solve

Re: xhci: Reset Renesas uPD72020x USB controller for 32-bit DMA issue

2017-12-26 Thread Troy Kisky
On 12/25/2017 2:10 AM, Marc Zyngier wrote: > On Sun, 24 Dec 2017 23:01:33 +, > Troy Kisky wrote: >> >> commit 8466489ef5ba48272ba4fa4ea9f8f403306de4c7 >> Author: Marc Zyngier >> Date: Tue Aug 1 20:11:08 2017 -0500 >> >> xhci: Reset Renesas uPD72020x USB controller for 32-bit DMA issue >>

Re: xhci: Reset Renesas uPD72020x USB controller for 32-bit DMA issue

2017-12-26 Thread Troy Kisky
On 12/26/2017 1:52 PM, Troy Kisky wrote: > On 12/25/2017 2:10 AM, Marc Zyngier wrote: >> On Sun, 24 Dec 2017 23:01:33 +, >> Troy Kisky wrote: >>> >>> commit 8466489ef5ba48272ba4fa4ea9f8f403306de4c7 >>> Author: Marc Zyngier >>> Date: Tue Aug 1 20:11:08 2017 -0500 >>> >>> xhci: Reset Renes

Re: [PATCH v5 05/78] xarray: Replace exceptional entries

2017-12-26 Thread Matthew Wilcox
On Tue, Dec 26, 2017 at 08:15:42PM +0300, Kirill A. Shutemov wrote: > > 28 files changed, 249 insertions(+), 240 deletions(-) > > Everything looks fine to me after quick scan, but hat's a lot of changes for > one patch... Yeah. It's pretty mechanical though. > > - if (radix_t

Re: [PATCH v5 06/78] xarray: Change definition of sibling entries

2017-12-26 Thread Matthew Wilcox
On Tue, Dec 26, 2017 at 08:21:53PM +0300, Kirill A. Shutemov wrote: > > +/** > > + * xa_is_internal() - Is the entry an internal entry? > > + * @entry: Entry retrieved from the XArray > > + * > > + * Return: %true if the entry is an internal entry. > > + */ > > What does it mean "internal entry"?

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-26 Thread Matthew Wilcox
On Tue, Dec 26, 2017 at 07:54:40PM +0300, Kirill A. Shutemov wrote: > On Fri, Dec 15, 2017 at 02:03:35PM -0800, Matthew Wilcox wrote: > > From: Matthew Wilcox > > > > This results in no change in structure size on 64-bit x86 as it fits in > > the padding between the gfp_t and the void *. > > The

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-26 Thread Matthew Wilcox
On Tue, Dec 26, 2017 at 07:43:40PM -0800, Matthew Wilcox wrote: > Also add the xa_lock() and xa_unlock() family of wrappers to make it > easier to use the lock. If we could rely on -fplan9-extensions in > the compiler, we could avoid all of this syntactic sugar, but that > wasn't a