[PATCH v4 3/3] power: wm831x_power: Support USB charger current limit management

2017-07-26 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.

[PATCH v4 2/3] usb: phy: Add USB charger support

2017-07-26 Thread Baolin Wang
This patch introduces the usb charger support based on usb phy that makes an enhancement to a power driver. The basic conception of the usb charger is that, when one usb charger is added or removed by reporting from the extcon device state change, the usb charger will report to power user to set

[PATCH v4 0/3] Introduce USB charger support in USB phy

2017-07-26 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 v4 1/3] include: uapi: usb: Introduce USB charger type and state definition

2017-07-26 Thread Baolin Wang
Introducing USB charger type and state definition can help to support USB charging which will be added in USB phy core. Signed-off-by: Baolin Wang --- include/uapi/linux/usb/charger.h | 31 +++ 1 file changed, 31 insertions(+) create mode

Re: [PATCH v3 3/3] power: wm831x_power: Support USB charger current limit management

2017-07-26 Thread Sebastian Reichel
Hi, On Wed, Jul 26, 2017 at 11:05:25AM +0800, Baolin Wang wrote: > On 25 July 2017 at 17:59, Sebastian Reichel > wrote: > > On Tue, Jul 25, 2017 at 04:00:01PM +0800, Baolin Wang wrote: > >> Integrate with the newly added USB charger interface to limit the

[PATCH V2] uas: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069

2017-07-26 Thread Alan Swanson
Similar to commit d595259fbb7a ("usb-storage: Add ignore-residue quirk for Initio INIC-3619") for INIC-3169 in unusual_devs.h but INIC-3069 already present in unusual_uas.h. Both in same controller IC family. Issue is that MakeMKV fails during key exchange with installed bluray drive with

Re: v4.13-rc2: usb mouse stopped working?

