Re: [PATCH] usb: host: xhci-plat: add firmware for the R-Car M3 xHCI controllers

2016-04-11 Thread Geert Uytterhoeven
Hi Shimoda-san, On Tue, Apr 12, 2016 at 8:42 AM, Yoshihiro Shimoda wrote: > This patch adds a firmware for the USB 3.0 host controllers of Renesas > R-Car M3 SoC. I guess you mean "R-Car M3-W"? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux bey

RE: [PATCH] usb: dwc3: free dwc->regset on dwc3_debugfs_exit

2016-04-11 Thread Du, Changbin
Hi, Balbi, > > Hmm, I agree from this point. I will combine this patch with other two > patches > > (due to their dependency). And I'd like remove the 'dwc->root=NULL' as > well, > > you are creating a dependency that doesn't exist. Please stop that. You > should have two separate branches based

[PATCH] usb: host: xhci-plat: add firmware for the R-Car M3 xHCI controllers

2016-04-11 Thread Yoshihiro Shimoda
This patch adds a firmware for the USB 3.0 host controllers of Renesas R-Car M3 SoC. - This firmware is possible to be used on R-Car H2 and M2. However, this version causes performance degradation on such SoCs. - This firmware is impossible to be used on R-Car H3 because data transfer migh

Re: [PATCH v2] usb: gadget: composite: Clear reserved fields of SSP Dev Cap

2016-04-11 Thread Felipe Balbi
Hi, John Youn writes: > On 4/10/2016 10:17 PM, Felipe Balbi wrote: >> >> Hi, >> >> John Youn writes: >>> Set the reserved fields of the SuperSpeed Plus Device Capability >>> descriptor to 0. Otherwise there might be stale data there which will >>> cause USB CV to fail. >>> >>> Fixes: f228a8de

Re: DWC3: Clock Domain Crossing erratum description.

2016-04-11 Thread Felipe Balbi
Hi, Kirill Dronov writes: > Hi Felipe, > On 04/07/2016 08:10 AM, Felipe Balbi wrote: >> Hi, >> >> Kirill Dronov writes: >>> I'm working on USB device bringup on Intel E3800 – based board. DWC3 >>> core configured as DRD in device mode. The only connected device phy >>> is SMSC 3310 (USB2 ULPI).

Re: [RFC] Change bcdUSB in older kernels to return 0x0310 for SuperSpeed

2016-04-11 Thread Felipe Balbi
Hi, John Youn writes: > Hi, > > I would like to port the following commit from 4.6 to older kernels. > > 1a85329171094951956a37acc8abb7e51c1e742e ("usb: gadget: composite: > Return bcdUSB 0x0310") > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1a85329171094951956a

RE: [PATCH] usb: dwc3: free dwc->regset on dwc3_debugfs_exit

2016-04-11 Thread Felipe Balbi
Hi Changbin, "Du, Changbin" writes: >> Hi, >> >> "Du, Changbin" writes: >> >> >> >> >> > +dwc->regset = NULL; >> >> >> >> >> >> setting regset to NULL is unnecessary. We only call >> dwc3_debugfs_exit() >> >> >> when removing the driver. >> >> >> >> >> >> -- >> >> >> Balbi >> >> > I'd like

Re: [PATCHv3 2/3] usb: storage: scsiglue: limit USB3 devices to 2048 sectors

2016-04-11 Thread Felipe Balbi
Alan Stern writes: > On Mon, 11 Apr 2016, Felipe Balbi wrote: > >> USB3 devices, because they are much newer, have much >> less chance of having issues with larger transfers. >> >> We still keep a limit because anything above 2048 >> sectors really rendered negligible speed >> improvements, so we

[PATCHv3] usb: dwc2: Add reset control to dwc2

2016-04-11 Thread dinguyen
From: Dinh Nguyen Allow for platforms that have a reset controller driver in place to bring the USB IP out of reset. Signed-off-by: Dinh Nguyen --- v3: fix compile error v2: move to lowlevel_hw_init() --- drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/platform.c | 15 +++ 2 f

RE: [PATCH] usb: dwc3: free dwc->regset on dwc3_debugfs_exit

2016-04-11 Thread Du, Changbin
> Hi, > > "Du, Changbin" writes: > >> > >> >> > + dwc->regset = NULL; > >> >> > >> >> setting regset to NULL is unnecessary. We only call > dwc3_debugfs_exit() > >> >> when removing the driver. > >> >> > >> >> -- > >> >> Balbi > >> > I'd like keep this line even it is unnecessary, because It

[RFC] Change bcdUSB in older kernels to return 0x0310 for SuperSpeed

2016-04-11 Thread John Youn
Hi, I would like to port the following commit from 4.6 to older kernels. 1a85329171094951956a37acc8abb7e51c1e742e ("usb: gadget: composite: Return bcdUSB 0x0310") https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1a85329171094951956a37acc8abb7e51c1e742e There is a some

ジェームズHartopから

2016-04-11 Thread james william hartop
ジェームズHartopから、 私はあなたとあなたの家族がやっているか、私の手紙が今日健康とあなたの最高の気分でお会いすることを期待しますか?親切にあなたのプライバシーに侵入するための私を許してください。あなたは私達の両方の相互利益になります金融ビジネス関係で信頼することはできますか?私はあなたが私はあなたを伝えることを約午前何に興味を持つであろうことを期待して、あなたの国の国際ビジネス情報から自分の名前と連絡先を得ました。 私はここイギリスでHarlesdenからジェームズ・ウィリアムHartop、北西ロンドン、と思います。私は、UBS銀行、ロンドンのために働きます。私は私達の両方に莫大

