Re: [PATCH] dwc3: Remove wait for wait_end_transfer event.

2018-07-19 Thread Felipe Balbi
Hi, lemag...@gmail.com writes: > From: Pierre Le Magourou > > We can't wait for END_OF_TRANSFER event in dwc3_gadget_ep_dequeue() > because it can be called in an interruption context. > > TRBs are now cleared after the END_OF_TRANSFER completion, in the > interrupt handler. > > Signed-off-by:

Re: [PATCH] usb: gadget: f_fs: Only return delayed status when len is 0

2018-07-18 Thread Felipe Balbi
rs in other setup > requests. > > After the above commit, 0 byte setups work since the gadget > now accepts empty queues to ep0 to clear the delay, but all > other setups hang. > > Fixes: 946ef68ad4e4 ("Let setup() return USB_GADGET_DELAYED_STATUS") > Signed-off-by: Jerry

[GIT PULL] USB fixes for v4.18-rc5

2018-07-17 Thread Felipe Balbi
Hi Greg, after a couple weeks break, here's another pull request for the current rc. I've rebase on top of your usb-linus branch this time to make sure I don't pick any patches you have already picked. Let me know if you want anything to be changed. cheers The following changes since commit

Re: usb: usbtest: TEST 13: set/clear 1 halts is getting failed with super speed

2018-07-13 Thread Felipe Balbi
Hi, Pradeep Das writes: > Hi, > > Posting this query again as I received some mail delivery failure > notification on the previous attempt. > > I am running usbtest test cases and facing following issues: > > Setup: > I am using two custom board running on Linux. One is configured as > host

Re: usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers

2018-06-29 Thread Felipe Balbi
Hi, Alan Stern writes: > On Thu, 21 Jun 2018, Roger Quadros wrote: > >> >> Can we avoid the spin_lock() and the work-queue and call usb_ep_dequeue() >> >> directly from here? >> >>> What is the purpose of the spin_lock()? >> > >> > I agree that the lock doesn't seem to be necessary. But I

Re: 答复: make a confirm for [usb: dwc3: gadget: skip Set/Clear Halt when invalid]

2018-06-29 Thread Felipe Balbi
(no top-posting!!) liangshengjun writes: > Hi balbi, > > It means that the mainline keep checking stall status first before > handle clear-halt request? as usb spec, it's actually okay to send > Clear Halt at any time. But dwc3 core hanging with macOS adb > application, so I think there is

Re: [PATCH v2] arm64: dts: msm8996: Use dwc3-qcom glue driver for USB

2018-06-27 Thread Felipe Balbi
Hi, Pierre LE MAGOUROU writes: >> >> Thanks a lot, >> >> I will test this branch. >> >> >> >> >> > I just tested USB gadget with this branch on the db820c. >> > >> > If I activate a USB composite gadget device with EEM function, I can see >> > the 'usb0' Ethernet interfaces on the device and on

Re: [PATCH v2] arm64: dts: msm8996: Use dwc3-qcom glue driver for USB

2018-06-27 Thread Felipe Balbi
Hi, Pierre LE MAGOUROU writes: >> > I have a branch that's based on 4.17. You can pick that. >> > https://github.com/vivekgautam1/linux/commits/v4.17/db820c >> > >> >> Thanks a lot, >> I will test this branch. >> >> > I just tested USB gadget with this branch on the db820c. > > If I activate a

Re: UDC ep0 desc or no desc

2018-06-25 Thread Felipe Balbi
Hi, Benjamin Herrenschmidt writes: > On Sat, 2018-06-23 at 11:07 -0400, Alan Stern wrote: >> On Sat, 23 Jun 2018, Benjamin Herrenschmidt wrote: >> >> > Hi folks ! >> > >> > I noticed some UDC drivers setup a "desc" pointer for ep0.desc for the >> > driver, some don't. >> > >> > Is it

Re: make a confirm for [usb: dwc3: gadget: skip Set/Clear Halt when invalid]

2018-06-25 Thread Felipe Balbi
Hi, please don't top-post and break your emails at 80 columns liangshengjun writes: > Hi balbi, > > Thanks for reponse. Now I fixed this case without check STALL > status when clear-Halt request. > > BDW, I have meet other case: > > Run dwc3 for uvc function, the uvc video show