2017-07-26 Thread Pavel Machek
Hi! > > In v4.9: > > > > [ 87.064408] input: Logitech USB Optical Mouse as > > /devices/pci:00/:00:1d.0/usb2/2-1/2-1.1/2-1.1.1/2-1.1.1.1/2-1.1.1.1:1.0/0003:046D:C05A.0005/input/input18 > > [ 87.065951] hid-generic 0003:046D:C05A.0005: input,hidraw0: USB HID > > v1.11 Mouse [Logitech

Re: [PATCH] uas: Add US_FL_IGNORE_RESIDUE for Initio Copropration INIC-3069

2017-07-26 Thread Oliver Neukum
Am Mittwoch, den 26.07.2017, 10:05 +0200 schrieb Alan Swanson : > Similar to commit d595259fbb7a7afed241b1afb2c4fe4b47de47fa for INIC-3169 in > unusual_devs.h but INIC-3069 already present in unusual_uas.h. Both in same > controller IC family. > > Issue is that MakeMKV fails during key exchange

Re: [PATCH] uas: Add US_FL_IGNORE_RESIDUE for Initio Copropration INIC-3069

2017-07-26 Thread Sergei Shtylyov
Hello! On 7/26/2017 12:46 AM, Alan Swanson wrote: Similar to commit d595259fbb7a7afed241b1afb2c4fe4b47de47fa for INIC-3169 in That's not how you cite a commit -- you should also specify the commit summary line enclosed in ("") (and 12-digit SHA1 would be enough). unusual_devs.h but

Re: [PATCH] USB: hcd: Mark secondary HCD as dead if the primary one died

2017-07-26 Thread Alan Stern
On Tue, 25 Jul 2017, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Make usb_hc_died() clear the HCD_FLAG_RH_RUNNING flag for the shared > HCD and set HCD_FLAG_DEAD for it, in analogy with what is done for > the primary one. > > Among other thigs, this

[PATCH] usb-storage: fix deadlock involving host lock and scsi_done

2017-07-26 Thread Alan Stern
Christoph Hellwig says that since version 4.12, the kernel switched to using blk-mq by default. The old code used a softirq for handling request completions, but blk-mq can handle completions in the caller's context. This may cause a problem for usb-storage, because it invokes the ->scsi_done

Re: pixart optical mouse dont work

2017-07-26 Thread Greg KH
On Tue, Jul 25, 2017 at 04:37:00PM +0200, Matthias Holl wrote: > dear kernel hackers, > > with the new kernel 4.13 my optical mouse from pixart dont work > but i can show it with lsusb > > bus 007 device 003: id 093a:2510 pixart imaging,inc optical mouse > > i changed nothing in my kernel .conf

[PATCH v2 2/2] USB: musb: dsps: add explicit runtime resume at suspend

2017-07-26 Thread Johan Hovold
The musb_dsps driver is special in that the parent (glue) device's driver is accessing registers mapped by the child. The clock is however shared and is managed by the grandparent device. Since commit 869c59782981 ("usb: musb: dsps: add support for suspend and resume") the dsps driver has been

[PATCH v2 1/2] USB: musb: fix external abort on suspend

2017-07-26 Thread Johan Hovold
Make sure that the controller is runtime resumed when system suspending to avoid an external abort when accessing the interrupt registers: Unhandled fault: external abort on non-linefetch (0x1008) at 0xd025840a ... [] (musb_default_readb) from [] (musb_disable_interrupts+0x84/0xa8) []

[PATCH v2 0/2] USB: musb: fix external abort on suspend

2017-07-26 Thread Johan Hovold
This is a v2 of the fix for an external abort during suspend which I submitted on Monday. The commit message of patch 1/2 has only been slightly reworded, while patch 2/2 is new. Johan Johan Hovold (2): USB: musb: fix external abort on suspend USB: musb: dsps: add explicit runtime resume

Re: CPU lock-ups with 4.12.0+ kernels related to usb_storage

2017-07-26 Thread Alan Stern
On Wed, 26 Jul 2017, Christoph Hellwig wrote: > On Thu, Jul 13, 2017 at 01:00:29PM -0400, Alan Stern wrote: > > All right. In the meantime, changing usb-storage won't hurt. > > Arthur, can you test the patch below? > > Do you plan to send this fix to Greg for 4.13-rc? I just submitted it.

Re: CPU lock-ups with 4.12.0+ kernels related to usb_storage

2017-07-26 Thread Christoph Hellwig
On Thu, Jul 13, 2017 at 01:00:29PM -0400, Alan Stern wrote: > All right. In the meantime, changing usb-storage won't hurt. > Arthur, can you test the patch below? Do you plan to send this fix to Greg for 4.13-rc? -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body

Re: [PATCH] USB: hcd: Mark secondary HCD as dead if the primary one died

2017-07-26 Thread Rafael J. Wysocki
On Wednesday, July 26, 2017 10:21:54 AM Alan Stern wrote: > On Tue, 25 Jul 2017, Rafael J. Wysocki wrote: > > > From: Rafael J. Wysocki > > > > Make usb_hc_died() clear the HCD_FLAG_RH_RUNNING flag for the shared > > HCD and set HCD_FLAG_DEAD for it, in analogy with

Re: USB disk speed regression WD Elements - with bisect result 22547c4cc4fe20698a6a85a55b8788859134b8e4

2017-07-26 Thread Alan Stern
[Added linux-usb mailing list to CC:] Short description of bug: In 4.12 or later, when Zdenek's Western Digital disk is attached to an EHCI controller, it ends up connecting at full speed to the companion UHCI controller instead. But when commit 22547c4cc4fe ("usb: hub: Wait for connection to be

Re: drivers/usb/host/xhci-ring.c:1390 handle_cmd_completion

2017-07-26 Thread Jason A. Donenfeld
Hey Mathias, While the oops has been fixed in the latest kernels, as of 4.12.3, I'm still having issues where USB "stops working" after a while. If I restart, then after a long while, it stops working again. If I simply rmmod all the USB-related modules and modprobe xhci_pci, things work again,

[PATCH v2 2/5] usb: xhci: Fix potential memory leak in xhci_disable_slot()

2017-07-26 Thread Lu Baolu
xhci_disable_slot() allows the invoker to pass a command pointer as paramenter. Otherwise, it will allocate one. This will cause memory leak when a command structure was allocated inside of this function while queuing command trb fails. Another problem comes up when the invoker passed a command

[PATCH v2 4/5] usb: xhci: Return error when host is dead in xhci_disable_slot()

2017-07-26 Thread Lu Baolu
xhci_disable_slot() is a helper for disabling a slot when a device goes away or recovers from error situations. Currently, it returns success when it sees a dead host. This is not the right way to go. It should return error and let the invoker know that disable slot command was failed due to a

[PATCH v2 1/5] usb: xhci: Disable slot even virt-dev is null

2017-07-26 Thread Lu Baolu
xhci_disable_slot() is a helper for disabling a slot when a device goes away or recovers from error situations. Currently, it checks the corespoding virt-dev pointer and returns directly (w/o issuing disable slot command) if it's null. This is unnecessary and will cause problems in case where

[PATCH v2 5/5] usb: xhci: Handle USB transaction error on address command

2017-07-26 Thread Lu Baolu
Xhci driver handles USB transaction errors on transfer events, but transaction errors are possible on address device command completion events as well. The xHCI specification (section 4.6.5) says: A USB Transaction Error Completion Code for an Address Device Command may be due to a Stall response

[PATCH v2 3/5] usb: xhci: Fix memory leak when xhci_disable_slot() returns error

2017-07-26 Thread Lu Baolu
If xhci_disable_slot() returns success, a disable slot command trb was queued in the command ring. The command completion handler will free the virtual device data structure associated with the slot. On the other hand, when xhci_disable_slot() returns error, the invokers should take the

[PATCH v2 0/5] usb: xhci: Handle USB transaction error on address command

2017-07-26 Thread Lu Baolu
Xhci driver handles USB transaction errors on transfer events, but transaction errors are possible on address device command completion events as well. The xHCI specification (section 4.6.5) says: A USB Transaction Error Completion Code for an Address Device Command may be due to a Stall response

Re: [PATCH v3 3/3] power: wm831x_power: Support USB charger current limit management

2017-07-26 Thread Baolin Wang
Hi, On 26 July 2017 at 20:08, Sebastian Reichel wrote: > Hi, > > On Wed, Jul 26, 2017 at 11:05:25AM +0800, Baolin Wang wrote: >> On 25 July 2017 at 17:59, Sebastian Reichel >> wrote: >> > On Tue, Jul 25, 2017 at 04:00:01PM