Re: [PATCHv2] usb: dwc2: Add reset control to dwc2

2016-04-11 Thread kbuild test robot
Hi Dinh, [auto build test ERROR on balbi-usb/next] [also build test ERROR on v4.6-rc3 next-20160411] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/dinguyen-opensource-altera-com/usb-dwc2-Add

[PATCHv2] usb: dwc2: Add reset control to dwc2

2016-04-11 Thread dinguyen
From: Dinh Nguyen Allow for platforms that have a reset controller driver in place to bring the USB IP out of reset. Signed-off-by: Dinh Nguyen --- v2: move to lowlevel_hw_init() --- drivers/usb/dwc2/core.h |1 + drivers/usb/dwc2/platform.c | 15 +++ 2 files changed, 16 i

Re: [PATCH 1/2] usb: dwc2: Add reset control to dwc2

2016-04-11 Thread Dinh Nguyen
On Thu, 7 Apr 2016, John Youn wrote: > Can you move into the lowlevel_hw_init()? The probe is a bit bloated > and we have these existing "lowlevel" functions where we consolidate > stuff like this. Same with the assert/deassert if possible. Yes, I can do that. Thanks for the review. BR, Dinh --

[PATCH v3] usb: serial: mos7840.c Support TIOCGRS485 and TIOCSRS485 ioctls()

2016-04-11 Thread Aaron Marburg
Add callbacks to handle TIOCGRS485 and TIOCSRS485 ioctl calls in mos7840.c, allowing configuration of the chip's "scratchpad" register to strobe the DTR line while transmitting. This functionality is required for RS485 mode on the B&B Electronics USOPTL4-4P and USOPTL4-2P USB-to-RS485/422 h

Re: DWC3: Clock Domain Crossing erratum description.

2016-04-11 Thread Kirill Dronov
Hi Felipe, On 04/07/2016 08:10 AM, Felipe Balbi wrote: Hi, Kirill Dronov writes: I'm working on USB device bringup on Intel E3800 – based board. DWC3 core configured as DRD in device mode. The only connected device phy is SMSC 3310 (USB2 ULPI). DWC3 core version is 2.10A. Gadget zero driver ca

Re: [PATCH v2] usb: gadget: composite: Clear reserved fields of SSP Dev Cap

