RE: [PATCH] usb: dwc3: gadget: fix miss isoc issue introduced by IRQ latency

2018-12-14 Thread Felipe Balbi
Hi, "Zengtao (B)" writes: >>-Original Message- >>From: Felipe Balbi [mailto:ba...@kernel.org] >>Sent: Friday, December 14, 2018 4:52 PM >>To: Zengtao (B) >>Cc: liangshengjun ; Zengtao (B) >>; Greg Kroah-Hartman >>; linux-...@vger.kern

Re: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-12-14 Thread Felipe Balbi
Hi, Sekhar Nori writes: All this should be part of comments in code along with information about controller versions which suffer from the errata. Is there a version of controller available which does not have the defect? Is there a future plan to fix this?

Re: [PATCH] usb: dwc3: gadget: fix miss isoc issue introduced by IRQ latency

2018-12-14 Thread Felipe Balbi
Zeng Tao writes: > If it's a busy system, some times when we start an isoc transfer, the > framenumber get from the event buffer may be already elasped, in this > case, we will get all the packets dropped due to miss isoc. And we turn > into transfer nothing, to fix this issue, we need to fix

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-12 Thread Felipe Balbi
Peter Chen writes: >> >> >> +irqreturn_t ret = IRQ_NONE; >> >> >> +unsigned long flags; >> >> >> +u32 reg; >> >> >> + >> >> >> +priv_dev = cdns->gadget_dev; >> >> >> +spin_lock_irqsave(_dev->lock, flags); >> >> > >> >> >you're already running in hardirq context. Why do you

