[GIT PULL] USB for v4.20 merge window

2018-10-05 Thread Felipe Balbi
o (1): usb: gadget: udc: renesas_usb3: Add r8a774a1 support Faisal Mehmood (1): usb: dwc3: Fix spelling of 'optimizations' Felipe Balbi (1): Merge tag 'uvcg-20180925' of git://linuxtv.org/pinchartl/media into testing/next Grigor Tovmasyan (9): usb: dwc

RE: [PATCH 1/2] dt-bindings: usb: renesas_usb3: add bindings for r8a77990

2018-10-02 Thread Felipe Balbi
Hi, Yoshihiro Shimoda writes: > Hi Felipe-san, > >> From: Felipe Balbi, Sent: Tuesday, October 2, 2018 9:18 PM >> >> Yoshihiro Shimoda writes: >> >> > This patch adds bindings for r8a77990 (R-Car E3). >> > >> > Signed-off-by: Y

RE: [PATCH 1/2] dt-bindings: usb: renesas_usb3: add bindings for r8a77990

2018-10-02 Thread Felipe Balbi
Hi, Yoshihiro Shimoda writes: > Hi Felipe-san, > >> From: Felipe Balbi, Sent: Tuesday, October 2, 2018 9:18 PM >> >> Yoshihiro Shimoda writes: >> >> > This patch adds bindings for r8a77990 (R-Car E3). >> > >> > Signed-off-by: Y

Re: [PATCH 1/2] dt-bindings: usb: renesas_usb3: add bindings for r8a77990

2018-10-02 Thread Felipe Balbi
Yoshihiro Shimoda writes: > This patch adds bindings for r8a77990 (R-Car E3). > > Signed-off-by: Yoshihiro Shimoda > --- > Documentation/devicetree/bindings/usb/renesas_usb3.txt | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/devicetree/bindings/usb/renesas_usb3.txt > b/

Re: [PATCH 1/2] dt-bindings: usb: renesas_usb3: add bindings for r8a77990

2018-10-02 Thread Felipe Balbi
Yoshihiro Shimoda writes: > This patch adds bindings for r8a77990 (R-Car E3). > > Signed-off-by: Yoshihiro Shimoda > --- > Documentation/devicetree/bindings/usb/renesas_usb3.txt | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/devicetree/bindings/usb/renesas_usb3.txt > b/

Re: HID gadget driver supports get/set features ?

2018-10-02 Thread Felipe Balbi
Ranran writes: > Hello, > > From my reading about HID gadget driver (hidg), it seems that it > support input reports, but not get/set features. > This is my understanding from the documentation: > https://www.kernel.org/doc/Documentation/usb/gadget_hid.txt > > Is that correct ? you might wanna r

Re: UVC gadget changes for v4.20

2018-10-02 Thread Felipe Balbi
Hi, Laurent Pinchart writes: > On Tuesday, 2 October 2018 10:26:25 EEST Felipe Balbi wrote: >> Laurent Pinchart writes: >> > Hi Felipe, >> > >> > (CC'ing Greg, in case you're on vacation) >> > >> > Ping ? I'd really like

Re: [PATCH 0/2] USB: gadget core: Call ->disconnect() from usb_gadget_disconnect()

2018-10-02 Thread Felipe Balbi
Hi, Alan Stern writes: > Felipe: > > The following patches concern ->disconnect() callbacks made when a > gadget's D+ pullup is turned off. Currently we don't have a fixed rule > for such callbacks. > > The first patch makes usb_gadget_disconnect() issue the callback > automatically, so that

Re: [PATCH v6 3/4] arm64: dts: dwc3: description of incr burst type

2018-10-02 Thread Felipe Balbi
Hi, linux-usb-ow...@vger.kernel.org writes: > On Tue, Jul 24, 2018 at 6:23 PM Rob Herring wrote: >> >> On Mon, Jul 23, 2018 at 06:32:38PM +0800, Pengbo Mu wrote: >> > Add description of 'snps,incr-burst-type-adjustment' to binding >> > so that configuring devicetree. >> > >> > Signed-off-by: Ra

Re: [PATCH] usb: dwc2: disable power_down on rockchip devices

2018-10-02 Thread Felipe Balbi
Hi, Hal Emmerich writes: > From 04fbf78e4e569bf872f1ffcb0a6f9b89569dc913 Mon Sep 17 00:00:00 2001 > From: Hal Emmerich > Date: Thu, 19 Jul 2018 21:48:08 -0500 > Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices > >  The bug would let the usb controller enter partial power down

