Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-19 Thread Eugene Shatokhin
19.08.2015 04:54, David Miller пишет: From: Eugene Shatokhin Date: Fri, 14 Aug 2015 19:58:36 +0300 2. The second race is on dev->flags. dev->flags is set to 0 here: *0 usbnet_stop (usbnet.c:816) /* deferred work (task, timer, softirq) must also stop. * can't flush_scheduled_work()

Re: [PATCH] usb: gadget: composite: fill bcdUSB for any gadget max speed

2015-08-19 Thread Igor Kotrasinski
On 08/18/2015 05:42 PM, Felipe Balbi wrote: > On Tue, Aug 18, 2015 at 11:06:32AM -0400, Alan Stern wrote: >> On Tue, 18 Aug 2015, Igor Kotrasinski wrote: >> >>> When handling device GET_DESCRIPTOR, composite gadget driver fills >>> the bcdUSB field only if the gadget supports USB 3.0. Otherwise >

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

2015-08-19 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 b

[PATCH v4 2/5] gadget: Introduce the usb charger framework

2015-08-19 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 the

[PATCH v4 3/5] gadget: Support for the usb charger framework

2015-08-19 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. Introduce a callback 'get_charger_type' which will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang --- d

[PATCH v4 4/5] gadget: Integrate with the usb gadget supporting for usb charger

2015-08-19 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger should get the type by the 'get_charger_type' callback which is implemented by the usb gadget operations, and get the usb charger pointer from struct 'usb_gadget'. Signed-off-by: Baolin Wang --- drivers/usb/gadget/charger.c

[PATCH v4 1/5] gadget: Introduce the notifier functions

2015-08-19 Thread Baolin Wang
The usb charger framework is based on usb gadget. The usb charger need to be notified the state changing of usb gadget to confirm the usb charger state. Thus this patch adds a notifier mechanism for usb gadget to report a event to usb charger when the usb gadget state is changed. Signed-off-by: B

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

2015-08-19 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. Signed-off-

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

2015-08-19 Thread Lee Jones
On Wed, 19 Aug 2015, Baolin Wang wrote: > 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

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

2015-08-19 Thread Baolin Wang
On 19 August 2015 at 17:56, Lee Jones wrote: > On Wed, 19 Aug 2015, Baolin Wang wrote: > >> 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 qui

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-19 Thread Bjørn Mork
Eugene Shatokhin writes: > 19.08.2015 04:54, David Miller пишет: >> From: Eugene Shatokhin >> Date: Fri, 14 Aug 2015 19:58:36 +0300 >> >>> 2. The second race is on dev->flags. >>> >>> dev->flags is set to 0 here: >>> *0 usbnet_stop (usbnet.c:816) >>> /* deferred work (task, timer, softirq)

Re: [PATCH v5 4/5] xhci: mediatek: support MTK xHCI host controller

2015-08-19 Thread chunfeng yun
Hi On Mon, 2015-08-17 at 18:07 +0300, Mathias Nyman wrote: > Hi > > On 07.08.2015 15:30, Chunfeng Yun wrote: > > MTK xhci host controller defines some extra SW scheduling > > parameters for HW to minimize the scheduling effort for > > synchronous and interrupt endpoints. The parameters are > > put

Re: [PATCH v5 3/5] usb: phy: add usb3.0 phy driver for mt65xx SoCs

2015-08-19 Thread chunfeng yun
Hi On Mon, 2015-08-17 at 10:59 +0530, Kishon Vijay Abraham I wrote: > Hi, > > On Friday 07 August 2015 06:00 PM, Chunfeng Yun wrote: > > support usb3.0 phy of mt65xx SoCs > > > > Signed-off-by: Chunfeng Yun > > change $subject to phy: > > --- > > drivers/phy/Kconfig | 9 + > > driv

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-19 Thread Eugene Shatokhin
19.08.2015 13:54, Bjørn Mork пишет: Eugene Shatokhin writes: 19.08.2015 04:54, David Miller пишет: From: Eugene Shatokhin Date: Fri, 14 Aug 2015 19:58:36 +0300 2. The second race is on dev->flags. dev->flags is set to 0 here: *0 usbnet_stop (usbnet.c:816) /* deferred work (task, ti

[PATCH v3] usb: dwc2: reset dwc2 core before dwc2_get_hwparams()

2015-08-19 Thread Yunzhi Li
We initiate dwc2 usb controller in BIOS, dwc2_core_reset() should be called before dwc2_get_hwparams() to reset core registers to default value. Without this the FIFO setting might be incorrect because calculating FIFO size need power-on value of GRXFSIZ/GNPTXFSIZ/HPTXFSIZ registers. This patch co

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-19 Thread Bjørn Mork
Eugene Shatokhin writes: > The problem is not in the reordering but rather in the fact that > "dev->flags = 0" is not necessarily atomic > w.r.t. "clear_bit(EVENT_RX_KILL, &dev->flags)", and vice versa. > > So the following might be possible, although unlikely: > > CPU0 CPU1 >

Re: [PATCH v4 3/5] gadget: Support for the usb charger framework

2015-08-19 Thread Sergei Shtylyov
Hello. On 8/19/2015 12:13 PM, Baolin Wang wrote: For supporting the usb charger, it adds the usb_charger_init() and usb_charger_exit() functions for usb charger initialization and exit. Introduce a callback 'get_charger_type' which will implemented by user for usb gadget operations to get the

Re: [PATCH] usb: gadget: composite: fill bcdUSB for any gadget max speed

2015-08-19 Thread Felipe Balbi
Hi, On Wed, Aug 19, 2015 at 11:00:54AM +0200, Igor Kotrasinski wrote: > > > On 08/18/2015 05:42 PM, Felipe Balbi wrote: > > On Tue, Aug 18, 2015 at 11:06:32AM -0400, Alan Stern wrote: > >> On Tue, 18 Aug 2015, Igor Kotrasinski wrote: > >> > >>> When handling device GET_DESCRIPTOR, composite gadg

Re: [PATCH] usb: gadget: composite: fill bcdUSB for any gadget max speed

2015-08-19 Thread Alan Stern
On Wed, 19 Aug 2015, Igor Kotrasinski wrote: > >> I would argue that there's no need to check gadget_is_dualspeed(); > >> bcdUSB should always be set to 0x0200. After all, the spec explicitly > >> permits USB-2.0 devices to run only at full speed. > > we should actually set it to 0x0210 so we get

Re: [PATCH] usb: gadget: composite: fill bcdUSB for any gadget max speed

2015-08-19 Thread Igor Kotrasinski
On 08/19/2015 03:56 PM, Alan Stern wrote: > On Wed, 19 Aug 2015, Igor Kotrasinski wrote: > I would argue that there's no need to check gadget_is_dualspeed(); bcdUSB should always be set to 0x0200. After all, the spec explicitly permits USB-2.0 devices to run only at full speed. >>

USB, TTY, char/misc, and Staging trees now closed for 4.3

2015-08-19 Thread Greg KH
Hi all, Given that 4.2 will be out in a few days, it's time to close my trees for new patches until 4.3-rc1 is out. Please feel free to send me patches for these trees, but note that I'll be ignoring them until 4.3-rc1 is out, at which point in time I'll start reviewing them again and applying th

[PATCH v3 1/1] USB:option:add ZTE PIDs

2015-08-19 Thread Liu.Zhao
This is intended to add ZTE device PIDs on kernel. Signed-off-by: Liu.Zhao --- drivers/usb/serial/option.c | 36 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 876423b..e26db28

Re: USB, TTY, char/misc, and Staging trees now closed for 4.3

2015-08-19 Thread Albino B Neto
2015-08-19 11:52 GMT-03:00 Greg KH : > Given that 4.2 will be out in a few days, it's time to close my trees > for new patches until 4.3-rc1 is out. Ok -- Albino B Neto "Debian. Freedom to code. Code to freedom!" faw twitter.com/b1n0anb gplus.to/AlbinoBNeto -- To unsubscribe from this list: send

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

2015-08-19 Thread Mark Brown
On Wed, Aug 19, 2015 at 05:13:48PM +0800, Baolin Wang wrote: > 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

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

2015-08-19 Thread Mark Brown
On Wed, Aug 19, 2015 at 08:02:37AM +0800, Peter Chen wrote: > Below code may be correct for the goal you expressed. >for (i = 0; i < ARRAY_SIZE(wm831x_usb_limits); i++) { >if (limit >= wm831x_usb_limits[i] && >wm831x_usb_limits[best] < wm831x_usb_limits

Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA

2015-08-19 Thread Duc Dang
On Sat, Aug 15, 2015 at 1:05 PM, Arnd Bergmann wrote: > > On Saturday 08 August 2015 13:31:02 Duc Dang wrote: > > > > > > If we know that pdev->dev.dma_mask will always be initialised at this > > > point, then the above change is fine. If not, it's introducing a > > > regression - dma_set_mask_an

[PATCHv2 0/2] USB: Enable EHCI-platform driver for use with ACPI

2015-08-19 Thread Jeremy Linton
This patch set enables USB on the ARM Juno development platform when using an ACPI kernel. First it adds an error message if the device cannot be configured with the current DMA settings (missing/unsupported CCA attribute). It then adds the ACPI PNP id to the acpi_match_table entry. Tested-by: Hu

[PATCH 1/2] USB: ehci-platform: Display a DMA configuration error message

2015-08-19 Thread Jeremy Linton
If the ehci driver fails to configure the dma settings then display a dev error instead of simply failing. This is triggered in an ACPI world if the user fails to set the _CCA on the device. Tested-by: Huang Shijie Reviewed-by: Graeme Gregory Reviewed-by: Hanjun Guo Acked-by: Alan Stern Signed

[PATCH 2/2] USB: ehci-platform: Add ACPI bindings for the EHCI platform driver.

2015-08-19 Thread Jeremy Linton
This enables USB on the ARM juno board when booted with an ACPI kernel. The PNP id comes from the PNP/ACPI registry and describes an EHCI controller without debug. Tested-by: Huang Shijie Reviewed-by: Graeme Gregory Reviewed-by: Hanjun Guo Acked-by: Alan Stern Signed-off-by: Jeremy Linton ---

Re: [v1,1/1] mpc512x: silence a USB Kconfig dependency warning

2015-08-19 Thread Michael Ellerman
On Mon, 2013-03-06 at 11:18:06 UTC, Gerhard Sittig wrote: > the PPC_MPC512x config automatically selected USB_EHCI_BIG_ENDIAN_* > switches, which made Kconfig warn about "unmet direct dependencies": > > scripts/kconfig/conf --silentoldconfig Kconfig > warning: (PPC_MPC512x && 440EPX) selects U

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

2015-08-19 Thread Baolin Wang
On 20 August 2015 at 00:24, Mark Brown wrote: > On Wed, Aug 19, 2015 at 05:13:48PM +0800, Baolin Wang wrote: >> 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 u

Re: [PATCH v4 3/5] gadget: Support for the usb charger framework

2015-08-19 Thread Baolin Wang
On 19 August 2015 at 20:56, Sergei Shtylyov wrote: > Hello. > > On 8/19/2015 12:13 PM, Baolin Wang wrote: > >> For supporting the usb charger, it adds the usb_charger_init() and >> usb_charger_exit() functions for usb charger initialization and exit. >> >> Introduce a callback 'get_charger_type' w

RE: [PATCH 3/8][v3]usb:fsl:otg: Add support to add/remove usb host driver

2015-08-19 Thread Ramneek Mehresh
> -Original Message- > From: Alan Stern [mailto:st...@rowland.harvard.edu] > Sent: Friday, August 14, 2015 12:17 AM > To: Mehresh Ramneek-B31383 > Cc: linux-ker...@vger.kernel.org; ba...@ti.com; > gre...@linuxfoundation.org; linux-usb@vger.kernel.org; Li Yang-Leo-R58472 > > Subject: Re:

Re: [PATCH] usb: musb: omap2430: use *syscon* framework API to write to mailbox register

2015-08-19 Thread Kishon Vijay Abraham I
Hi, On Thursday 06 August 2015 02:17 PM, Tony Lindgren wrote: > * Kishon Vijay Abraham I [150805 07:10]: >> On Wednesday 05 August 2015 01:31 PM, Tony Lindgren wrote: >>> >>> We don't have syscon-otghs and to me it seems we need a PHY driver >>> as I pointed out at: >> >> If *syscon-otghs* is not

Re: [PATCH 4/5] usb: xhci: stop everything on the first call to xhci_stop

2015-08-19 Thread Roger Quadros
On 18/08/15 15:14, Mathias Nyman wrote: > On 18.08.2015 13:39, Roger Quadros wrote: >> xhci_stop will be called twice, once for the shared hcd >> and again for the primary hcd. >> >> We stop the XHCI controller in any case so clean up >> everything on the first call else we can timeout >> waiting