Re: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Felipe Balbi
Peter Chen writes: >> >> +tmode = le16_to_cpu(ctrl->wIndex); >> >> + >> >> +if (!set || (tmode & 0xff) != 0) >> >> +return -EINVAL; >> >> + >> >> +switch (tmode >> 8) { >> >> +case TEST_J: >> >> +case TEST_K: >> >> +

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Felipe Balbi
Hi Pawel Laszczak writes: >>> + cdns->phy = devm_phy_get(dev, "cdns3,usbphy"); >>> + if (IS_ERR(cdns->phy)) { >>> + ret = PTR_ERR(cdns->phy); >>> + if (ret == -ENOSYS || ret == -ENODEV) { >> >>Are you sure you can get ENOSYS here? Have you checked output of >>checkpatch

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Felipe Balbi
Hi, Pawel Laszczak writes: >>I think what Felipe meant was to only combine the gadget driver code into one >>patch. >> >>The series could be split into 6 patches like so. >>-dt binding >>-pci glue >>-core driver >>-host driver >>-gadget driver >>-drd driver > > Felipe wrote: > " > Frankly, I

Re: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Felipe Balbi
Hi, Pawel Laszczak writes: > +static int cdns3_probe(struct platform_device *pdev) > +{ > + struct device *dev = >dev; > + struct resource *res; > + struct cdns3 *cdns; > + void __iomem *regs; > + int ret; > + > + cdns = devm_kzalloc(dev, sizeof(*cdns), GFP_KERNEL); > +

Re: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Felipe Balbi
Hi, Roger Quadros writes: >> This patch introduce new Cadence USBSS DRD driver >> to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly >> configurable IP Core which can be >> instantiated as Dual-Role Device (DRD), >> Peripheral Only and Host Only (XHCI) >> configurations. >> >>

RE: [PATCH v7 09/10] usb: dwc3: Check for IOC/LST bit in both event->status and TRB->ctrl fields

2018-12-10 Thread Felipe Balbi
Hi, Anurag Kumar Vulisha writes: > Thanks for reviewing this patch. Lets consider an example where a > request has num_sgs > 0 and each sg is mapped to a TRB and the last > TRB has the IOC bit set. Once the controller is done with the > transfer, it generates XferInProgress for

RE: [PATCH v7 09/10] usb: dwc3: Check for IOC/LST bit in both event->status and TRB->ctrl fields

2018-12-09 Thread Felipe Balbi
Hi, Anurag Kumar Vulisha writes: > HI Felipe, > >>-Original Message----- >>From: Felipe Balbi [mailto:ba...@kernel.org] >>Sent: Friday, December 07, 2018 11:42 AM >>To: Anurag Kumar Vulisha ; Greg Kroah-Hartman >>; Shuah Khan ; Alan Stern >>

Re: [PATCH] usb: dwc2: Revert "usb: dwc2: Disable all EP's on disconnect"

2018-12-07 Thread Felipe Balbi
Hi, Minas Harutyunyan writes: > Hi Filipe, > > My patch dccf1bad4be7eaa096c1f3697bd37883f9a08ecb "usb: dwc2: Disable > all EP's on disconnect" applied to 4.20-rc1. > > I need to update this patch. What I should do. There are 2 options: > > 1. Ack Marek Szyprowski [PATCH] usb: dwc2: >

Re: [PATCH] usb: dwc2: Revert "usb: dwc2: Disable all EP's on disconnect"

2018-12-07 Thread Felipe Balbi
Hi, Minas Harutyunyan writes: > Hi Marek, > > On 12/6/2018 7:04 PM, Marek Szyprowski wrote: >> Dear Minas, >> >> On 2018-12-04 13:34, Minas Harutyunyan wrote: >>> On 11/23/2018 6:43 PM, Dan Carpenter wrote: Ugh... We also had a long thread about the v2 patch but it turns out the

RE: [PATCH v7 09/10] usb: dwc3: Check for IOC/LST bit in both event->status and TRB->ctrl fields

2018-12-06 Thread Felipe Balbi
Hi, Anurag Kumar Vulisha writes: >>> @@ -2286,7 +2286,12 @@ static int >>dwc3_gadget_ep_reclaim_completed_trb(struct dwc3_ep *dep, >>> if (event->status & DEPEVT_STATUS_SHORT && !chain) >>> return 1; >>> >>> - if (event->status & (DEPEVT_STATUS_IOC | DEPEVT_STATUS_LST)) >>> +

RE: [PATCH v7 01/10] usb: gadget: udc: Add timer support for usb requests

2018-12-06 Thread Felipe Balbi
hi, Anurag Kumar Vulisha writes: >>Does the data book suggest a value for the timeout? >> > > No, the databook doesn't mention about the timeout value > >>> >At this point, it seems that the generic approach will be messier than >>> >having every >>> >controller driver implement its own fix.

Re: omap5: dwc3 interface status in /sys

2018-10-18 Thread Felipe Balbi
Hi, On Tue, Oct 16, 2018 at 1:27 PM Roger Quadros wrote: > > Felipe, > > On 16/10/2018 12:29, H. Nikolaus Schaller wrote: > > Hi, > > > >> Am 17.09.2018 um 10:24 schrieb H. Nikolaus Schaller : > >> > >> Hi Felipe, > >> I have made otg mode work on the omap5-uevm with help from Roger > >> and now

Re: omap5: dwc3 interface status in /sys

2018-10-18 Thread Felipe Balbi
Hi, On Tue, Oct 16, 2018 at 1:27 PM Roger Quadros wrote: > > Felipe, > > On 16/10/2018 12:29, H. Nikolaus Schaller wrote: > > Hi, > > > >> Am 17.09.2018 um 10:24 schrieb H. Nikolaus Schaller : > >> > >> Hi Felipe, > >> I have made otg mode work on the omap5-uevm with help from Roger > >> and now

Re: [PATCH v2 2/2] arm64: dts: exynos: add OF graph between USB-PHY and MUIC

2018-05-15 Thread Felipe Balbi
Krzysztof Kozlowski writes: > On Tue, May 15, 2018 at 2:12 PM, Andrzej Hajda wrote: >> OF graph describes USB data lanes between USB-PHY and respective MUIC. >> Since graph is present and DWC driver can use it to get extcon, obsolete >> extcon property can

Re: [PATCH v2 2/2] arm64: dts: exynos: add OF graph between USB-PHY and MUIC

2018-05-15 Thread Felipe Balbi
Krzysztof Kozlowski writes: > On Tue, May 15, 2018 at 2:12 PM, Andrzej Hajda wrote: >> OF graph describes USB data lanes between USB-PHY and respective MUIC. >> Since graph is present and DWC driver can use it to get extcon, obsolete >> extcon property can be removed. >> >> Signed-off-by:

Re: [PATCH 1/2] Convert target drivers to use sbitmap

2018-05-15 Thread Felipe Balbi
onvert the percpu_ida users to the sbitmap API. > > Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> > --- [...] > drivers/usb/gadget/function/f_tcm.c | 8 +++--- for drivers/usb/gadget/function/f_tcm.c Acked-by: Felipe Balbi <felipe.ba...@linux.intel.com> -- balbi signature.asc Description: PGP signature

Re: [PATCH 1/2] Convert target drivers to use sbitmap

2018-05-15 Thread Felipe Balbi
ff-by: Matthew Wilcox > --- [...] > drivers/usb/gadget/function/f_tcm.c | 8 +++--- for drivers/usb/gadget/function/f_tcm.c Acked-by: Felipe Balbi -- balbi signature.asc Description: PGP signature

Re: [PATCH 1/2] USB: dwc3: get extcon device by OF graph bindings

2018-05-15 Thread Felipe Balbi
Andrzej Hajda writes: > extcon device is used to detect host/device connection. Since extcon > OF property is deprecated, alternative method should be added. > This method uses OF graph bindings to locate extcon. > > Signed-off-by: Andrzej Hajda > --- >

Re: [PATCH 1/2] USB: dwc3: get extcon device by OF graph bindings

2018-05-15 Thread Felipe Balbi
Andrzej Hajda writes: > extcon device is used to detect host/device connection. Since extcon > OF property is deprecated, alternative method should be added. > This method uses OF graph bindings to locate extcon. > > Signed-off-by: Andrzej Hajda > --- > Hi all, > > This patch implements

Re: [PATCH] usb: gadget: composite: fill bcdUSB as 0x0320 for SuperSpeed or higher speeds

2018-05-15 Thread Felipe Balbi
Hi, Chunfeng Yun <chunfeng@mediatek.com> writes: > On Wed, 2018-05-09 at 14:33 +0300, Felipe Balbi wrote: >> Hi, >> >> Chunfeng Yun <chunfeng@mediatek.com> writes: >> > The USB3CV version 2.1.80 (March 26, 2018) requires all devices >> &

Re: [PATCH] usb: gadget: composite: fill bcdUSB as 0x0320 for SuperSpeed or higher speeds

2018-05-15 Thread Felipe Balbi
Hi, Chunfeng Yun writes: > On Wed, 2018-05-09 at 14:33 +0300, Felipe Balbi wrote: >> Hi, >> >> Chunfeng Yun writes: >> > The USB3CV version 2.1.80 (March 26, 2018) requires all devices >> > ( gen1, gen2, single lane, dual lane) to return the v

Re: [PATCH] usb: gadget: composite: fill bcdUSB as 0x0320 for SuperSpeed or higher speeds

2018-05-09 Thread Felipe Balbi
Hi, Chunfeng Yun writes: > The USB3CV version 2.1.80 (March 26, 2018) requires all devices > ( gen1, gen2, single lane, dual lane) to return the value of 0x0320 > in the bcdUSB field this sounds really odd. What happens when I get a USB 3.1 compliant device

Re: [PATCH] usb: gadget: composite: fill bcdUSB as 0x0320 for SuperSpeed or higher speeds

2018-05-09 Thread Felipe Balbi
Hi, Chunfeng Yun writes: > The USB3CV version 2.1.80 (March 26, 2018) requires all devices > ( gen1, gen2, single lane, dual lane) to return the value of 0x0320 > in the bcdUSB field this sounds really odd. What happens when I get a USB 3.1 compliant device off-the-shelf and run it through

Re: [PATCH 1/3] usb: gadget: udc: atmel: GPIO inversion is handled by gpiod

2018-04-25 Thread Felipe Balbi
Romain Izard writes: > When converting to GPIO descriptors, gpiod_get_value automatically > handles the line inversion flags from the device tree. > > Do not invert the line twice. > > Fixes: 3df034081021fa4b6967ce3364bc7d867ec1c870 your fixes line is incorrect.

Re: [PATCH 1/3] usb: gadget: udc: atmel: GPIO inversion is handled by gpiod

2018-04-25 Thread Felipe Balbi
Romain Izard writes: > When converting to GPIO descriptors, gpiod_get_value automatically > handles the line inversion flags from the device tree. > > Do not invert the line twice. > > Fixes: 3df034081021fa4b6967ce3364bc7d867ec1c870 your fixes line is incorrect. Please fix and resend. While at

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-04-10 Thread Felipe Balbi
Hi, Minas Harutyunyan writes: >>> Actually to fix this issue I updated condition of wait function >>> from: >>> !(dep->flags & DWC3_EP_END_TRANSFER_PENDING) >>> to: >>> !(dep->flags & DWC3_EP_END_TRANSFER_PENDING & DWC3_EP_ENABLED) >>

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-04-10 Thread Felipe Balbi
Hi, Minas Harutyunyan writes: >>> Actually to fix this issue I updated condition of wait function >>> from: >>> !(dep->flags & DWC3_EP_END_TRANSFER_PENDING) >>> to: >>> !(dep->flags & DWC3_EP_END_TRANSFER_PENDING & DWC3_EP_ENABLED) >> >> you're not fixing anything.

Re: Multiple generic PHY instances for DWC3 USB IP

2018-04-04 Thread Felipe Balbi
Hi, Masahiro Yamada writes: >>> Each DWC3 instance is connected with >>> multiple HS PHYs and multiple SS PHYs, >>> depending on the number of ports. >> >> in that case, you shouldn't need dwc3 at all. A Host-only dwc3 is xHCI >> compliant. If you really don't

Re: Multiple generic PHY instances for DWC3 USB IP

2018-04-04 Thread Felipe Balbi
Hi, Masahiro Yamada writes: >>> Each DWC3 instance is connected with >>> multiple HS PHYs and multiple SS PHYs, >>> depending on the number of ports. >> >> in that case, you shouldn't need dwc3 at all. A Host-only dwc3 is xHCI >> compliant. If you really don't have the gadget block, there's no

Re: Multiple generic PHY instances for DWC3 USB IP

2018-04-04 Thread Felipe Balbi
Hi, Masahiro Yamada <yamada.masah...@socionext.com> writes: > 2018-04-04 14:36 GMT+09:00 Felipe Balbi <felipe.ba...@linux.intel.com>: >> >> Hi, >> >> Masahiro Yamada <yamada.masah...@socionext.com> writes: >>> Currently, DWC3 core IP (driv

Re: Multiple generic PHY instances for DWC3 USB IP

2018-04-04 Thread Felipe Balbi
Hi, Masahiro Yamada writes: > 2018-04-04 14:36 GMT+09:00 Felipe Balbi : >> >> Hi, >> >> Masahiro Yamada writes: >>> Currently, DWC3 core IP (drivers/usb/dwc3/core.c) >>> can take only one PHY phandle for each of SS, HS. >>> (phy-names DT pr

Re: Multiple generic PHY instances for DWC3 USB IP

2018-04-03 Thread Felipe Balbi
Hi, Masahiro Yamada writes: > Currently, DWC3 core IP (drivers/usb/dwc3/core.c) > can take only one PHY phandle for each of SS, HS. > (phy-names DT property is "usb2-phy" and "usb3-phy" for each) We never had any other requirements :-) > The DWC3 core IP is

Re: Multiple generic PHY instances for DWC3 USB IP

2018-04-03 Thread Felipe Balbi
Hi, Masahiro Yamada writes: > Currently, DWC3 core IP (drivers/usb/dwc3/core.c) > can take only one PHY phandle for each of SS, HS. > (phy-names DT property is "usb2-phy" and "usb3-phy" for each) We never had any other requirements :-) > The DWC3 core IP is provided by Synopsys, > but some

RE: [PATCH] usb: dwc3: gadget: Correct the logic for queuing sgs

2018-03-23 Thread Felipe Balbi
(please configure your email client to break lines at 80 columns ;-) Hi, Anurag Kumar Vulisha writes: > Hi Felipe, > > Thanks for reviewing the patch , please find my comments inline no issues :-) >>Anurag Kumar Vulisha writes: >>> This

RE: [PATCH] usb: dwc3: gadget: Correct the logic for queuing sgs

2018-03-23 Thread Felipe Balbi
(please configure your email client to break lines at 80 columns ;-) Hi, Anurag Kumar Vulisha writes: > Hi Felipe, > > Thanks for reviewing the patch , please find my comments inline no issues :-) >>Anurag Kumar Vulisha writes: >>> This patch fixes two issues >>> >>> 1. The code logic in

Re: linux-next: Tree for Mar 21 (usb/dwc3)

2018-03-22 Thread Felipe Balbi
Hi, Randy Dunlap writes: > On 03/21/2018 01:25 AM, Stephen Rothwell wrote: >> Hi all, >> >> Changes since 20180320: >> > > > on i386: > > ERROR: "__tracepoint_dwc3_gadget_generic_cmd" [drivers/usb/dwc3/dwc3.ko] > undefined! > ERROR: "__tracepoint_dwc3_ep_queue"

Re: linux-next: Tree for Mar 21 (usb/dwc3)

2018-03-22 Thread Felipe Balbi
Hi, Randy Dunlap writes: > On 03/21/2018 01:25 AM, Stephen Rothwell wrote: >> Hi all, >> >> Changes since 20180320: >> > > > on i386: > > ERROR: "__tracepoint_dwc3_gadget_generic_cmd" [drivers/usb/dwc3/dwc3.ko] > undefined! > ERROR: "__tracepoint_dwc3_ep_queue" [drivers/usb/dwc3/dwc3.ko]

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-19 Thread Felipe Balbi
Hi, Minas Harutyunyan writes: >> Thanks for picking this for -next. >> Is it better to have this in v4.16-rc fixes? >> and also stable? v4.12+ > > Well, there was no "Fixes: foobar" or "Cc: stable" lines in the commit > log ;-) > >

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-19 Thread Felipe Balbi
Hi, Minas Harutyunyan writes: >> Thanks for picking this for -next. >> Is it better to have this in v4.16-rc fixes? >> and also stable? v4.12+ > > Well, there was no "Fixes: foobar" or "Cc: stable" lines in the commit > log ;-) > > The best we can do now, is wait

Re: [PATCH] usb: dwc3: gadget: Correct the logic for queuing sgs

2018-03-19 Thread Felipe Balbi
Hi, Anurag Kumar Vulisha writes: > This patch fixes two issues > > 1. The code logic in dwc3_prepare_one_trb() incorrectly uses the address > and length given in req packet even for scattergather lists. This patch > correct's the code to use sg->address and

Re: [PATCH] usb: dwc3: gadget: Correct the logic for queuing sgs

2018-03-19 Thread Felipe Balbi
Hi, Anurag Kumar Vulisha writes: > This patch fixes two issues > > 1. The code logic in dwc3_prepare_one_trb() incorrectly uses the address > and length given in req packet even for scattergather lists. This patch > correct's the code to use sg->address and sg->length when scattergather > lists

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-16 Thread Felipe Balbi
Hi, Minas Harutyunyan writes: On 09/03/18 14:47, Roger Quadros wrote: > In the following test we get stuck by sleeping forever in _dwc3_set_mode() > after which dual-role switching doesn't work. > > On dra7-evm's dual-role port, > - Load

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-16 Thread Felipe Balbi
Hi, Minas Harutyunyan writes: On 09/03/18 14:47, Roger Quadros wrote: > In the following test we get stuck by sleeping forever in _dwc3_set_mode() > after which dual-role switching doesn't work. > > On dra7-evm's dual-role port, > - Load g_zero gadget driver and

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-16 Thread Felipe Balbi
Hi, Roger Quadros writes: > Hi Felipe, > > On 09/03/18 14:47, Roger Quadros wrote: >> In the following test we get stuck by sleeping forever in _dwc3_set_mode() >> after which dual-role switching doesn't work. >> >> On dra7-evm's dual-role port, >> - Load g_zero gadget driver

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-16 Thread Felipe Balbi
Hi, Roger Quadros writes: > Hi Felipe, > > On 09/03/18 14:47, Roger Quadros wrote: >> In the following test we get stuck by sleeping forever in _dwc3_set_mode() >> after which dual-role switching doesn't work. >> >> On dra7-evm's dual-role port, >> - Load g_zero gadget driver and enumerate to

Re: [PATCH][usb-next] usb: dwc2: ix spelling mistake: "genereted" -> "generated"

2018-03-14 Thread Felipe Balbi
Hi, Colin King writes: > From: Colin Ian King > > Trivial fix to spelling mistake in dev_warn warning message text. > > Signed-off-by: Colin Ian King seems like we need a patch to fix your subject ;-) I'll fix it