Re: make a confirm for [usb: dwc3: gadget: skip Set/Clear Halt when invalid]

2018-06-25 Thread Felipe Balbi
Hi, Alan Stern writes: >> that patch is not 100% correct. You can revert it in your tree. I added >> that because of a problem I found when running adb against macOS. >> >> It's actually okay to send Clear Halt at any time, but for some reason >> dwc3 was hanging when running adb against

Re: make a confirm for [usb: dwc3: gadget: skip Set/Clear Halt when invalid]

2018-06-21 Thread Felipe Balbi
a application , uvc transfer fail. >And I have confirmed v3.18 dwc3 drivers is OK. > > So how to balance for handling clear Halt without first setHalt ?? > > PS: > commit ffb80fc672c3a7b6afd0cefcb1524fb99917b2f3 > Author: Felipe Balbi > Date: Thu Jan 19 13:3

RE: UAC2 gadget not recognized on Windows 10

2018-06-21 Thread Felipe Balbi
Hi, Robert Bielik writes: >> Enabling SOF interrupts will be a big pain :-) Well, enabling the >> interrupt itself is a no-brainer, but it'll cause terrible CPU overload. > > Oh, I see. Hmm... would it be possible to allow upper levels to config > this dynamically ? I.e. for the ALSA subsystem

[GIT PULL] USB fixes for v4.18-rc1

2018-06-20 Thread Felipe Balbi
Hi Greg, here's the first set of fixes for current -rc cycle. Patches have been soaking for a while and I've also tested on some of our platforms from the lab. Let me know if you want anything to be changed. cheers The following changes since commit ce397d215ccd07b8ae3f71db689aedb85d56ab40:

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-20 Thread Felipe Balbi
"Rafael J. Wysocki" writes: > On Wed, Jun 20, 2018 at 11:27 AM, Felipe Balbi wrote: >> >> Hi, >> >> Tony Lindgren writes: >>> * Felipe Balbi [180619 01:23]: >>>> This is a direct consequence of not paying attention to the order of >

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-20 Thread Felipe Balbi
Hi, Tony Lindgren writes: > * Felipe Balbi [180619 01:23]: >> This is a direct consequence of not paying attention to the order of >> things. If driver were to assume that pm_domain->activate() would do the >> right thing for the device -- meaning that probe would run

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-19 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> I suggest merging this fix for 4.18-rc, and then Roger can rework the >>> driver so that it works also on OMAP. >> >> omap has its own glue layer for several reasons. If you're talking about >> Keystone devices, then okay, I understand. But in

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-18 Thread Felipe Balbi
Hi, Roger Quadros writes: > On 18/06/18 12:51, Felipe Balbi wrote: >> >> Hi, >> >> Johan Hovold writes: >>> On Mon, Jun 18, 2018 at 12:33:44PM +0300, Felipe Balbi wrote: >>> >>>> Johan Hovold writes: >>> >&

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-18 Thread Felipe Balbi
Hi, Johan Hovold writes: > On Wed, Jun 13, 2018 at 12:39:18PM +0300, Felipe Balbi wrote: >> Roger Quadros writes: > >> > I'm still trying to get my head around this. >> > >> > in probe() we do >> > { >> >

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-18 Thread Felipe Balbi
Hi, Johan Hovold writes: > On Mon, Jun 18, 2018 at 12:33:44PM +0300, Felipe Balbi wrote: > >> Johan Hovold writes: > >> > I suggest merging this fix for 4.18-rc, and then Roger can rework the >> > driver so that it works also on OMAP. >> >> om

Re: Inquiry for adding PID to Cp2102 driver