Re: UVC gadget changes for v4.20

2018-10-02 Thread Felipe Balbi
Hi, Laurent Pinchart writes: > Hi Felipe, > > (CC'ing Greg, in case you're on vacation) > > Ping ? I'd really like to get this merged in v4.20. Do you think that would > be > possible ? applying patches today. Are you merging this elsewhere or can I take it as patches? -- balbi signatur

Re: [PATCH 4/5] usb: host: Add XHCI driver for Broadcom STB SoCs

2018-09-26 Thread Felipe Balbi
Hi, Al Cooper writes: > This driver enables USB XHCI on Broadcom ARM STB SoCs. > The drivers depend on a matching "brcm,brcmstb-usb-phy" > Broadcom STB USB Phy driver. > > The standard platform driver can't be used because of differences > in PHY and Clock handling. The standard PHY handling i

Re: Embedded USB Debug

2018-09-20 Thread Felipe Balbi
Hi, Muni Sekhar writes: > Hi All, > > Can someone clarify me on the Embedded USB Debug(EUD): > > What is Embedded USB Debug(EUD)? A quick google search returned this: https://patents.google.com/patent/US20160124822 > What Embedded USB Debug(EUD) is going to be used for? JTAG/UART/SWD/etc ac

Re: [PATCH v2 03/17] compat_ioctl: use correct compat_ptr() translation in drivers

2018-09-13 Thread Felipe Balbi
her architectures, compat_ptr() > does not do anything, but using the new generic_compat_ioctl_ptrarg > helper makes it more correct in theory, and simplifies the code. > > Signed-off-by: Arnd Bergmann Acked-by: Felipe Balbi -- balbi signature.asc Description: PGP signature

Re: [PATCH v2 03/17] compat_ioctl: use correct compat_ptr() translation in drivers

2018-09-13 Thread Felipe Balbi
her architectures, compat_ptr() > does not do anything, but using the new generic_compat_ioctl_ptrarg > helper makes it more correct in theory, and simplifies the code. > > Signed-off-by: Arnd Bergmann Acked-by: Felipe Balbi -- balbi signature.asc Description: PGP signature

Re: [PATCH v2 03/17] compat_ioctl: use correct compat_ptr() translation in drivers

2018-09-13 Thread Felipe Balbi
her architectures, compat_ptr() > does not do anything, but using the new generic_compat_ioctl_ptrarg > helper makes it more correct in theory, and simplifies the code. > > Signed-off-by: Arnd Bergmann Acked-by: Felipe Balbi -- balbi signature.asc Description: PGP signature

Re: [PATCH 02/31] usb: usbssp: Added some decoding functions.

2018-09-10 Thread Felipe Balbi
Hi, Greg Kroah-Hartman writes: > On Thu, Jul 19, 2018 at 06:57:35PM +0100, Pawel Laszczak wrote: >> This patch add additional functions that converts some fields to string. >> >> For example function usbssp_trb_comp_code_string take completion >> code value and return string describing complet

Re: [PATCH v1] arm64: dts: dwc3: Add description of 'configure-gfladj'

2018-09-09 Thread Felipe Balbi
Yinbo Zhu writes: > This patch is to add description of 'configure-gfladj' to binding > so that configuring devicetree commit log looks incomplete. -- balbi signature.asc Description: PGP signature

RE: [PATCH V6] roles: Fix USB 3.0 OTG issue on Intel platform

2018-09-07 Thread Felipe Balbi
Hi Greg, "Gopal, Saranya" writes: >> > diff --git a/drivers/usb/roles/intel-xhci-usb-role-switch.c >> b/drivers/usb/roles/intel-xhci-usb-role-switch.c >> > index dad2d19..0d1ea82 100644 >> > --- a/drivers/usb/roles/intel-xhci-usb-role-switch.c >> > +++ b/drivers/usb/roles/intel-xhci-usb-role-swi

[GIT PULL] USB: fixes for v4.19-rc2

2018-09-06 Thread Felipe Balbi
Hi Greg, here's my first pull request for the current -rc cycle. Not much has been going on when it comes to fixes. Hopefully we won't have a lot of late fixes. Let me know if you want anything to be changed. Cheers The following changes since commit 5b394b2ddf0347bef56e50c69a58773c94343ff3:

Re: Nothing in /sys/class/udc

2018-09-04 Thread Felipe Balbi
Hi, Ranran writes: >> Ranran writes: >> > > A fix for my last comment: >> >> > usb device controller should be supported with conga-MA5 (contains >> >> > Intel's appolo lake), so I am still not sure why I find /sys/class/udc >> >> > empty. >> >> > In congatec MA-5 document it is said: >> >> >

Re: Nothing in /sys/class/udc

2018-09-04 Thread Felipe Balbi
hi, Ranran writes: > > A fix for my last comment: >> > usb device controller should be supported with conga-MA5 (contains >> > Intel's appolo lake), so I am still not sure why I find /sys/class/udc >> > empty. >> > In congatec MA-5 document it is said: >> > "The conga-MA5 offers six USB 2.0 int

Re: Nothing in /sys/class/udc

2018-09-04 Thread Felipe Balbi
Hi, Ranran writes: > On Mon, Sep 3, 2018 at 4:50 PM Ranran wrote: >> >> On Mon, Sep 3, 2018 at 4:22 PM Ranran wrote: >> > >> > On Mon, Sep 3, 2018 at 3:40 PM Greg KH wrote: >> > > >> > > On Mon, Sep 03, 2018 at 09:39:14AM +0300, Ranran wrote: >> > > > Hello, >> > > > >> > > > I try to add ga

Re: usb: gadget: f_mass_storage: detect eject

2018-08-28 Thread Felipe Balbi
Hi, Alan Stern writes: >> The only other files I find in sysfs are the ones referring to the >> module being loaded, but those do not change with eject. >> >> What should I look for? > > Somewhere under /sys/devices will be a directory for the system's USB > device controller. Beneath that wi

Re: [PATCH 2/4] usb: dwc3: gadget: check if dep->frame_number is still valid

2018-08-23 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > On 8/20/2018 3:34 AM, Felipe Balbi wrote: >> Gadget driver may take an unbounded amount of time to queue requests >> after XferNotReady. This is important for isochronous endpoints which >> need to be started for a specific (micro-)frame. >

Re: Possible race condition in f_mass_storage gadget during deinitialization. Kernel warning issued

2018-08-20 Thread Felipe Balbi
Hi, Adrian Ambrożewicz writes: > Hello, > > I'm consistently observing kernel warnings related to Mass Storage USB > Gadget de-initialization flow. After investigation I believe that I've > found root cause of these warnings, however I'm unable to estimate the > impact. I would like to put the

[PATCH 1/4] usb: dwc3: gadget: return errors from __dwc3_gadget_start_isoc()

2018-08-20 Thread Felipe Balbi
Sometimes, errors happen when kicking transfers from __dwc3_gadget_start_isoc(). In those cases, we need to pass along the error so gadget driver can make informed decisions. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions

[PATCH 4/4] usb: dwc3: gadget: remove unnecessary dev_info()

2018-08-20 Thread Felipe Balbi
Running out of requests on isochronous endpoints is part of normal operation. We don't really need to know about it every time it happens. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb

[PATCH 3/4] usb: dwc3: trace: log ep commands in hex

2018-08-20 Thread Felipe Balbi
They are much more useful in hexadecimal than in decimal. Moreover, generic commands are already logged in hex. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/trace.h b/drivers/usb/dwc3/trace.h index

[PATCH 2/4] usb: dwc3: gadget: check if dep->frame_number is still valid

2018-08-20 Thread Felipe Balbi
umber that we got from the previous XferNotReady. If it isn't, then we'll increment dep->frame_number to make sure it's ahead of current frame number. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.h | 2 ++ drivers/usb/dwc3/gadget.c | 11 +++ 2 files changed,

Re: Should usb_gadget_disconnect() call driver's ->disconnect?

2018-08-10 Thread Felipe Balbi
Hi, Alan Stern writes: >> >> > The documentation doesn't state whether a gadget driver's >> >> > ->disconnect() callback will be invoked when usb_gadget_disconnect() >> >> > runs. Probably the UDC drivers' behavior has changed over the years. >> >> > >> >> > In any case, it's likely that vari

Re: linux-next build broken for renesas-usb3?

2018-08-09 Thread Felipe Balbi
Hi Yoshihiro, John Garry writes: > Hi all, > > I am finding the following build error on today's next build: >MODPOST 395 modules > ERROR: "usb_of_get_companion_dev" > [drivers/usb/gadget/udc/renesas_usb3.ko] undefined! > make[1]: *** [__modpost] Error 1 > make: *** [modules] Error 2 > > I

Re: Should usb_gadget_disconnect() call driver's ->disconnect?

2018-08-09 Thread Felipe Balbi
Hi, Alan Stern writes: >> Alan Stern writes: >> > Felipe: >> > >> > The documentation doesn't state whether a gadget driver's >> > ->disconnect() callback will be invoked when usb_gadget_disconnect() >> > runs. Probably the UDC drivers' behavior has changed over the years. >> > >> > In any c

Re: Should usb_gadget_disconnect() call driver's ->disconnect?

2018-08-08 Thread Felipe Balbi
Hi, Alan Stern writes: > Felipe: > > The documentation doesn't state whether a gadget driver's > ->disconnect() callback will be invoked when usb_gadget_disconnect() > runs. Probably the UDC drivers' behavior has changed over the years. > > In any case, it's likely that various UDC drivers do

Re: g_mass_storage performance on partition vs. file

2018-08-05 Thread Felipe Balbi
Hi, Martin Hicks writes: > I've run into a huge performance gap between running a g_mass_storage > gadget with the backing file pointing to a raw partition (/dev/mmcblk1) > vs. creating a file on an ext4 filesystem and exporting that. > > With the partition I see write rates around 5MB/s, and wi

Re: [PATCH 2/3] usb: dwc3: gadget: Don't skip updating remaining data

2018-08-03 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > On 8/2/2018 12:46 AM, Felipe Balbi wrote: >> Hi, >> >> Thinh Nguyen writes: >> >> >> >>>> These patches will not fix the issue. >>>> >>> What do you think of this fix? >>> >>>

[PATCH] usb: dwc3: gadget: fix ISOC TRB type on unaligned transfers

2018-08-03 Thread Felipe Balbi
When chaining ISOC TRBs together, only the first ISOC TRB should be of type ISOC_FIRST, all others should be of type ISOC. This patch fixes that. Fixes: c6267a51639b ("usb: dwc3: gadget: align transfers to wMaxPacketSize") Cc: # v4.11+ Signed-off-by: Felipe Balbi --- drivers/usb/dwc

Re: [PATCH 2/3] usb: dwc3: gadget: Don't skip updating remaining data

2018-08-02 Thread Felipe Balbi
Hi, Thinh Nguyen writes: >> These patches will not fix the issue. >> > > What do you think of this fix? > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > index f452ab708ffc..338f7ab8a8b4 100644 > --- a/drivers/usb/dwc3/gadget.c > +++ b/drivers/usb/dwc3/gadget.c > @@ -22

Re: [PATCH 2/3] usb: dwc3: gadget: Don't skip updating remaining data

2018-08-02 Thread Felipe Balbi
Hi, Thinh Nguyen writes: 1. When a TRB receives whose CSP bit is 0 and CHN bit is 1 receives a short packet, the chained TRBs that follow it are not written back (e.g. the BUFSIZ and HWO fields remain the same as the software-prepared value) 2. In the case of a

Re: [PATCH 2/3] usb: dwc3: gadget: Don't skip updating remaining data

2018-08-01 Thread Felipe Balbi
Felipe Balbi writes: > Hi, > > Felipe Balbi writes: > > > >>> This is an issue, but it's not the same one. >>> >>> irq/16-dwc3-5032 [003] d...65.404194: dwc3_complete_trb: >>> ep1out: trb 890522d5 buf b8d6d000

Re: [PATCH 2/3] usb: dwc3: gadget: Don't skip updating remaining data

2018-07-31 Thread Felipe Balbi
Hi, Felipe Balbi writes: >> This is an issue, but it's not the same one. >> >> irq/16-dwc3-5032 [003] d...65.404194: dwc3_complete_trb: >> ep1out: trb 890522d5 buf b8d6d000 size 0 ctrl 3b56446c >> (hlCS:Sc:isoc-first) >&g

Re: [PATCH 2/3] usb: dwc3: gadget: Don't skip updating remaining data

2018-07-31 Thread Felipe Balbi
Hi, First of all, not receiving your mails through the mailing list. Can you check that you're not being blocked for some reason? You may wanna send trace data compressed with gzip or xz. On Wed, Aug 1, 2018 at 2:27 AM Thinh Nguyen wrote: > On 7/30/2018 11:58 PM, Felipe Balbi wrote: &

Re: [PATCH v7] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-07-31 Thread Felipe Balbi
Hi, Laurent Pinchart writes: > Hi Felipe, > > On Thursday, 26 July 2018 13:49:07 EEST Felipe Balbi wrote: >> Laurent Pinchart writes: >> > From: Joel Pepper >> > >> > - Add bFrameIndex as a UVCG_FRAME_ATTR_RO for each frame size. >> > -

Re: [PATCH 2/3] usb: dwc3: gadget: Don't skip updating remaining data

2018-07-30 Thread Felipe Balbi
Thinh Nguyen writes: > Hi Felipe, > > On 7/29/2018 11:08 PM, Felipe Balbi wrote: >> Thinh Nguyen writes: >>> DWC3 must check for the BUFSIZ and update the req->remaining >>> regardless of transfer alignment. Returning early from transfer OUT >>> unal

[GIT PULL] USB changes for v4.19

2018-07-30 Thread Felipe Balbi
Hi Greg, here's my pull request for v4.19. It's not very large this time around with only 37 commits. Patches have been soaking for a while without any reported incidents. Let me know if you want anything to be changed. Cheers The following changes since commit d72e90f33aa4709ebecc5005562f5233

Re: [PATCH 3/3] usb: dwc3: gadget: Return correct actual bytes written

2018-07-29 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > For OUT transfers, the total size (total TRB buffer allocation) must be > a multiple of MaxPacketSize even if software is expecting a fixed > non-multiple of MaxPacketSize transfer from the host. this is the same for dwc3.0 and we already account for that. > (DWC_usb

Re: [PATCH 2/3] usb: dwc3: gadget: Don't skip updating remaining data

2018-07-29 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > DWC3 must check for the BUFSIZ and update the req->remaining > regardless of transfer alignment. Returning early from transfer OUT > unalignment will skip updating the req->remaining. > > Fixes: c6267a51639b ("usb: dwc3: gadget: align transfers to wMaxPacketSize") > Si

Re: [PATCH] usb: dwc3: Set default mode for dwc_usb31

2018-07-27 Thread Felipe Balbi
Hi, Andy Shevchenko writes: > On Fri, Jul 27, 2018 at 2:02 AM, Thinh Nguyen > wrote: >> On 7/26/2018 2:59 PM, Thinh Nguyen wrote: >>> On 7/26/2018 2:32 PM, Andy Shevchenko wrote: On Thu, Jul 26, 2018 at 11:52 PM, Thinh Nguyen wrote: > dwc_usb31 does not support OTG mode. If the

Re: [PATCH v2 3/3] usb: dwc2: Make dwc2_readl/writel functions endianness-agnostic.

2018-07-27 Thread Felipe Balbi
hi, Grigor Tovmasyan writes: >> @@ -395,6 +412,8 @@ static int dwc2_driver_probe(struct platform_device *dev) >> dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n", >> (unsigned long)res->start, hsotg->regs); >> >> +hsotg->needs_byte_swap = dwc2_check_core_endianness(hsotg)

Re: [PATCH v2 3/3] usb: dwc2: Make dwc2_readl/writel functions endianness-agnostic.

2018-07-27 Thread Felipe Balbi
Hi, Gevorg Sahakyan writes: > @@ -1164,12 +1166,21 @@ struct dwc2_hsotg { > /* Normal architectures just use readl/write */ > static inline u32 dwc2_readl(struct dwc2_hsotg *hsotg, u32 offset) > { > - return readl(hsotg->regs + offset); > + u32 val; > + > + val = readl(hsotg

Re: [RFC PATCH] usb: gadget: mass_storage: Add GET_EVENT_STATUS_NOTIFICATION

2018-07-27 Thread Felipe Balbi
Hi, Benjamin Herrenschmidt writes: > On Fri, 2018-07-27 at 09:53 +0300, Felipe Balbi wrote: >> Benjamin Herrenschmidt writes: >> >> > On Fri, 2018-07-27 at 08:38 +1000, Benjamin Herrenschmidt wrote: >> > > On Thu, 2018-07-26 at 14:01 +0

Re: [PATCH v2 3/3] usb: dwc2: Make dwc2_readl/writel functions endianness-agnostic.

2018-07-27 Thread Felipe Balbi
Andy Shevchenko writes: > On Thu, Jul 26, 2018 at 5:01 PM, Gevorg Sahakyan > wrote: >> Declared dwc2_check_core_endianness() function for dynamicly check >> core endianness. >> Added needs_byte_swap flag to hsotg structure, and depending on >> flag swap value inside dwc2_readl/writel functions.

Re: [RFC PATCH] usb: gadget: mass_storage: Add GET_EVENT_STATUS_NOTIFICATION

2018-07-26 Thread Felipe Balbi
Benjamin Herrenschmidt writes: > On Fri, 2018-07-27 at 08:38 +1000, Benjamin Herrenschmidt wrote: >> On Thu, 2018-07-26 at 14:01 +0300, Felipe Balbi wrote: >> > Hi, >> > >> > Benjamin Herrenschmidt writes: >> > > This is just RFC at this stag

Re: [PATCH v2 2/4] usb: dwc2: Modify dwc2_readl/writel functions prototype

2018-07-26 Thread Felipe Balbi
Hi, Grigor Tovmasyan writes: >>> Added hsotg argument to dwc2_readl/writel function prototype, >>> and also instead of address pass offset of register. >>> hsotg will contain flag field for endianness. >>> >>> Also customized dwc2_set_bit and dwc2_clear_bit function for >>> dwc2_readl/writel fun

Re: [PATCH v3 1/2] usb: dwc3: pci: Supply device properties via driver data

2018-07-26 Thread Felipe Balbi
Andy Shevchenko writes: > For now all PCI enumerated dwc3 devices require some properties > to be present. This allows us to unconditionally append them and supply > via driver_data. > > No functional change intended. > > Signed-off-by: Andy Shevchenko both applied, but I removed your macro bel

Re: [PATCH] usb: dwc2: gadget: ISOC's starting flow improvement

2018-07-26 Thread Felipe Balbi
incremented the frame_number is required to read again. Signed-off-by: Artur Petrosyan Signed-off-by: Felipe Balbi -- balbi signature.asc Description: PGP signature

Re: [PATCH v2 3/3] dwc3: Intel Merrifield can be host

2018-07-26 Thread Felipe Balbi
Andy Shevchenko writes: > On Intel Edison board the OTG function is enabled, thus, > USB can switch to the host mode. > > Allow that by changing dr_mode property to "otg" for Intel Merrifield. > > Signed-off-by: Andy Shevchenko this will need rebasing too -- balbi signature.asc Description:

Re: [PATCH v1 2/2] dwc3: Supply device properties via driver data

2018-07-26 Thread Felipe Balbi
Andy Shevchenko writes: > For now all PCI enumerated dwc3 devices require some properties > to be present. This allows us to unconditionally append them and supply > via driver_data. > > No functional change intended. > > Signed-off-by: Andy Shevchenko Doesn't apply. Please rebase on testing/ne

Re: [RFC PATCH] usb: gadget: mass_storage: Add GET_EVENT_STATUS_NOTIFICATION

2018-07-26 Thread Felipe Balbi
Hi, Benjamin Herrenschmidt writes: > This is just RFC at this stage, I was getting annoyed at the > once-per-seconddebug message about unsupported command when using > f_mass_storage as a CDROM,so I quickly hacked that up. > I'm not clearing the events per-se, I'm just sending events based on

Re: [PATCH v3 1/3] usb: dwc3: pci: Add GPIO lookup table on platforms without ACPI GPIO resources

2018-07-26 Thread Felipe Balbi
Hans de Goede writes: > Hi, > > On 10-06-18 16:01, Hans de Goede wrote: >> Bay Trail / BYT SoCs do not have a builtin device-mode phy, instead >> they require an external ULPI phy for device-mode. >> >> Only some BYT devices have an external phy, but even on those devices >> device-mode is not w

Re: [PATCH 6/7] usb: gadget: f_uac2: disable IN/OUT ep if unused

2018-07-26 Thread Felipe Balbi
Eugeniu Rosca writes: > From: Andreas Pape > > Via p_chmask/c_chmask the user can define whether uac2 shall support > playback and/or capture. This has only effect on the created ALSA device, > but not on the USB descriptor. This patch adds playback/capture descriptors > dependent on that parame

Re: [PATCH v7] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-07-26 Thread Felipe Balbi
Laurent Pinchart writes: > From: Joel Pepper > > - Add bFrameIndex as a UVCG_FRAME_ATTR_RO for each frame size. > - Automatically assign ascending bFrameIndex to each frame in a format. > > Before all "bFrameindex" attributes were set to "1" with no way to > configure the gadget otherwise. This

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

2018-07-26 Thread Felipe Balbi
Hi, Jerry Zhang writes: > Hi Felipe, > > I noticed this wasn't queued up for 4.18. Do you think there is > anything I need to do to get this patch set into 4.19? Also, can we at > least add just this patch ('usb: gadget: f_fs: Only return delayed > status when len is 0') to 4.18 as functionfs co

Re: [PATCH] usb: dwc2: gadget: ISOC's starting flow improvement

2018-07-26 Thread Felipe Balbi
Minas Harutyunyan writes: > To start ISOC transfers in handlers dwc2_gadget_handle_nak() and > dwc2_gadget_handle_out_token_ep_disabled() driver reads current frame > number, based on which, set target frame number to start first ISOC > transfer. > > In case if system's high IRQ latency and multi

Re: [PATCH v2 2/4] usb: dwc2: Modify dwc2_readl/writel functions prototype

2018-07-26 Thread Felipe Balbi
Gevorg Sahakyan writes: > Added hsotg argument to dwc2_readl/writel function prototype, > and also instead of address pass offset of register. > hsotg will contain flag field for endianness. > > Also customized dwc2_set_bit and dwc2_clear_bit function for > dwc2_readl/writel functions. > > Signed

Re: Requesting for Guidance | Mohammad Ali

2018-07-24 Thread Felipe Balbi
nd so forth. It's all very well documented. > On Tue, Jul 24, 2018 at 1:19 PM Felipe Balbi > wrote: > >> >> Hi, >> >> Peter Chen writes: >> >> My name is Mohammad Ali. I'm very curious to learn USB DEVICE DRIVER. >> But I Just have kn

RE: Requesting for Guidance | Mohammad Ali

2018-07-24 Thread Felipe Balbi
Hi, Peter Chen writes: >> My name is Mohammad Ali. I'm very curious to learn USB DEVICE DRIVER. But I >> Just have knowledge of >> C-Programming and the Linux operating system very basic knowledge of Device >> driver(theory knowledge) i.e; how to >> insert a module, check the module, writer si

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: P

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

2018-07-18 Thread Felipe Balbi
cause errors 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

[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 24

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 a

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

2018-06-28 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 bel

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

2018-06-28 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 ot

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 U

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 official

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 vide

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 macOS.

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

2018-06-21 Thread Felipe Balbi
tart camera 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 J

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 t

[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 th

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. >> >> omap h

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 (e.g.

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 r

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: 16adc674d0d6

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

2018-06-01 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > Hi, > > On 5/30/2018 11:49 PM, Felipe Balbi wrote: >> Paul Zimmerman writes: >> >>> Hi Felipe, >>> >>> Felipe Balbi writes: >>> >>> < snip > >>> >>>> thinking about thi

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-30 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 resen

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 g_mass_st

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

2018-05-21 Thread Felipe Balbi
ctive) wrongly. After that, > if we do unbind the printer driver, WARN_ON() happens in > printer_func_unbind() because the list entry is not removed. > > So, this patch moves list_add(&req->list, &dev->tx_reqs_active) > calling before usb_ep_queue(). > > Signed-off-b

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

2018-05-21 Thread Felipe Balbi
ctive) wrongly. After that, > if we do unbind the printer driver, WARN_ON() happens in > printer_func_unbind() because the list entry is not removed. > > So, this patch moves list_add(&req->list, &dev->tx_reqs_active) > calling before usb_ep_queue(). > > Signed-off-b

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

2018-05-21 Thread Felipe Balbi
Hi, Yoshihiro Shimoda 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/gadget/function/f_printer.c >> @@ -63

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

2018-05-21 Thread Felipe Balbi
Hi, Yoshihiro Shimoda 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/gadget/function/f_printer.c >> @@ -63

[GIT PULL] USB for v4.18 merge window

2018-05-21 Thread Felipe Balbi
SB_MTU3 usb: 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):

<    3   4   5   6   7   8   9   10   11   12   >