Re: [PATCH][usb-next] usb: dwc2: ix spelling mistake: "genereted" -> "generated"

2018-03-14 Thread Felipe Balbi
Hi, Colin King writes: > From: Colin Ian King > > Trivial fix to spelling mistake in dev_warn warning message text. > > Signed-off-by: Colin Ian King seems like we need a patch to fix your subject ;-) I'll fix it when applying -- balbi signature.asc Description: PGP signature

Re: [PATCH v1 2/2] usb: dwc3: Add Qualcomm DWC3 glue driver

2018-03-14 Thread Felipe Balbi
Hi, Manu Gautam <mgau...@codeaurora.org> writes: > Hi, > > > On 3/13/2018 4:38 PM, Felipe Balbi wrote: >> Hi, >> >> +Andy >> >> Manu Gautam <mgau...@codeaurora.org> writes: >>> DWC3 controller on Qualcomm SOCs has a Qscratch wrap

Re: [PATCH v1 2/2] usb: dwc3: Add Qualcomm DWC3 glue driver

2018-03-14 Thread Felipe Balbi
Hi, Manu Gautam writes: > Hi, > > > On 3/13/2018 4:38 PM, Felipe Balbi wrote: >> Hi, >> >> +Andy >> >> Manu Gautam writes: >>> DWC3 controller on Qualcomm SOCs has a Qscratch wrapper. >>> Some of its uses are described below resulting