2018-06-18 Thread Felipe Balbi
Johan Hovold writes: > On Mon, Jun 18, 2018 at 11:29:51AM +0200, Carlos Barcala Lara wrote: >> Thanks again, Johan. >> >> Should I have a user to do the git-am (if needed in the future)? > > That would only be needed if you ever want to add further device ids. > Then you can create a patch

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-18 Thread Felipe Balbi
Hi, Johan Hovold writes: > On Mon, Jun 18, 2018 at 11:15:41AM +0300, Felipe Balbi wrote: > >> I don't use this glue layer, actually. As long as there are no >> regressions, you can change it to your heart's content. I still it's >> best to start with pm runtime blocked

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-13 Thread Felipe Balbi
Roger Quadros writes: > On 13/06/18 11:05, Felipe Balbi wrote: >> Roger Quadros writes: >> >>> Hi Johan, >>> >>> On 31/05/18 17:45, Johan Hovold wrote: >>>> The clocks have already been explicitly disabled and put as part of >>>

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-13 Thread Felipe Balbi
Roger Quadros writes: > Hi Johan, > > On 31/05/18 17:45, Johan Hovold wrote: >> The clocks have already been explicitly disabled and put as part of >> remove() so the runtime suspend callback must not be run when balancing >> the runtime PM usage count before returning. >> >> Fixes:

Re: [PATCH 16/22] USB: dwc3: no need to check return value of debugfs_create functions

2018-05-31 Thread Felipe Balbi
Hi, Greg Kroah-Hartman writes: > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic should > never do something different based on this. > > Cc: Felipe Balbi > Signed-off-by: Greg Kroah-Hartman

Re: [RFT/PATCH 18/38] usb: dwc3: gadget: check for Missed Isoc from event status

2018-05-31 Thread Felipe Balbi
Hi, Paul Zimmerman writes: > Hi Felipe, > > Felipe Balbi writes: > > < snip > > >> thinking about this a little more. This extra list_empty() check is >> not wrong at all :-) I've amended this series with the 3 patches >> below. I'll resend the s

Re: [RFT/PATCH 00/38] usb: dwc3: gadget: Rework & Refactoring

2018-05-30 Thread Felipe Balbi
Hi, Laurent Pinchart writes: >> I've been working on this series for a while now. I feels like >> after this series the transfer management code is far easier to >> read and understand. >> >> Based on my tests, I have no regressions. Tested

Re: [PATCH v2] usb: gadget: function: printer: avoid wrong list handling in printer_write()

2018-05-21 Thread Felipe Balbi
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com> > Acked-by: Felipe Balbi <felipe.ba...@linux.intel.com> I'm not sure if you're still taking bug fixes for current -rc cycle, but if you are, please take this directly. If you're done with v4.17, please apply this on top of

Re: [PATCH v2] usb: gadget: function: printer: avoid wrong list handling in printer_write()

2018-05-21 Thread Felipe Balbi
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com> > Acked-by: Felipe Balbi <felipe.ba...@linux.intel.com> I'm not sure if you're still taking bug fixes for current -rc cycle, but if you are, please take this directly. If you're done with v4.17, please apply this on top of

RE: [PATCH/RFC] usb: gadget: function: printer: avoid wrong list handling in printer_write()

2018-05-21 Thread Felipe Balbi
Hi, Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com> writes: > Hi, > >> From: Felipe Balbi, Sent: Monday, May 21, 2018 5:05 PM > >> seems like it would be better to just move this like before >> usb_ep_queue(): >> >> modified drivers/usb/gadg

RE: [PATCH/RFC] usb: gadget: function: printer: avoid wrong list handling in printer_write()

2018-05-21 Thread Felipe Balbi
Hi, Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com> writes: > Hi, > >> From: Felipe Balbi, Sent: Monday, May 21, 2018 5:05 PM > >> seems like it would be better to just move this like before >> usb_ep_queue(): >> >> modified drivers/usb/gadg

[GIT PULL] USB for v4.18 merge window

2018-05-21 Thread Felipe Balbi
sb: gadget: composite: fill bcdUSB as 0x0320 for SuperSpeed or higher speeds Dmitry Osipenko (3): usb: phy: tegra: Cleanup error messages usb: tegra: Move utmi-pads reset from ehci-tegra to tegra-phy usb: phy: Add Kconfig entry for Tegra PHY driver Felipe Balbi (43): usb: dwc3: g

RE: [PATCH/RFC] usb: gadget: function: printer: avoid wrong list handling in printer_write()

2018-05-21 Thread Felipe Balbi
Hi, Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com> writes: > Hi, > >> From: Felipe Balbi, Sent: Monday, May 21, 2018 3:57 PM >> >> Hi, >> >> Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com> writes: >> > The usb_ep_que

