Re: [PATCH v19 2/4] usb: gadget: Support for the usb charger framework

2017-02-20 Thread Baolin Wang
On 20 February 2017 at 18:08, kbuild test robot <l...@intel.com> wrote: > Hi Baolin, > > [auto build test ERROR on v4.9-rc8] > [cannot apply to balbi-usb/next usb/usb-testing battery/master next-20170220] > [if your patch is applied to the wrong git tree, please drop us a no

Re: Subject: [PATCH v3] USB:Core: BugFix: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously

2017-02-20 Thread Ajay Kaher
  On Thu, 16 Feb 2017, Alan Stern wrote:  > On Thu, 16 Feb 2017, Ajay Kaher wrote: >  >> > On Thu, 14 Feb 2017, Alan Stern wrote: >> >  >> > I think Ajay's argument is correct and a patch is needed.  But this >> > patch misses the race between init_usb_class() and release_usb_class().   >>  >> 

RE: [PATCH] usb: host: add cast to avoid potential integer overflow

2017-02-20 Thread David Laight
From: Gustavo A. R. Silva > Sent: 17 February 2017 00:17 > The type of variable 'sel' is unsigned int. Such variable is being used > multiple times in a context that expects an expression of type unsigned > long long. So, to avoid any potential integer overflow, a cast to type > unsigned long long

Re: VL805 USB 3.0 does not see connected devices (only on x86_64) (x86 is ok)

2017-02-20 Thread Oliver Neukum
Am Sonntag, den 19.02.2017, 06:48 +0300 schrieb c400: > [  805.771818] sd 7:0:0:0: [sdd] Attached SCSI removable disk > [  805.811101] DMAR: DRHD: handling fault status reg 2 > [  805.811108] DMAR: [DMA Read] Request device [07:00.0] fault addr > fff98000 [fault reason 06] PTE Read access is not

Re: [PATCH v19 2/4] usb: gadget: Support for the usb charger framework

2017-02-20 Thread kbuild test robot
Hi Baolin, [auto build test ERROR on v4.9-rc8] [cannot apply to balbi-usb/next usb/usb-testing battery/master next-20170220] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Baolin-Wang/Introduce

Re: [PATCH v19 4/4] power: wm831x_power: Support USB charger current limit management

2017-02-20 Thread kbuild test robot
Hi Baolin, [auto build test ERROR on v4.9-rc8] [cannot apply to balbi-usb/next usb/usb-testing battery/master next-20170220] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Baolin-Wang/Introduce

Re: [PATCH] usb: ohci-at91: revert patch 2e2aa1bc7eff90ec on cpu without SFR register

2017-02-20 Thread Jelle Martijn Kok
usb: ohci-at91: Do not drop unhandled USB suspend control requests In patch 2e2aa1bc7eff90ecm, USB suspend and wakeup control requests are passed to SFR_OHCIICR register. If a processor does not have such a register, this hub control request will be dropped. If no such a SFR register is

Re: [PATCH] lvs: fix race condition in disconnect handling

2017-02-20 Thread Sergei Shtylyov
On 02/20/2017 05:38 PM, Oliver Neukum wrote: There is a small window during which the an URB may So the or an? remain active after disconnect has returned. If in that case already freed memory may be accessed and executed. The fix is to poison the URB befotre the work is flushed.

[PATCH RESEND v8] usb: xhci: plat: Enable async suspend/resume

2017-02-20 Thread Robert Foss
From: Andrew Bresticker USB host controllers can take a significant amount of time to suspend and resume, adding several hundred miliseconds to the kernel resume time. Since the XHCI controller has no outside dependencies (other than clocks, which are suspended

[PATCH 03/15] usb: dwc2: gadget: Moved dtxfsiz backup array place

2017-02-20 Thread 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 --- drivers/usb/dwc2/core.c | 8 ++-- drivers/usb/dwc2/core.h | 4 ++--

[PATCH] tools/usb: Add .gitignore file

2017-02-20 Thread Prarit Bhargava
Add .gitignore file for untracked files in tools/usb. Signed-off-by: Prarit Bhargava --- tools/usb/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tools/usb/.gitignore diff --git a/tools/usb/.gitignore b/tools/usb/.gitignore new file mode 100644 index

[PATCH] lvs: fix race condition in disconnect handling

2017-02-20 Thread Oliver Neukum
There is a small window during which the an URB may remain active after disconnect has returned. If in that case already freed memory may be accessed and executed. The fix is to poison the URB befotre the work is flushed. Signed-off-by: Oliver Neukum ---

[PATCH 01/15] usb: dwc2: Rename hibernation to partial_power_down

2017-02-20 Thread 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: Vardan Mikayelyan

[PATCH 02/15] usb: dwc2: Add hibernation field into dwc2_hw_params

2017-02-20 Thread 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 14/15] usb: dwc2: Enable power down

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

[PATCH 13/15] usb: dwc2: Change hub-control to allow hibernation

2017-02-20 Thread 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 --- drivers/usb/dwc2/hcd.c | 16 +--- 1 file changed, 13

[PATCH 12/15] usb: dwc2: Add dwc2_handle_gpwrdn_intr() handler

2017-02-20 Thread 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 as it was(used

[PATCH 04/15] usb: dwc2: gadget: Fix dwc2_restore_device_registers

2017-02-20 Thread 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, because it will be done in

[PATCH 15/15] usb: dwc2: Replace msleep with mdelay in dwc2_clear_force_mode()

2017-02-20 Thread Vardan Mikayelyan
dwc2_clear_force_mode() can be called in hibernation exit flow which can occur in interrupt context. Signed-off-by: Vardan Mikayelyan --- drivers/usb/dwc2/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/core.c

Re: [PATCH v5 1/2] usb: host: plat: Enable xhci plat runtime PM

2017-02-20 Thread Mathias Nyman
On 20.02.2017 04:47, Baolin Wang wrote: Hi Mathias, On 6 February 2017 at 13:26, Baolin Wang wrote: Hi Mathias, On 31 January 2017 at 21:14, Mathias Nyman wrote: On 16.01.2017 12:56, Baolin Wang wrote: Hi Mathias, Hi Sorry about

[PATCH 07/15] usb: dwc2: Changes in registers backup/restore functions

2017-02-20 Thread 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 08/15] usb: dwc2: Add helper functions for restore routine

2017-02-20 Thread 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 ---

[PATCH 05/15] usb: dwc2: core: Add hibernated flag

2017-02-20 Thread Vardan Mikayelyan
True if core is hibernated. Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn --- 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

[PATCH 09/15] usb: dwc2: Add host/device hibernation functions

2017-02-20 Thread 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:

[PATCH 06/15] usb: dwc2: gadget: Add remote_wakeup_allowed flag

2017-02-20 Thread 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 remote wake-up

[PATCH 00/15] usb: dwc2: Add hibernation support.

2017-02-20 Thread Vardan Mikayelyan
The functions with name hibernation are misnamed originally. They were only responsible for partial power down and not for hibernation. This patch set adds the real hibernation support for dwc2 driver and renames existing functions to power_down.xisting functions to power_down. John Youn (1):

[PATCH 10/15] usb: dwc2: Add dwc2_enter_hibernation(), dwc2_exit_hibernation()

2017-02-20 Thread 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 --- drivers/usb/dwc2/core.c | 38 ++ drivers/usb/dwc2/core.h

[PATCH 11/15] usb: dwc2: Allow entering hibernation from USB_SUSPEND interrupt

2017-02-20 Thread 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 --- drivers/usb/dwc2/core_intr.c |

[Kernel] usbhid 3-2:1.1: couldn't find an input interrupt endpoint

2017-02-20 Thread Cristian
Hello, dmesg: [2.465370] usbhid 3-2:1.1: couldn't find an input interrupt endpoint Thanks, -- Cristian [0.00] microcode: microcode updated early to revision 0x29, date = 2013-06-12 [0.00] Linux version 4.10.0-041000-generic (kernel@gloin) (gcc version 6.2.0 20161005

Re: Subject: [PATCH v3] USB:Core: BugFix: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously

2017-02-20 Thread Alan Stern
On Mon, 20 Feb 2017, Ajay Kaher wrote: > Alan, as per my understanding I have shifted the lock from > release_usb_class() to destroy_usb_class() in patch v3. > If it is not right, please explain in detail which race condition > I have missed and also share your suggestions. > > thanks, > ajay

RE

2017-02-20 Thread Viet Xuan Luong
I am Viet Xuan Luong. I am an American soldier presently on active service with 4th Squadron battalion here in Afghanistan. I served with the third Infantry Division in Iraq before thousand of my lucky colleagues were pulled out in August Last year, leaving me among the unlucky ones drafted

RE

2017-02-20 Thread Viet Xuan Luong
I am Viet Xuan Luong. I am an American soldier presently on active service with 4th Squadron battalion here in Afghanistan. I served with the third Infantry Division in Iraq before thousand of my lucky colleagues were pulled out in August Last year, leaving me among the unlucky ones drafted

[PATCH 2/2] Fix implicit fallthrough warning

2017-02-20 Thread Jonathan Dieter
GCC 7 now warns when switch statements fall through implicitly, and with -Werror enabled in configure.ac, that makes these tools unbuildable. We fix this by notifying the compiler that this particular case statement is meant to fall through. Reviewed-by: Peter Senna Tschudin

[PATCH 1/2] Fix format overflows

2017-02-20 Thread Jonathan Dieter
The usbip userspace tools call sprintf()/snprintf() and don't check for the return value which can lead the paths to overflow, truncating the final file in the path. More urgently, GCC 7 now warns that these aren't checked with -Wformat-overflow, and with -Werror enabled in configure.ac, that

[PATCH] usb: misc: remove unnecessary code

2017-02-20 Thread Gustavo A. R. Silva
'val' is an unsigned variable, and less-than-zero comparison of an unsigned variable is never true. Addresses-Coverity-ID: 1230257 Signed-off-by: Gustavo A. R. Silva --- drivers/usb/misc/lvstest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[usb-misc] question about missing break in switch

2017-02-20 Thread Gustavo A. R. Silva
Hello everybody, I ran into the following piece of code at drivers/usb/misc/usbtest.c:149 (linux-next) 149/* take the first altsetting with in-bulk + out-bulk; 150 * ignore other endpoints and altsettings. 151 */ 152for (ep =

Re: [PATCH v5 1/2] usb: host: plat: Enable xhci plat runtime PM

2017-02-20 Thread Baolin Wang
On 20 February 2017 at 23:10, Mathias Nyman wrote: > On 20.02.2017 04:47, Baolin Wang wrote: >> >> Hi Mathias, >> >> On 6 February 2017 at 13:26, Baolin Wang wrote: >>> >>> Hi Mathias, >>> >>> On 31 January 2017 at 21:14, Mathias Nyman >>>

Re: [Kernel] usbhid 3-2:1.1: couldn't find an input interrupt endpoint

2017-02-20 Thread Greg KH
On Mon, Feb 20, 2017 at 03:28:37PM -0300, Cristian wrote: > Hello, > > dmesg: > [2.465370] usbhid 3-2:1.1: couldn't find an input interrupt endpoint And does this cause a problem? Does the device not work? What is the output of 'lsusb -v -s3:2' with the device plugged in? thanks, greg k-h

RE: [PATCH v4 3/3] USB3/DWC3: Enable undefined length INCR burst type

2017-02-20 Thread Jerry Huang
> -Original Message- > From: Jerry Huang > Sent: Friday, February 10, 2017 11:30 PM > To: 'Felipe Balbi' ; robh...@kernel.org; > mark.rutl...@arm.com; catalin.mari...@arm.com > Cc: linux-usb@vger.kernel.org; linux-ker...@vger.kernel.org; > devicet...@vger.kernel.org;

[PATCH v19 1/4] usb: gadget: Introduce the usb charger framework

2017-02-20 Thread Baolin Wang
This patch introduces the usb charger driver based on usb gadget that makes an enhancement to a power driver. It works well in practice but that requires a system with suitable hardware. The basic conception of the usb charger is that, when one usb charger is added or removed by reporting from

[PATCH v19 3/4] usb: gadget: Integrate with the usb gadget supporting for usb charger

2017-02-20 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger can implement the usb_charger_plug_by_gadget() function, usb_charger_exit() function and dev_to_uchger() function by getting 'struct usb_charger' from 'struct gadget'. Signed-off-by: Baolin Wang

[PATCH v19 2/4] usb: gadget: Support for the usb charger framework

2017-02-20 Thread Baolin Wang
For supporting the usb charger, it adds the usb_charger_init() and usb_charger_exit() functions for usb charger initialization and exit. It will report to the usb charger when the gadget state is changed, then the usb charger can do the power things. Signed-off-by: Baolin Wang

[PATCH v19 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2017-02-20 Thread Baolin Wang
Currently the Linux kernel does not provide any standard integration of this feature that integrates the USB subsystem with the system power regulation provided by PMICs meaning that either vendors must add this in their kernels or USB gadget devices based on Linux (such as mobile phones) may not

[PATCH v19 4/4] power: wm831x_power: Support USB charger current limit management

2017-02-20 Thread Baolin Wang
Integrate with the newly added USB charger interface to limit the current we draw from the USB input based on the input device configuration identified by the USB stack, allowing us to charge more quickly from high current inputs without drawing more current than specified from others.

Re: [Kernel] usbhid 3-2:1.1: couldn't find an input interrupt endpoint

2017-02-20 Thread Oliver Neukum
Am Montag, den 20.02.2017, 15:28 -0300 schrieb Cristian: > Hello, > > dmesg: > [2.465370] usbhid 3-2:1.1: couldn't find an input interrupt > endpoint Most likely it does not have an interrupt endpoint. You will need to provide "lsusb -v" not lspci, as this bug is about a USB device. Is this

Re: [PATCH 1/2] Fix format overflows

2017-02-20 Thread Jonathan Dieter
Thanks for looking at this. One quick question before I put out version two with your corrections: On Tue, 2017-02-21 at 07:12 +0100, Krzysztof Opasiak wrote: > Hi, >  > W dniu 2017-02-20 o 21:51, Jonathan Dieter pisze: > > The usbip userspace tools call sprintf()/snprintf() and don't check > >

Fast Loans

2017-02-20 Thread Service Loans
Apply for a loan at 3% reply to this Email for more Info Do you need a loan to pay up bill or to start a business? Email Us -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH 1/2] Fix format overflows

2017-02-20 Thread Krzysztof Opasiak
Hi, W dniu 2017-02-20 o 21:51, Jonathan Dieter pisze: The usbip userspace tools call sprintf()/snprintf() and don't check for the return value which can lead the paths to overflow, truncating the final file in the path. More urgently, GCC 7 now warns that these aren't checked with