Re: [PATCH v1 2/2] usb: dwc3: Add Qualcomm DWC3 glue driver

2018-03-13 Thread Felipe Balbi
Hi, +Andy Manu Gautam writes: > DWC3 controller on Qualcomm SOCs has a Qscratch wrapper. > Some of its uses are described below resulting in need to > have a separate glue driver instead of using dwc3-of-simple: > - It exposes register interface to override

Re: [PATCH v1 2/2] usb: dwc3: Add Qualcomm DWC3 glue driver

2018-03-13 Thread Felipe Balbi
Hi, +Andy Manu Gautam writes: > DWC3 controller on Qualcomm SOCs has a Qscratch wrapper. > Some of its uses are described below resulting in need to > have a separate glue driver instead of using dwc3-of-simple: > - It exposes register interface to override vbus-override >and

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Felipe Balbi
Hi, Roger Quadros writes: >> When we set up the DWC3_DEPCMD_ENDTRANSFER command in >> dwc3_stop_active_transfer(), we can do not set DWC3_DEPCMD_CMDIOC, >> then there will no endpoint command complete interrupts I think. >> >> cmd |= DWC3_DEPCMD_CMDIOC; >

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Felipe Balbi
Hi, Roger Quadros writes: >> When we set up the DWC3_DEPCMD_ENDTRANSFER command in >> dwc3_stop_active_transfer(), we can do not set DWC3_DEPCMD_CMDIOC, >> then there will no endpoint command complete interrupts I think. >> >> cmd |= DWC3_DEPCMD_CMDIOC; > > I

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> This is what the v3.10 databook says >>> >>> "When issuing an End Transfer command, software must set the CmdIOC >>> bit (field 8) so that an Endpoint Command Complete event is generated >>> after the transfer ends. This is necessary to synchronize

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> This is what the v3.10 databook says >>> >>> "When issuing an End Transfer command, software must set the CmdIOC >>> bit (field 8) so that an Endpoint Command Complete event is generated >>> after the transfer ends. This is necessary to synchronize the >>>

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> When we set up the DWC3_DEPCMD_ENDTRANSFER command in >>> dwc3_stop_active_transfer(), we can do not set DWC3_DEPCMD_CMDIOC, >>> then there will no endpoint command complete interrupts I think. >>> >>> cmd |= DWC3_DEPCMD_CMDIOC; >> >> I remember

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-09 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> When we set up the DWC3_DEPCMD_ENDTRANSFER command in >>> dwc3_stop_active_transfer(), we can do not set DWC3_DEPCMD_CMDIOC, >>> then there will no endpoint command complete interrupts I think. >>> >>> cmd |= DWC3_DEPCMD_CMDIOC; >> >> I remember some part of