RE: [PATCH/RFC] usb: gadget: function: printer: avoid wrong list handling in printer_write()

2018-05-21 Thread Felipe Balbi
Hi, Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com> writes: > Hi, > >> From: Felipe Balbi, Sent: Monday, May 21, 2018 3:57 PM >> >> Hi, >> >> Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com> writes: >> > The usb_ep_que

Re: usb: dwc2: gadget: Fix memory leak in dwc2_gadget_init()

2018-05-21 Thread Felipe Balbi
Hi, Grigor Tovmasyan writes: > Hi Felipe, > > Please drop this patch from your next branch. > I will provide another fix based on Marek's suggestion. this time I'll rebase my 'next' branch. Next time, make sure this doesn't happen anymore as I like my 'next' to

Re: [PATCH/RFC] usb: gadget: function: printer: avoid wrong list handling in printer_write()

2018-05-21 Thread Felipe Balbi
Hi, Yoshihiro Shimoda writes: > The usb_ep_queue() in printer_write() is possible to call req->complete(). > In that case, since tx_complete() calls list_add(>list, >tx_reqs), > printer_write() should not call list_add(>list, >tx_reqs_active) > because the

Re: [PATCH/RFC] usb: gadget: function: printer: avoid wrong list handling in printer_write()

2018-05-21 Thread Felipe Balbi
Hi, Yoshihiro Shimoda writes: > The usb_ep_queue() in printer_write() is possible to call req->complete(). > In that case, since tx_complete() calls list_add(>list, >tx_reqs), > printer_write() should not call list_add(>list, >tx_reqs_active) > because the

Re: [PATCH V2 2/4] usb: gadget: configfs: Create control_config group

2018-05-16 Thread Felipe Balbi
Jerry Zhang writes: > Control_config is a group under gadget that acts > as a normal config group, except it does not > appear in cdev->configs. > > Functions that have exactly zero descriptors can > be linked into control_config. These functions > are bound and unbound

Re: [PATCH v2] usb: dwc2: Fix kernel doc's warnings.

2018-05-16 Thread Felipe Balbi
Minas Harutyunyan writes: > Hi Filipe, > > Please pickup this patch to your testing/next. wish I could: checking file drivers/usb/dwc2/core.c checking file drivers/usb/dwc2/core.h Hunk #2 succeeded at 181 with fuzz 1. Hunk #3 FAILED at 380. Hunk #4 succeeded at

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 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 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
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] 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
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] 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 > --- >

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: dwc2 device testing with Service Interval plus LPM

2018-05-15 Thread Felipe Balbi
Hi, Grigor Tovmasyan <grigor.tovmas...@synopsys.com> writes: > On 5/11/2018 2:42 PM, Felipe Balbi wrote: >> >> Hi, >> >> Grigor Tovmasyan <grigor.tovmas...@synopsys.com> writes: >> >>> Hi all, >>> >>> I want to test a

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 <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 1/4] usb: dwc2: Move dwc2_readl/writel functions after hsotg structure

2018-05-15 Thread Felipe Balbi
Gevorg Sahakya writes: > From: Gevorg Sahakyan > > Moved dwc2_readl/writel functions after hsotg declaration for > adding hsotg structure to dwc2_readl/writel function prototypes. > > Signed-off-by: Gevorg Sahakyan >

Re: [PATCH v2 1/1] drivers: usb: Introduce FSL_USB2_PHY_UTMI_DUAL for usb gadget

2018-05-15 Thread Felipe Balbi
Tiago Brusamarello writes: > Introduce FSL_USB2_PHY_UTMI_DUAL in gadget driver for setting > phy in SOCs with utmi dual phy > > Signed-off-by: Nikhil Badola > Tested-by: Tiago Brusamarello this doesn't apply. -- balbi -- To

Re: dwc2 device testing with Service Interval plus LPM

2018-05-11 Thread Felipe Balbi
Hi, Grigor Tovmasyan writes: > Hi all, > > I want to test a new feature of HSOTG core: Service Interval + LPM support in > device mode. > What I need to use from host side to be able generate appropriate ISOC IN > traffic? Audio class, camera class, g_zero

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] 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