2016-04-11 Thread John Youn
On 4/10/2016 10:17 PM, Felipe Balbi wrote: > > Hi, > > John Youn writes: >> Set the reserved fields of the SuperSpeed Plus Device Capability >> descriptor to 0. Otherwise there might be stale data there which will >> cause USB CV to fail. >> >> Fixes: f228a8de242a ("usb: gadget: composite: Retur

Re: XHCI is slow during boot (bios/efi) and leaves many dmesg messages

2016-04-11 Thread Janna Martl
On Mon, Apr 11, 2016 at 02:15:24PM -0400, Janna Martl wrote: > On Mon, Apr 11, 2016 at 11:22:12AM +0300, Felipe Balbi wrote: > >Just to confirm, can you check that disabling LPM > > solves the problem ? > > I tried your patch on 4.6.0-rc3 but it doesn't seem to change anything. Also I'm quite sur

Re: [PATCH v3 06/13] USB: ch341: add support for parity, frame length, stop bits

2016-04-11 Thread Grigori Goronzy
On 2016-04-11 19:25, Karl Palsson wrote: Sorry if you get this twice, I was having some client problems, but wanted to make sure you got this one... Grigori Goronzy wrote: With the new reinitialization method, configuring parity, different frame lengths and different stop bit settings work as

Re: XHCI is slow during boot (bios/efi) and leaves many dmesg messages

2016-04-11 Thread Janna Martl
On Mon, Apr 11, 2016 at 11:22:12AM +0300, Felipe Balbi wrote: >Just to confirm, can you check that disabling LPM > solves the problem ? I tried your patch on 4.6.0-rc3 but it doesn't seem to change anything. Here's a log: Apr 11 14:05:40 kernel: xhci_hcd :00:14.0: xHCI Host Controller Apr 11

Re: [PATCH v3 06/13] USB: ch341: add support for parity, frame length, stop bits

2016-04-11 Thread Karl Palsson
Sorry if you get this twice, I was having some client problems, but wanted to make sure you got this one... Grigori Goronzy wrote: > With the new reinitialization method, configuring parity, > different frame lengths and different stop bit settings work as > expected on both CH340G and CH341A. T

Re: [PATCH] usb: host: xhci-plat: Make enum xhci_plat_type start at a non zero value

2016-04-11 Thread Peter Griffin
Hi Mathias, On Fri, 25 Mar 2016, Peter Griffin wrote: > Otherwise generic-xhci and xhci-platform which have no data get wrongly > detected as XHCI_PLAT_TYPE_MARVELL_ARMADA by xhci_plat_type_is(). > > This fixes a regression in v4.5 for STiH407 family SoC's which use the > synopsis dwc3 IP, where

Re: [PATCH v2 1/2] dt/bindings/usb: Add bindings for PIC32 MUSB driver.

2016-04-11 Thread Rob Herring
On Thu, Apr 07, 2016 at 06:02:59PM +0530, Purna Chandra Mandal wrote: > Document devicetree binding for the USB controller > and USB Phy found on Microchip PIC32 class devices. > > Signed-off-by: Purna Chandra Mandal > > --- > > Changes in v2: None > > .../bindings/usb/microchip,pic32-musb.tx

Re: [PATCHv3 2/3] usb: storage: scsiglue: limit USB3 devices to 2048 sectors

2016-04-11 Thread Alan Stern
On Mon, 11 Apr 2016, Felipe Balbi wrote: > USB3 devices, because they are much newer, have much > less chance of having issues with larger transfers. > > We still keep a limit because anything above 2048 > sectors really rendered negligible speed > improvements, so we will simply ignore > that. T

Re: PROBLEM: Mouse connected to USB-3 stopped working 2.6.38->39 regression

2016-04-11 Thread Alan Stern
On Mon, 11 Apr 2016, Sam Sany wrote: > Sam Sany writes: > > No go. Just booted into the newly compiled kernel, and I still have the > exact same symptoms. The edited portion of the hub.c file I used to > compile looks as such: > > int usb_device_supports_lpm(struct usb_device *udev) > { >

Re: [PATCH] usb: core: buffer: avoid NULL pointer dereferrence

2016-04-11 Thread Alan Stern
On Mon, 11 Apr 2016, chunfeng yun wrote: > On Mon, 2016-04-11 at 08:07 +0300, Felipe Balbi wrote: > > Hi, > > > > chunfeng yun writes: > > > On Fri, 2016-04-08 at 07:07 -0700, Greg Kroah-Hartman wrote: > > >> On Fri, Apr 08, 2016 at 05:08:03PM +0800, Chunfeng Yun wrote: > > >> > NULL pointer der

[PATCH] usb: dwc3: omap: get rid of dma_status

2016-04-11 Thread Roger Quadros
dma_status bit flag is set but never really used so get rid of it. Reported-by: Felipe Balbi Signed-off-by: Roger Quadros --- drivers/usb/dwc3/dwc3-omap.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 55da2c7..890b8a6

[PATCH 1/2] usb: dwc3: omap: fix up error path on probe()

2016-04-11 Thread Roger Quadros
From: Felipe Balbi Even if pm_runtime_get*() fails, we *MUST* call pm_runtime_put_sync() before disabling PM. While at it, remove superfluous dwc3_omap_disable_irqs() in error path. Signed-off-by: Felipe Balbi [nsek...@ti.com: patch description updates] Signed-off-by: Sekhar Nori Signed-off-b

[PATCH 2/2] usb: dwc3: core: fix PHY handling during suspend

2016-04-11 Thread Roger Quadros
From: Felipe Balbi we need to power off the PHY during suspend and power it back on during resume. Signed-off-by: Felipe Balbi [nsek...@ti.com: fix call to usb_phy_set_suspend() in dwc3_suspend()] Signed-off-by: Sekhar Nori Signed-off-by: Roger Quadros --- drivers/usb/dwc3/core.c | 23 ++

[PATCH 0/2] usb: dwc3: fixes for v4.6-rc

2016-04-11 Thread Roger Quadros
Hi, These are some dwc3 fixes that were done by Felipe. I've just rebased and posted them. cheers, -roger Felipe Balbi (2): usb: dwc3: omap: fix up error path on probe() usb: dwc3: core: fix PHY handling during suspend drivers/usb/dwc3/core.c | 23 ++- drivers/usb/

Re: [PATCH v6 03/10] usb: dwc3: omap: Pass VBUS and ID events transparently

2016-04-11 Thread Roger Quadros
On 11/04/16 16:26, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> On 11/04/16 15:18, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Roger Quadros writes: Don't make any decisions regarding VBUS session based on ID status. That is best left to the OTG core. >>> >>> what about builds

Re: [PATCH v6 07/10] usb: dwc3: gadget: Fix suspend/resume during dual-role mode

2016-04-11 Thread Roger Quadros
On 11/04/16 16:26, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> On 11/04/16 15:23, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Roger Quadros writes: Gadget controller might not be always active during suspend/ resume when we are operating in dual-role/otg mode. Check if w

Re: [PATCH 2/7] usb: core: hcd: let HCDs pass a threaded irq handler

2016-04-11 Thread kbuild test robot
Hi Felipe, [auto build test WARNING on v4.6-rc3] [also build test WARNING on next-20160411] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Felipe-Balbi/usb-host-add-support-for-threaded-IRQs

Re: [PATCH 0/7] usb: host: add support for threaded IRQs

2016-04-11 Thread Greg Kroah-Hartman
On Mon, Apr 11, 2016 at 03:44:09PM +0300, Felipe Balbi wrote: > Hi guys, > > this patchset introduces support for threaded IRQs > for host controllers drivers to use. Right now, only > XHCI has been converted, but more drivers could > easily be converted as well. > > With this series we can, even

Re: [PATCH 0/7] usb: host: add support for threaded IRQs

2016-04-11 Thread Felipe Balbi
Felipe Balbi writes: > Hi guys, > > this patchset introduces support for threaded IRQs > for host controllers drivers to use. Right now, only > XHCI has been converted, but more drivers could > easily be converted as well. > > With this series we can, eventually, spend much less > time with IRQs

Re: [PATCH 1/2] usb: dwc3: core: Introduce dwc3_device_reinit()

2016-04-11 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> how many weeks is acceptable for you? I can run for that long, no problem. >>> And what if the issue doesn't happen in that time frame, would you still >>> consider this case? >> >> Well, there's always the possibility we have never triggered the issue >> to start

Re: [PATCH v6 03/10] usb: dwc3: omap: Pass VBUS and ID events transparently

2016-04-11 Thread Felipe Balbi
Hi, Roger Quadros writes: > On 11/04/16 15:18, Felipe Balbi wrote: >> >> Hi, >> >> Roger Quadros writes: >>> Don't make any decisions regarding VBUS session based on ID >>> status. That is best left to the OTG core. >> >> what about builds who don't want OTG and/or dual-role ? >> >>> Pass I

Re: [PATCH v6 07/10] usb: dwc3: gadget: Fix suspend/resume during dual-role mode

2016-04-11 Thread Felipe Balbi
Hi, Roger Quadros writes: > On 11/04/16 15:23, Felipe Balbi wrote: >> >> Hi, >> >> Roger Quadros writes: >>> Gadget controller might not be always active during suspend/ >>> resume when we are operating in dual-role/otg mode. >>> Check if we're active and only if we are then perform >>> neces

Re: USB xHCI regression after upgrading from kernel 3.19.0-51 to 4.2.0-34.]

2016-04-11 Thread Mathias Nyman
On 11.04.2016 08:28, Felipe Balbi wrote: Hi, Matthew Giassa writes: *Migrating from linux-media mailing list. Good day, I maintain an SDK for USB2.0 and USB3.0 U3V machine vision cameras, and several of our customers have reported severe issues since upgrading from kernel 3.19.0-51 (Ubuntu

Re: [PATCH v6 02/10] usb: dwc3: omap: Make the wrapper interrupt shared

2016-04-11 Thread Felipe Balbi
Hi, Roger Quadros writes: > On 11/04/16 15:58, Felipe Balbi wrote: >> >> Hi, >> >> Roger Quadros writes: > diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c > index 22e9606..51ca098 100644 > --- a/drivers/usb/dwc3/dwc3-omap.c > +++ b/drivers/usb/dwc3/dwc

Re: [PATCH v6 02/10] usb: dwc3: omap: Make the wrapper interrupt shared

2016-04-11 Thread Roger Quadros
On 11/04/16 15:58, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 22e9606..51ca098 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c @@ -274,19 +274,25 @@ sta

Re: [PATCH v6 08/10] usb: dwc3: core: fix PHY handling during suspend

2016-04-11 Thread Roger Quadros
On 11/04/16 15:24, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> From: Felipe Balbi >> >> we need to power off the PHY during suspend and >> power it back on during resume. >> >> Signed-off-by: Felipe Balbi >> [nsek...@ti.com: fix call to usb_phy_set_suspend() in dwc3_suspend()] >>

Re: [PATCH v6 07/10] usb: dwc3: gadget: Fix suspend/resume during dual-role mode

2016-04-11 Thread Roger Quadros
On 11/04/16 15:23, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> Gadget controller might not be always active during suspend/ >> resume when we are operating in dual-role/otg mode. >> Check if we're active and only if we are then perform >> necessary actions during suspend/resume. >

Re: [PATCH v6 04/10] usb: dwc3: omap: fix up error path on probe()

2016-04-11 Thread Roger Quadros
On 11/04/16 15:20, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> From: Felipe Balbi >> >> Even if pm_runtime_get*() fails, we *MUST* call >> pm_runtime_put_sync() before disabling PM. >> >> While at it, remove superfluous dwc3_omap_disable_irqs() >> in error path. >> >> Signed-off-by

[PATCH v2] usb: gadget: r8a66597-udc: Deinline pipe_change, save 2176 bytes

2016-04-11 Thread Denys Vlasenko
This function compiles to 298 bytes of machine code, has ~10 callsites. This is a USB 2.0 device, USB 2.0 is limited to ~40 MB/s, so should be almost never CPU bound. No need to optimize for speed this agressively. Signed-off-by: Denys Vlasenko CC: Felipe Balbi CC: linux-usb@vger.kernel.org CC:

Re: [PATCH v6 03/10] usb: dwc3: omap: Pass VBUS and ID events transparently

2016-04-11 Thread Roger Quadros
On 11/04/16 15:18, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> Don't make any decisions regarding VBUS session based on ID >> status. That is best left to the OTG core. > > what about builds who don't want OTG and/or dual-role ? > >> Pass ID and VBUS events independent of each oth

Re: [PATCH v6 02/10] usb: dwc3: omap: Make the wrapper interrupt shared

2016-04-11 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c >>> index 22e9606..51ca098 100644 >>> --- a/drivers/usb/dwc3/dwc3-omap.c >>> +++ b/drivers/usb/dwc3/dwc3-omap.c >>> @@ -274,19 +274,25 @@ static irqreturn_t dwc3_omap_interrupt(int irq, void >

Re: [PATCH 1/2] usb: dwc3: core: Introduce dwc3_device_reinit()

2016-04-11 Thread Roger Quadros
On 11/04/16 15:51, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: > > > >>> I don't have this text anywhere so I don't know. Is this something TI >>> came up with or Synopsys ? Unless I can see a document (preferrably from >>> Synopsys) stating this, I can't really accept $subject. >>

Re: [PATCH v6 02/10] usb: dwc3: omap: Make the wrapper interrupt shared

2016-04-11 Thread Roger Quadros
On 11/04/16 15:13, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> The wrapper interrupt is shared with OTG core so mark it IRQF_SHARED. >> >> Use request_threaded_irq() to ensure that irqflags match for the >> shared interrupt handlers. If we don't use request_treaded_irq() then >> for

Re: [PATCH 1/2] usb: dwc3: core: Introduce dwc3_device_reinit()

2016-04-11 Thread Felipe Balbi
Hi, Roger Quadros writes: >> I don't have this text anywhere so I don't know. Is this something TI >> came up with or Synopsys ? Unless I can see a document (preferrably from >> Synopsys) stating this, I can't really accept $subject. > > OK. I'll try to find out if there is an official docume

[PATCH 5/7] usb: hcd: conditionally set IRQF_ONESHOT flag

2016-04-11 Thread Felipe Balbi
only force IRQF_ONESHOT in case HCD_NO_ONESHOT is *not* set. As a precaution, WARN() in case IRQF_ONESHOT is already set elsewhere and we have HCD_NO_ONESHOT also enabled. Signed-off-by: Felipe Balbi --- drivers/usb/core/hcd.c | 17 - 1 file changed, 12 insertions(+), 5 deletions

[PATCH 2/7] usb: core: hcd: let HCDs pass a threaded irq handler

2016-04-11 Thread Felipe Balbi
in case an HCD wants to use threaded irqs to spend less time in hardirq context, we need this. Eventually we will remove IRQF_ONESHOT but only after all HCDs are fixed. Signed-off-by: Felipe Balbi --- drivers/usb/core/hcd.c | 43 --- include/linux/usb/hcd

[PATCH 3/7] usb: host: xhci: add a threaded irq handler

2016-04-11 Thread Felipe Balbi
Split xhci_irq() into top and bottom half handlers. Note that to make this work, we had to fix MSI interrupts as well to use threaded_irqs. Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-ring.c | 70 +--- drivers/usb/host/xhci.c | 15 +-

[PATCH 7/7] usb: host: xhci: pass HCD_NO_ONESHOT

2016-04-11 Thread Felipe Balbi
We, now, have all the pieces necessary to properly use threaded IRQ infrastructure, so let's pass the flag to usbcore. Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/x

[PATCH 4/7] usb: hcd: add HCD_NO_ONESHOT flag

2016-04-11 Thread Felipe Balbi
this flag will tell usbcore that HCD doesn't want to use IRQF_ONESHOT flag. HCDs setting this flag must make sure that their top-half handler masks HCD's IRQs and bottom half unmasks them. Signed-off-by: Felipe Balbi --- include/linux/usb/hcd.h | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH 6/7] usb: host: xhci: mask and unmask interrupt generation

2016-04-11 Thread Felipe Balbi
in order to be able to properly use threaded IRQ infrastructure, let's make that we mask our interrupts on top half and unmask them on bottom half. After this patch we can finally enable HCD_NO_ONESHOT for XHCI. Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-ring.c | 19 -

[PATCH 1/7] usb: core: hcd: simplify usb_hcd_irq()

2016-04-11 Thread Felipe Balbi
we can simplify usb_hcd_irq() by trusting the value returned by HCDs' irq handlers. Note that this will make conversion to threaded IRQs slightly simpler. Signed-off-by: Felipe Balbi --- drivers/usb/core/hcd.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/u

[PATCH 0/7] usb: host: add support for threaded IRQs

2016-04-11 Thread Felipe Balbi
Hi guys, this patchset introduces support for threaded IRQs for host controllers drivers to use. Right now, only XHCI has been converted, but more drivers could easily be converted as well. With this series we can, eventually, spend much less time with IRQs disabled. Note that, because we're mask

Re: [PATCH 1/2] usb: dwc3: core: Introduce dwc3_device_reinit()

2016-04-11 Thread Roger Quadros
On 04/04/16 11:10, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: > We will need this function for a workaround. > The function issues a softreset only to the device > controller and performs minimal re-initialization > so that the device co

Re: [PATCH v6 08/10] usb: dwc3: core: fix PHY handling during suspend

2016-04-11 Thread Felipe Balbi
Hi, Roger Quadros writes: > From: Felipe Balbi > > we need to power off the PHY during suspend and > power it back on during resume. > > Signed-off-by: Felipe Balbi > [nsek...@ti.com: fix call to usb_phy_set_suspend() in dwc3_suspend()] > Signed-off-by: Sekhar Nori > Signed-off-by: Roger Quad

Re: [PATCH v6 07/10] usb: dwc3: gadget: Fix suspend/resume during dual-role mode

2016-04-11 Thread Felipe Balbi
Hi, Roger Quadros writes: > Gadget controller might not be always active during suspend/ > resume when we are operating in dual-role/otg mode. > Check if we're active and only if we are then perform > necessary actions during suspend/resume. I don't get this. If we're operating in OTG, we shoul

Re: [PATCH v6 04/10] usb: dwc3: omap: fix up error path on probe()

2016-04-11 Thread Felipe Balbi
Hi, Roger Quadros writes: > From: Felipe Balbi > > Even if pm_runtime_get*() fails, we *MUST* call > pm_runtime_put_sync() before disabling PM. > > While at it, remove superfluous dwc3_omap_disable_irqs() > in error path. > > Signed-off-by: Felipe Balbi > [nsek...@ti.com: patch description upd

Re: [PATCH v6 03/10] usb: dwc3: omap: Pass VBUS and ID events transparently

2016-04-11 Thread Felipe Balbi
Hi, Roger Quadros writes: > Don't make any decisions regarding VBUS session based on ID > status. That is best left to the OTG core. what about builds who don't want OTG and/or dual-role ? > Pass ID and VBUS events independent of each other so that OTG > core knows exactly what to do. > > This

Re: [PATCH v6 02/10] usb: dwc3: omap: Make the wrapper interrupt shared

2016-04-11 Thread Felipe Balbi
Hi, Roger Quadros writes: > The wrapper interrupt is shared with OTG core so mark it IRQF_SHARED. > > Use request_threaded_irq() to ensure that irqflags match for the > shared interrupt handlers. If we don't use request_treaded_irq() then > forced threaded irq will set IRQF_ONESHOT and this won'

RE: [PATCH] usb: dwc3: free dwc->regset on dwc3_debugfs_exit

2016-04-11 Thread Felipe Balbi
Hi, "Du, Changbin" writes: >> >> >> > + dwc->regset = NULL; >> >> >> >> setting regset to NULL is unnecessary. We only call dwc3_debugfs_exit() >> >> when removing the driver. >> >> >> >> -- >> >> Balbi >> > I'd like keep this line even it is unnecessary, because It is a good habit >> >

[PATCH v6 00/10] usb: dwc3: add dual-role support

2016-04-11 Thread Roger Quadros
Hi, This series adds dual role support to dwc3 controller driver. Series depends on the OTG/dual-role framework [1]. [1] - https://lkml.org/lkml/2016/4/5/492 Patches are based on v4.6-rc1. v6: - use just otg irq to get otg events and don't depend on extcon at all. - follow OTG flow in TRM stric

[PATCH v6 01/10] usb: dwc3: core.h: add some register definitions

2016-04-11 Thread Roger Quadros
Add OTG and GHWPARAMS6 register definitions Signed-off-by: Roger Quadros --- drivers/usb/dwc3/core.h | 84 - 1 file changed, 83 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 6254b2f..81039f7 1006

[PATCH v6 04/10] usb: dwc3: omap: fix up error path on probe()

2016-04-11 Thread Roger Quadros
From: Felipe Balbi Even if pm_runtime_get*() fails, we *MUST* call pm_runtime_put_sync() before disabling PM. While at it, remove superfluous dwc3_omap_disable_irqs() in error path. Signed-off-by: Felipe Balbi [nsek...@ti.com: patch description updates] Signed-off-by: Sekhar Nori Signed-off-b

[PATCH v6 06/10] usb: dwc3: add dual-role support

2016-04-11 Thread Roger Quadros
Register with the USB OTG core. Since we don't support OTG yet we just work as a dual-role device even if device tree says "otg". Get ID and VBUS information from the OTG controller and kick the OTG state machine. Make sure dual-role functionality works across system suspend/resume. Signed-off-b

[PATCH v6 08/10] usb: dwc3: core: fix PHY handling during suspend

2016-04-11 Thread Roger Quadros
From: Felipe Balbi we need to power off the PHY during suspend and power it back on during resume. Signed-off-by: Felipe Balbi [nsek...@ti.com: fix call to usb_phy_set_suspend() in dwc3_suspend()] Signed-off-by: Sekhar Nori Signed-off-by: Roger Quadros --- drivers/usb/dwc3/core.c | 23 ++

RE: [PATCH] usb: dwc3: free dwc->regset on dwc3_debugfs_exit

2016-04-11 Thread Du, Changbin
> > >> > +dwc->regset = NULL; > >> > >> setting regset to NULL is unnecessary. We only call dwc3_debugfs_exit() > >> when removing the driver. > >> > >> -- > >> Balbi > > I'd like keep this line even it is unnecessary, because It is a good habit > > to > > Avoid wild pointers. Just like t

[PATCH v6 03/10] usb: dwc3: omap: Pass VBUS and ID events transparently

2016-04-11 Thread Roger Quadros
Don't make any decisions regarding VBUS session based on ID status. That is best left to the OTG core. Pass ID and VBUS events independent of each other so that OTG core knows exactly what to do. This makes dual-role with extcon work with OTG irq on OMAP platforms. Signed-off-by: Roger Quadros

[PATCH v6 02/10] usb: dwc3: omap: Make the wrapper interrupt shared

2016-04-11 Thread Roger Quadros
The wrapper interrupt is shared with OTG core so mark it IRQF_SHARED. Use request_threaded_irq() to ensure that irqflags match for the shared interrupt handlers. If we don't use request_treaded_irq() then forced threaded irq will set IRQF_ONESHOT and this won't match with the OTG irq handler. Sig

[PATCH v6 09/10] ARM: dts: dra7*-evm: Enable dual-role for usb1

2016-04-11 Thread Roger Quadros
Now that we have dual-role support working at USB core, enable dual-role support for usb1 controller. Signed-off-by: Roger Quadros --- arch/arm/boot/dts/dra7-evm.dts | 2 +- arch/arm/boot/dts/dra72-evm.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/

[PATCH v6 07/10] usb: dwc3: gadget: Fix suspend/resume during dual-role mode

2016-04-11 Thread Roger Quadros
Gadget controller might not be always active during suspend/ resume when we are operating in dual-role/otg mode. Check if we're active and only if we are then perform necessary actions during suspend/resume. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/gadget.c | 6 ++ 1 file changed, 6

[PATCH v6 10/10] ARM: dts: am43xx: Enable dual-role on USB1

2016-04-11 Thread Roger Quadros
USB1 port is micro-AB type and can function as peripheral as well as host. Enable dual-role mode for USB1. Signed-off-by: Roger Quadros --- arch/arm/boot/dts/am437x-gp-evm.dts | 2 +- arch/arm/boot/dts/am437x-sk-evm.dts | 2 +- arch/arm/boot/dts/am43x-epos-evm.dts | 2 +- 3 files changed, 3 in

[PATCH v6 05/10] usb: dwc3: core: cleanup IRQ resources

2016-04-11 Thread Roger Quadros
Implementations might use different IRQs for host, gadget and OTG so use named interrupt resources to allow Device tree to specify the 3 interrupts. Following are the interrupt names Peripheral Interrupt - peripheral HOST Interrupt - host OTG Interrupt - otg We still maintain backward compatibil

Re: [PATCH v3 00/16] da8xx USB clocks

2016-04-11 Thread Sekhar Nori
Hi David, On Thursday 07 April 2016 09:59 PM, David Lechner wrote: > Any further comments before I submit a v4 patchset? Particularly on > patches 3 and 4 which are new in this v3 submission and have not been > commented on yet. I applied some patches which could be applied independently without

RE: [PATCH v3 1/2] usb: dwc3: make dwc3_debugfs_init return value be void

2016-04-11 Thread Felipe Balbi
Hi, "Du, Changbin" writes: >> >root = debugfs_create_dir(dev_name(dwc->dev), NULL); >> > - if (!root) { >> > - ret = -ENOMEM; >> > - goto err0; >> > - } >> > + if (IS_ERR_OR_NULL(root)) >> > + return; >> >> We can definitely keep on going, but I'd still like to

RE: [PATCH v3 1/2] usb: dwc3: make dwc3_debugfs_init return value be void

2016-04-11 Thread Du, Changbin
> > root = debugfs_create_dir(dev_name(dwc->dev), NULL); > > - if (!root) { > > - ret = -ENOMEM; > > - goto err0; > > - } > > + if (IS_ERR_OR_NULL(root)) > > + return; > > We can definitely keep on going, but I'd still like to know that we > enabled CONFIG_D

RE: [PATCH] usb: dwc3: free dwc->regset on dwc3_debugfs_exit

2016-04-11 Thread Felipe Balbi
"Du, Changbin" writes: >> > diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c >> > index 9ac37fe..9eeb444 100644 >> > --- a/drivers/usb/dwc3/debugfs.c >> > +++ b/drivers/usb/dwc3/debugfs.c >> > @@ -687,4 +687,7 @@ void dwc3_debugfs_exit(struct dwc3 *dwc) >> > { >> >debugfs

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

2016-04-11 Thread Baolin Wang
Hi Jun, Sorry for late reply. >> >> >> >> +/* >> >> >> >> + * usb_charger_detect_type() - detect the charger type manually. >> >> >> >> + * @uchger - usb charger device >> >> >> >> + * >> >> >> >> + * Note: You should ensure you need to detect the charger type >> >> >> >> +manually on your >> >>

Re: [PATCH v1] net: cdc_ncm: update datagram size after changing mtu

2016-04-11 Thread Robert Dobrowolski
> Robert Dobrowolski writes: > >> From: Rafal Redzimski >> >> Current implementation updates the mtu size and notify cdc_ncm >> device using USB_CDC_SET_MAX_DATAGRAM_SIZE request about datagram >> size change instead of changing rx_urb_size. >> >> Whenever mtu is being changed, datagram size shou

RE: [PATCH] usb: dwc3: free dwc->regset on dwc3_debugfs_exit

2016-04-11 Thread Du, Changbin
> > diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c > > index 9ac37fe..9eeb444 100644 > > --- a/drivers/usb/dwc3/debugfs.c > > +++ b/drivers/usb/dwc3/debugfs.c > > @@ -687,4 +687,7 @@ void dwc3_debugfs_exit(struct dwc3 *dwc) > > { > > debugfs_remove_recursive(dwc->root); >

Re: [PATCH v6 07/12] usb: otg: add OTG/dual-role core

2016-04-11 Thread Roger Quadros
On 08/04/16 14:22, Yoshihiro Shimoda wrote: > Hi, > >> From: Roger Quadros >> Sent: Thursday, April 07, 2016 8:45 PM >> >> Hi, >> >> On 07/04/16 11:52, Yoshihiro Shimoda wrote: >>> Hi, >>> From: Roger Quadros Sent: Tuesday, April 05, 2016 11:05 PM > < snip > >>> diff --git a/drivers/usb/

Re: [PATCH v3 06/16] ARM: davinci: da850: use clk->set_parent for async3

2016-04-11 Thread Sekhar Nori
On Friday 25 March 2016 05:21 AM, David Lechner wrote: > The da850 family of processors has an async3 clock domain that can be > muxed to either pll0_sysclk2 or pll1_sysclk2. Now that the davinci clocks > have a set_parent callback, we can use this to control the async3 mux > instead of a stand-alo

Re: [PATCH v3 05/16] ARM: davinci: add set_parent callback for mux clocks

2016-04-11 Thread Sekhar Nori
On Friday 25 March 2016 05:21 AM, David Lechner wrote: > Introduce a set_parent callback that will be used for mux clocks, such as > the USB PHY muxes and the async3 clock domain mux. > > Signed-off-by: David Lechner > --- > > v3 changes: none. > > > arch/arm/mach-davinci/clock.c | 17 +++

Re: [PATCH v2 1/2] dt-bindings: phy-mt65xx-usb: add support for mt2701 platform

2016-04-11 Thread chunfeng yun
add Matthias sorry On Mon, 2016-04-11 at 15:41 +0800, Chunfeng Yun wrote: > A new compatible string, "mediatek,mt2701-u3phy", is added. > > Signed-off-by: Chunfeng Yun > --- > .../devicetree/bindings/phy/phy-mt65xx-usb.txt |4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >

Re: [PATCH v3 04/16] ARM: davinci: Move clock init after ioremap.

2016-04-11 Thread Sekhar Nori
On Friday 25 March 2016 05:21 AM, David Lechner wrote: > Some clocks (such as the USB PHY clocks in DA8xx) will need to use iomem. > The davinci_common_init() function must be called before the ioremap, so > the clock init is now split out as separate function. > > Signed-off-by: David Lechner >

[-next] BUG_ON in scsi_target_destroy()

2016-04-11 Thread Sergey Senozhatsky
Hello, commit 7b106f2de6938c31ce5e9c86bc70ad3904666b96 Author: Johannes Thumshirn Date: Tue Apr 5 11:50:44 2016 +0200 scsi: Add intermediate STARGET_REMOVE state to scsi_target_state BUG_ON()s (next-20160411) each time I remove a usb flash [ 49.561600] [] scsi_target_destroy+0x5a

Re: [PATCH v3 03/16] ARM: davinici: da8xx: move usb code to new file

2016-04-11 Thread Sekhar Nori
On Friday 25 March 2016 05:21 AM, David Lechner wrote: > We will be adding more da8xx-specific code for phy and clocks, so it will > be better to have this in a separate file. This way we don't have a bunch > of #ifdefs for all of the da8xx stuff. > > Signed-off-by: David Lechner Applied this pa

Re: [PATCH] drivers/usb/gadget/udc/r8a66597-udc.c: Deinline pipe_change, save 2176 bytes

2016-04-11 Thread Felipe Balbi
Hi again, Felipe Balbi writes: > Denys Vlasenko writes: >> This function compiles to 298 bytes of machine code, has ~10 callsites. > > fair enough > >> This is a USB 2.0 device, USB 2.0 is limited to 35 MB/s, so should be > > it's not limited to 35MB/sec, sorry. USB 2.0 has a theoretical maximu

Re: XHCI is slow during boot (bios/efi) and leaves many dmesg messages

2016-04-11 Thread Felipe Balbi
Hi, Olliver Schinagl writes: > Hey all, > > On 11-04-16 07:12, Felipe Balbi wrote: >> Hi, >> >> Janna Martl writes: >>> On 2016-04-04 9:06:28, Olliver Schinagl wrote: Hi list, I have a Apple Inc. MacBookPro11,1 (with the most recent 'bios': BIOS MBP111.88Z.0138.B16.150908143

Re: [PATCH v3 02/16] mfd: da8xx-cfgchip: New header file for CFGCHIP registers.

2016-04-11 Thread Sekhar Nori
On Monday 28 March 2016 10:12 PM, Sergei Shtylyov wrote: > Hello. > > On 03/28/2016 06:02 PM, David Lechner wrote: > +/* register offsets */ +#define CFGCHIP_REG(n)(n * 4) +#define CFGCHIP0_REGCFGCHIP_REG(0) +#define CFGCHIP1_REG

Re: [PATCH] usb: core: buffer: avoid NULL pointer dereferrence

2016-04-11 Thread Felipe Balbi
Hi, chunfeng yun writes: >> > On Fri, 2016-04-08 at 07:07 -0700, Greg Kroah-Hartman wrote: >> >> On Fri, Apr 08, 2016 at 05:08:03PM +0800, Chunfeng Yun wrote: >> >> > NULL pointer dereferrence will happen when class driver >> >> > wants to allocate zero length buffer and pool_max[0] >> >> > can'

Re: XHCI is slow during boot (bios/efi) and leaves many dmesg messages

2016-04-11 Thread Felipe Balbi
Hi, Janna Martl writes: >> > On 2016-04-04 9:06:28, Olliver Schinagl wrote: >> >> It spews some messages in dmesg (taking some 15 seconds) and only then, >> >> the >> >> keyboard starts to work again. >> >> which messages ? We need these dmesg messages > > Olliver posted his dmesg here [0] (I

Re: [PATCH v3 01/16] dt: davinci: use proper address after @

2016-04-11 Thread Sekhar Nori
On Friday 25 March 2016 05:21 AM, David Lechner wrote: > TI has been using the physical address in DT after the @ in device nodes. > The device tree convention is to use the same address that is used for > the reg property. This updates all davinci DT files to use the proper > convention. > > Sign

Re: XHCI is slow during boot (bios/efi) and leaves many dmesg messages

2016-04-11 Thread Olliver Schinagl
Hey all, On 11-04-16 07:12, Felipe Balbi wrote: Hi, Janna Martl writes: On 2016-04-04 9:06:28, Olliver Schinagl wrote: Hi list, I have a Apple Inc. MacBookPro11,1 (with the most recent 'bios': BIOS MBP111.88Z.0138.B16.1509081438 09/08/2015). At the beginning, USB worked normally. After a wh

Re: [PATCH v3 1/2] usb: dwc3: make dwc3_debugfs_init return value be void

2016-04-11 Thread Felipe Balbi
Hi, changbin...@intel.com writes: > diff --git a/drivers/usb/dwc3/debug.h b/drivers/usb/dwc3/debug.h > index 07fbc2d..71e3180 100644 > --- a/drivers/usb/dwc3/debug.h > +++ b/drivers/usb/dwc3/debug.h > @@ -217,11 +217,11 @@ static inline const char > *dwc3_gadget_event_type_string(u8 event) > vo

  1   2   >