Re: [PATCH] usb: dwc2: Print error if unable to set DMA coherent mask

2018-03-09 Thread Felipe Balbi
Stefan Wahren writes: >> Stefan Wahren hat am 12. Februar 2018 um 21:20 >> geschrieben: >> >> >> We better print an error in case probing of dwc2 fails on >> setting the DMA coherent mask. >> >> Signed-off-by: Stefan Wahren

Re: [PATCH] usb: dwc2: Print error if unable to set DMA coherent mask

2018-03-09 Thread Felipe Balbi
Stefan Wahren writes: >> Stefan Wahren hat am 12. Februar 2018 um 21:20 >> geschrieben: >> >> >> We better print an error in case probing of dwc2 fails on >> setting the DMA coherent mask. >> >> Signed-off-by: Stefan Wahren >> --- >> drivers/usb/dwc2/platform.c | 4 +++- >> 1 file

Re: [PATCH 2/4] usb: dwc3: add dwc3 glue layer for UniPhier SoCs

2018-03-09 Thread Felipe Balbi
Hi, Masahiro Yamada writes: > +static void dwc3u_reset_init(struct dwc3u_priv *priv) > +{ > + dwc3u_maskwrite(priv, RESET_CTL, LINK_RESET, 0); > + usleep_range(1000, 2000); > + dwc3u_maskwrite(priv, RESET_CTL, LINK_RESET, LINK_RESET);

Re: [PATCH 2/4] usb: dwc3: add dwc3 glue layer for UniPhier SoCs

2018-03-09 Thread Felipe Balbi
Hi, Masahiro Yamada writes: > +static void dwc3u_reset_init(struct dwc3u_priv *priv) > +{ > + dwc3u_maskwrite(priv, RESET_CTL, LINK_RESET, 0); > + usleep_range(1000, 2000); > + dwc3u_maskwrite(priv, RESET_CTL, LINK_RESET, LINK_RESET); > +} > + >

Re: [PATCH] usb: dwc3: core: power on PHYs before initializing core

2018-03-09 Thread Felipe Balbi
Hi, Roger Quadros <rog...@ti.com> writes: > Hi, > > On 08/03/18 18:49, Brian Norris wrote: >> Hi, >> >> On Thu, Mar 08, 2018 at 12:43:40PM +0200, Felipe Balbi wrote: >>> William Wu <william...@rock-chips.com> writes: >>>>

Re: [PATCH] usb: dwc3: core: power on PHYs before initializing core

2018-03-09 Thread Felipe Balbi
Hi, Roger Quadros writes: > Hi, > > On 08/03/18 18:49, Brian Norris wrote: >> Hi, >> >> On Thu, Mar 08, 2018 at 12:43:40PM +0200, Felipe Balbi wrote: >>> William Wu writes: >>>> The dwc3_core_init() gets the PHYs and initializes the PHYs with

Re: [PATCH v2 2/2] usb: dwc3: add dual role support using OTG block

2018-03-08 Thread Felipe Balbi
Hi, Roger Quadros <rog...@ti.com> writes: > Felipe, > > On 08/03/18 12:39, Felipe Balbi wrote: >> Roger Quadros <rog...@ti.com> writes: >> >>> This is useful on platforms (e.g. TI AM437x) that don't >>> have ID available on a GPIO but do hav

Re: [PATCH v2 2/2] usb: dwc3: add dual role support using OTG block

2018-03-08 Thread Felipe Balbi
Hi, Roger Quadros writes: > Felipe, > > On 08/03/18 12:39, Felipe Balbi wrote: >> Roger Quadros writes: >> >>> This is useful on platforms (e.g. TI AM437x) that don't >>> have ID available on a GPIO but do have the OTG block. >>> >>

Re: [PATCH] usb: dwc3: core: power on PHYs before initializing core

2018-03-08 Thread Felipe Balbi
Hi Roger, William Wu writes: > The dwc3_core_init() gets the PHYs and initializes the PHYs with > the usb_phy_init() and phy_init() functions before initializing > core, and power on the PHYs after core initialization is done. > > However, some platforms (e.g.

Re: [PATCH] usb: dwc3: core: power on PHYs before initializing core

2018-03-08 Thread Felipe Balbi
Hi Roger, William Wu writes: > The dwc3_core_init() gets the PHYs and initializes the PHYs with > the usb_phy_init() and phy_init() functions before initializing > core, and power on the PHYs after core initialization is done. > > However, some platforms (e.g. Rockchip RK3399 DWC3 with Type-C >

Re: [PATCH v2 2/2] usb: dwc3: add dual role support using OTG block

2018-03-08 Thread Felipe Balbi
Roger Quadros writes: > This is useful on platforms (e.g. TI AM437x) that don't > have ID available on a GPIO but do have the OTG block. > > We can obtain the ID state via the OTG block and use it > for dual-role switching. > > Signed-off-by: Roger Quadros patch

Re: [PATCH v2 2/2] usb: dwc3: add dual role support using OTG block

2018-03-08 Thread Felipe Balbi
Roger Quadros writes: > This is useful on platforms (e.g. TI AM437x) that don't > have ID available on a GPIO but do have the OTG block. > > We can obtain the ID state via the OTG block and use it > for dual-role switching. > > Signed-off-by: Roger Quadros patch one applied fine to

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-05 Thread Felipe Balbi
Hi, Baolin Wang writes: > void dwc3_gadget_exit(struct dwc3 *dwc) > { > + int epnum; > + unsigned long flags; > + > + spin_lock_irqsave(>lock, flags); > + for (epnum = 2; epnum < DWC3_ENDPOINTS_NUM; epnum++) {

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-05 Thread Felipe Balbi
Hi, Baolin Wang writes: > void dwc3_gadget_exit(struct dwc3 *dwc) > { > + int epnum; > + unsigned long flags; > + > + spin_lock_irqsave(>lock, flags); > + for (epnum = 2; epnum < DWC3_ENDPOINTS_NUM; epnum++) { > +

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-05 Thread Felipe Balbi
Hi, Roger Quadros <rog...@ti.com> writes: > On 05/03/18 13:06, Felipe Balbi wrote: >> >> Hi, >> >> Baolin Wang <baolin.w...@linaro.org> writes: >>>>> Roger Quadros <rog...@ti.com> writes: >>>>>>> Roger Quadro

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-05 Thread Felipe Balbi
Hi, Roger Quadros writes: > On 05/03/18 13:06, Felipe Balbi wrote: >> >> Hi, >> >> Baolin Wang writes: >>>>> Roger Quadros writes: >>>>>>> Roger Quadros writes: >>>>>>>> In the following test we get

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-05 Thread Felipe Balbi
Hi, Baolin Wang writes: >>> Roger Quadros writes: > Roger Quadros writes: >> In the following test we get stuck by sleeping forever in >> _dwc3_set_mode() >> after which dual-role switching doesn't work. >> >> On

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-05 Thread Felipe Balbi
Hi, Baolin Wang writes: >>> Roger Quadros writes: > Roger Quadros writes: >> In the following test we get stuck by sleeping forever in >> _dwc3_set_mode() >> after which dual-role switching doesn't work. >> >> On dra7-evm's dual-role port, >> - Load g_zero gadget

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-05 Thread Felipe Balbi
Hi, Roger Quadros writes: >> Roger Quadros writes: >>> In the following test we get stuck by sleeping forever in _dwc3_set_mode() >>> after which dual-role switching doesn't work. >>> >>> On dra7-evm's dual-role port, >>> - Load g_zero gadget driver and enumerate

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-05 Thread Felipe Balbi
Hi, Roger Quadros writes: >> Roger Quadros writes: >>> In the following test we get stuck by sleeping forever in _dwc3_set_mode() >>> after which dual-role switching doesn't work. >>> >>> On dra7-evm's dual-role port, >>> - Load g_zero gadget driver and enumerate to host >>> - suspend to mem

Re: HRTimer causing rtctest to fail

2018-02-28 Thread Felipe Balbi
Hi, Thomas Gleixner <t...@linutronix.de> writes: > On Wed, 28 Feb 2018, Felipe Balbi wrote: >> Thomas Gleixner <t...@linutronix.de> writes: >> > All numbers in micro seconds! What happens if you load the system or >> > restrict C-States? >> >>

Re: HRTimer causing rtctest to fail

2018-02-28 Thread Felipe Balbi
Hi, Thomas Gleixner writes: > On Wed, 28 Feb 2018, Felipe Balbi wrote: >> Thomas Gleixner writes: >> > All numbers in micro seconds! What happens if you load the system or >> > restrict C-States? >> >> added intel_idle.max_cstate=0 to cmdline. Still

Re: HRTimer causing rtctest to fail

2018-02-28 Thread Felipe Balbi
Thomas Gleixner <t...@linutronix.de> writes: > On Wed, 28 Feb 2018, Felipe Balbi wrote: >> Thomas Gleixner <t...@linutronix.de> writes: >> > Enable the hrtimer and scheduling tracepoints. That should give you a hint >> > what's going on. >> >> T

Re: HRTimer causing rtctest to fail

2018-02-28 Thread Felipe Balbi
Thomas Gleixner writes: > On Wed, 28 Feb 2018, Felipe Balbi wrote: >> Thomas Gleixner writes: >> > Enable the hrtimer and scheduling tracepoints. That should give you a hint >> > what's going on. >> >> Thanks, that does give me a lot more information.

Re: HRTimer causing rtctest to fail

2018-02-28 Thread Felipe Balbi
Hi, Thomas Gleixner <t...@linutronix.de> writes: > On Tue, 27 Feb 2018, Felipe Balbi wrote: >> I'm facing an odd problem with v4.16-rc2 (also reproducible on v4.15 >> final) where rtctest fails sometimes which PIE coming too late with >> frequencies >= 1024 Hz.

Re: HRTimer causing rtctest to fail

2018-02-28 Thread Felipe Balbi
Hi, Thomas Gleixner writes: > On Tue, 27 Feb 2018, Felipe Balbi wrote: >> I'm facing an odd problem with v4.16-rc2 (also reproducible on v4.15 >> final) where rtctest fails sometimes which PIE coming too late with >> frequencies >= 1024 Hz. >> >&

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-02-27 Thread Felipe Balbi
Hi, Roger Quadros writes: > In the following test we get stuck by sleeping forever in _dwc3_set_mode() > after which dual-role switching doesn't work. > > On dra7-evm's dual-role port, > - Load g_zero gadget driver and enumerate to host > - suspend to mem > - disconnect USB cable

Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-02-27 Thread Felipe Balbi
Hi, Roger Quadros writes: > In the following test we get stuck by sleeping forever in _dwc3_set_mode() > after which dual-role switching doesn't work. > > On dra7-evm's dual-role port, > - Load g_zero gadget driver and enumerate to host > - suspend to mem > - disconnect USB cable to host and

HRTimer causing rtctest to fail

2018-02-27 Thread Felipe Balbi
Hi folks, I'm facing an odd problem with v4.16-rc2 (also reproducible on v4.15 final) where rtctest fails sometimes which PIE coming too late with frequencies >= 1024 Hz. I've modified rtctest.c a bit so that it continues running even after first failure just so I could get a glimpse of how

HRTimer causing rtctest to fail

2018-02-27 Thread Felipe Balbi
Hi folks, I'm facing an odd problem with v4.16-rc2 (also reproducible on v4.15 final) where rtctest fails sometimes which PIE coming too late with frequencies >= 1024 Hz. I've modified rtctest.c a bit so that it continues running even after first failure just so I could get a glimpse of how

Re: [PATCH v2] usb: host: ehci-platform: add support for optional external vbus supply

2018-02-20 Thread Felipe Balbi
Hi, Amelie Delaunay writes: > On some boards, especially when vbus supply requires large current, > and the charge pump on the PHY isn't enough, an external vbus power switch > may be used. > Add support for this optional external vbus supply in ehci-platform. > >

Re: [PATCH v2] usb: host: ehci-platform: add support for optional external vbus supply

2018-02-20 Thread Felipe Balbi
Hi, Amelie Delaunay writes: > On some boards, especially when vbus supply requires large current, > and the charge pump on the PHY isn't enough, an external vbus power switch > may be used. > Add support for this optional external vbus supply in ehci-platform. > > Signed-off-by: Amelie Delaunay

Re: [PATCH v2] usb: core: introduce per-port over-current counters

2018-02-20 Thread Felipe Balbi
Hi, Richard Leitner writes: > From: Richard Leitner > > For some userspace applications information on the number of > over-current conditions at specific USB hub ports is relevant. > > In our case we have a series of USB hardware (using the cp210x

Re: [PATCH v2] usb: core: introduce per-port over-current counters

2018-02-20 Thread Felipe Balbi
Hi, Richard Leitner writes: > From: Richard Leitner > > For some userspace applications information on the number of > over-current conditions at specific USB hub ports is relevant. > > In our case we have a series of USB hardware (using the cp210x driver) > which communicates using a

Re: [PATCH] usb: core: introduce per-port over-current counters

2018-02-19 Thread Felipe Balbi
Hi, Richard Leitner writes: > From: Richard Leitner > > For some userspace applications information on the number of > over-current conditions at specific USB hub ports is relevant. Therefore > introduce a oc_counter in the usb port struct which

Re: [PATCH] usb: core: introduce per-port over-current counters

2018-02-19 Thread Felipe Balbi
Hi, Richard Leitner writes: > From: Richard Leitner > > For some userspace applications information on the number of > over-current conditions at specific USB hub ports is relevant. Therefore > introduce a oc_counter in the usb port struct which is exported via > sysfs. relevant how? What

Re: [PATCH/RFC 6/6] Treewide: Remove depends on HAS_DMA in case of platform dependency

2018-02-15 Thread Felipe Balbi
ncy on HAS_DMA, as they are selected from > SND_SOC_APQ8016_SBC. > > Signed-off-by: Geert Uytterhoeven <ge...@linux-m68k.org> for drivers/usb/gadget/: Acked-by: Felipe Balbi <felipe.ba...@linux.intel.com> -- balbi signature.asc Description: PGP signature

Re: [PATCH/RFC 6/6] Treewide: Remove depends on HAS_DMA in case of platform dependency

2018-02-15 Thread Felipe Balbi
cted from > SND_SOC_APQ8016_SBC. > > Signed-off-by: Geert Uytterhoeven for drivers/usb/gadget/: Acked-by: Felipe Balbi -- balbi signature.asc Description: PGP signature

Re: [PATCH/RFC 3/6] usb: gadget: Add NO_DMA dummies for DMA mapping API

2018-02-15 Thread Felipe Balbi
-by: Geert Uytterhoeven <ge...@linux-m68k.org> Should I take this or is it going with the rest of the series? If you wanna take it through Trivial or something like that: Acked-by: Felipe Balbi <felipe.ba...@linux.intel.com> -- balbi signature.asc Description: PGP signature

<    1   2   3   4   5   6   7   8   9   10   >