[PATCH] usb: dwc3: gadget: init req->{direction,epnum} from alloc_request()

2018-05-07 Thread Felipe Balbi
We dont' need to touch req->direction or req->epnum from ep_queue(). It's enough that we initialize both fields from alloc_request() and just keep them for the entire lifetime of the request. No functional changes. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- driv

Re: [PATCH 02/20] usb: host: xhci: check DYING state earlier

2018-05-02 Thread Felipe Balbi
Hi, Mathias Nyman <mathias.ny...@linux.intel.com> writes: > On 17.04.2018 10:07, Felipe Balbi wrote: >> >> Hi, >> >> Mathias Nyman <mathias.ny...@linux.intel.com> writes: >>> On 16.04.2018 15:29, Felipe Balbi wrote: >>>> Instead o

Re: [GIT PULL] USB fixes for v4.17-rc3

2018-05-02 Thread Felipe Balbi
Hi, Greg Kroah-Hartman <gre...@linuxfoundation.org> writes: > On Fri, Apr 27, 2018 at 11:09:50AM +0300, Felipe Balbi wrote: >> >> Hi Greg, >> >> here's a tiny, 7 fixes only, pull request for the current -rc cycle. Let >> me know if you wan

Re: [PATCH 01/20] usb: host: xhci: rename queue_bulk_tx() to queue_bulk_intr_tx()

2018-04-30 Thread Felipe Balbi
Hi, Felipe Balbi <felipe.ba...@linux.intel.com> writes: > That function is used for both Bulk and Interrupt transfer types, > let's make it clear on the function name and provide one extra helper > for queueing bulk transfers. > > Signed-off-by: Felipe Balbi <feli

Re: DWC3 question

2018-04-30 Thread Felipe Balbi
Hi, Fernando writes: >> which platform is this? Which kernel version? > > This is a custom design based on an LS1046a reference board from NxP > running kernel 4.4.74 with patches from the LEDE/Openwrt project. in that case, you need to ask for support from NxP.

Re: DWC3 question

2018-04-30 Thread Felipe Balbi
Hi, (please, always Cc linux-usb@vger.kernel.org) Fernando writes: > Hi Felipe. > > Sorry to bother you, but your name is all over the place on the DWC3 code > and I was wondering if you could help me with something (I promise there > won't be future emails with

[GIT PULL] USB fixes for v4.17-rc3

2018-04-27 Thread Felipe Balbi
) usb: fixes for v4.17-rc3 Not much this time around: A list_del corruption on dwc3_ep_dequeue(), sparse warning fix also on dwc3, build issues with f_phonet. Apart from these three, some other minor fixes. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.

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 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: [RFT/PATCH 00/38] usb: dwc3: gadget: Rework & Refactoring

2018-04-20 Thread Felipe Balbi
Hi, Bin Liu <b-...@ti.com> writes: >> Felipe Balbi <felipe.ba...@linux.intel.com> writes: >> >>> Bin Liu <b-...@ti.com> writes: >> >>> > On Mon, Apr 09, 2018 at 02:26:14PM +0300, Felipe Balbi wrote: >> >>> >> Hi guys,

Re: [RFT/PATCH 00/38] usb: dwc3: gadget: Rework & Refactoring

2018-04-19 Thread Felipe Balbi
Hi, Bin Liu <b-...@ti.com> writes: >> Felipe Balbi <felipe.ba...@linux.intel.com> writes: >> >>> Bin Liu <b-...@ti.com> writes: >> >>> > On Mon, Apr 09, 2018 at 02:26:14PM +0300, Felipe Balbi wrote: >> >>> >> Hi guys,

Re: [RFT/PATCH 00/38] usb: dwc3: gadget: Rework & Refactoring

2018-04-19 Thread Felipe Balbi
Hi, Felipe Balbi <felipe.ba...@linux.intel.com> writes: >>> Bin Liu <b-...@ti.com> writes: >>> > On Mon, Apr 09, 2018 at 02:26:14PM +0300, Felipe Balbi wrote: >>> >> Hi guys, >>> >> >>> >> I've been working on t

Re: [RFT/PATCH 00/38] usb: dwc3: gadget: Rework & Refactoring

2018-04-19 Thread Felipe Balbi
Hi, Bin Liu <b-...@ti.com> writes: > On Wed, Apr 18, 2018 at 08:20:28AM +0300, Felipe Balbi wrote: >> >> Hi Bin, >> >> Bin Liu <b-...@ti.com> writes: >> > On Mon, Apr 09, 2018 at 02:26:14PM +0300, Felipe Balbi wrote: >> >> Hi guys, &

Re: [RFT/PATCH 00/38] usb: dwc3: gadget: Rework & Refactoring

2018-04-17 Thread Felipe Balbi
Hi Bin, Bin Liu <b-...@ti.com> writes: > On Mon, Apr 09, 2018 at 02:26:14PM +0300, Felipe Balbi wrote: >> Hi guys, >> >> I've been working on this series for a while now. I feels like after >> this series the transfer management code is far easier to read and

Re: [PATCH 02/20] usb: host: xhci: check DYING state earlier

2018-04-17 Thread Felipe Balbi
Hi, Mathias Nyman <mathias.ny...@linux.intel.com> writes: > On 16.04.2018 15:29, Felipe Balbi wrote: >> Instead of allocating urb priv and, maybe, bail out due to xhci being >> in DYING state, we can move the check earlier and avoid the memory >> allocation alto

[PATCH 01/20] usb: host: xhci: rename queue_bulk_tx() to queue_bulk_intr_tx()

2018-04-16 Thread Felipe Balbi
That function is used for both Bulk and Interrupt transfer types, let's make it clear on the function name and provide one extra helper for queueing bulk transfers. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci-ring.c | 23 +-- d

[PATCH 17/20] usb: host: xhci: reorder variable declaration

2018-04-16 Thread Felipe Balbi
no functional changes. Cleanup only Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 4c2bc9d1678e..cd5b6bf4c867

[PATCH 20/20] usb: host: xhci: free priv outside of locked region

2018-04-16 Thread Felipe Balbi
In case we have any errors, we can free_priv with locks released and interrupts enabled. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/

[PATCH 18/20] usb: host: xhci: make ep_state a value, not a reference

2018-04-16 Thread Felipe Balbi
This is now the single use of ep_state inside urb_enqueue(). We don't need it to be a pointer anymore. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xh

[PATCH 19/20] usb: host: xhci: check CLEAR_TOGGLE earlier

2018-04-16 Thread Felipe Balbi
There's not need to delay check for CLEAR_TOGGLE until after we have allocated urbpriv. Let's move it earlier and, finally, remove the free_priv goto label. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci.c | 13 + 1 file changed, 5 inse

[PATCH 05/20] usb: host: xhci: introduce xhci_num_tds_for_urb() helper

2018-04-16 Thread Felipe Balbi
This helper computes the number of TDs for a given urb. Cleanup only, no functional changes. Note that while at that we've replaced an alignment check with the IS_ALIGNED() macro which makes the code slightly clearer about its intention. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.

[PATCH 04/20] usb: host: xhci: check HCD_HW_ACCESSIBLE earlier

2018-04-16 Thread Felipe Balbi
This is the last check that can be done earlier. No functional changes. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c

[PATCH 15/20] usb: host: xhci: rename xhci_queue_isoc_tx_prepare()

2018-04-16 Thread Felipe Balbi
cleanup only, no functional changes. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci-ring.c | 6 +++--- drivers/usb/host/xhci.c | 2 +- drivers/usb/host/xhci.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/us

[PATCH 13/20] usb: host: xhci: extract xhci_maybe_stop_endpoint()

2018-04-16 Thread Felipe Balbi
This new helper is only here to aid readability. It handles the details about only queueing stop endpoint on the first URB cancellation. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci.c | 40 +++- 1 file chang

[PATCH 03/20] usb: host: xhci: check full speed MPS change earlier

2018-04-16 Thread Felipe Balbi
By moving Full Speed max packet size change earlier, the code becomes a little more straight forward to read. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff

[PATCH 16/20] usb: host: xhci: remove unnecessary NULL check

2018-04-16 Thread Felipe Balbi
xhci_urb_free_priv() is a simple wrapper around kfree() and kfree() is safe against NULL pointers. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drive

[PATCH 14/20] usb: host: xhci: extract xhci_cancel_td()

2018-04-16 Thread Felipe Balbi
This little helper is here for readability. It handles the details about how to cancel a TD due to an urb being dequeued. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff

[PATCH 08/20] usb: host: xhci: convert add_timer() to mod_timer() calls

2018-04-16 Thread Felipe Balbi
Instead of initializing t->expires and calling add_timer(t) right after, we can rely on mod_timer(t, expires) to handle the details for us. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci.c | 10 -- 1 file changed, 4 insertions(+), 6

[PATCH 12/20] usb: host: xhci: remove pointless trace message

2018-04-16 Thread Felipe Balbi
That message doesn't bring a lot of extra information. What it prints can be understood from the existing tracepoints. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/d

[PATCH 10/20] usb: host: xhci: check DYING state earlier

2018-04-16 Thread Felipe Balbi
in case where xHCI dies, we can bail out a little earlier. Not really a functional change, just making the code follow a more straight-forward order. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci.c | 14 +++--- 1 file changed, 7 insertions

[PATCH 09/20] usb: host: xhci: reorder variable declarations

2018-04-16 Thread Felipe Balbi
cleanup only, no functional changes Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 64eb50115fac..3b1944

[PATCH 11/20] usb: host: xhci: extract xhci_manually_free_td() helper

2018-04-16 Thread Felipe Balbi
Cleanup only, no functional changes. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci.c | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 6be3eb

[PATCH 02/20] usb: host: xhci: check DYING state earlier

2018-04-16 Thread Felipe Balbi
Instead of allocating urb priv and, maybe, bail out due to xhci being in DYING state, we can move the check earlier and avoid the memory allocation altogether. While at that, also remove an unnecessary empty line. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/us

[PATCH 07/20] usb: host: xhci: use msecs_to_jiffies() instead of HZ

2018-04-16 Thread Felipe Balbi
HZ can change based on CPUFreq. We should use msecs_to_jiffies() instead. Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/host/xhci.c | 3 +-- drivers/usb/host/xhci.h | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/xh

Re: [RFT/PATCH 18/38] usb: dwc3: gadget: check for Missed Isoc from event status

2018-04-13 Thread Felipe Balbi
Hi, Thinh Nguyen writes: >>> Maybe we should return the -EXDEV status every time there's a missed isoc. >> >> you mean like this? > > Yes, this will work. updated to branch -- balbi signature.asc Description: PGP signature

Re: [RFT/PATCH 18/38] usb: dwc3: gadget: check for Missed Isoc from event status

2018-04-12 Thread Felipe Balbi
Hi, Thinh Nguyen <thinh.ngu...@synopsys.com> writes: > Hi, > > On 4/11/2018 1:21 AM, Felipe Balbi wrote: >> >> Hi, >> >> Felipe Balbi <felipe.ba...@linux.intel.com> writes: >>>>> Without XferNotReady, we won't have a reliab

Re: [RFT/PATCH 18/38] usb: dwc3: gadget: check for Missed Isoc from event status

2018-04-11 Thread Felipe Balbi
Hi, Felipe Balbi <felipe.ba...@linux.intel.com> writes: >>> Without XferNotReady, we won't have a reliable way to know the uFrame >>> number. Read the Isochronous programming sequence from your databook. >> >> Right. We need XferNotReady

Re: [RFT/PATCH 18/38] usb: dwc3: gadget: check for Missed Isoc from event status

2018-04-11 Thread Felipe Balbi
Hi, Thinh Nguyen <thinh.ngu...@synopsys.com> writes: >>> On 4/9/2018 4:28 AM, Felipe Balbi wrote: >>>> In case we get an event with status set to Missed Isoc, this means we >>>> have missed an isochronous interval and should issue End Transfer >>>&

Re: [RFT/PATCH 18/38] usb: dwc3: gadget: check for Missed Isoc from event status

2018-04-10 Thread Felipe Balbi
Hi, Thinh Nguyen <thinh.ngu...@synopsys.com> writes: > Hi Felipe, > > On 4/9/2018 4:28 AM, Felipe Balbi wrote: >> In case we get an event with status set to Missed Isoc, this means we >> have missed an isochronous interval and should issue End Transfer >> c

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