Re: BUG report: usb: dwc3: Link TRB triggered an intterupt without IOC being setted

2019-10-23 Thread Felipe Balbi
Hi, (please don't top-post) alex zheng writes: > Hi, all > > We found that this is a known issue of synopsys DWC3 USB controller, > when the PARKMODE_SS of DWC3 is enable, the controller may hang or do > wrong TRB schedule in some heavy load conditions. > > Setting DISABLE_PARKMODE_SS to 1 can

Re: [PATCH 2/2] usb: gadget: composite: Support more than 500mA MaxPower

2019-10-23 Thread Felipe Balbi
Hi, Jack Pham writes: > USB 3.x SuperSpeed peripherals can draw up to 900mA of VBUS power > when in configured state. However, if a configuration wanting to > take advantage of this is added with MaxPower greater than 500 > (currently possible if using a ConfigFS gadget) the composite > driver f

Re: [PATCH] usb: dwc3: Add shutdown to platform_driver

2019-10-22 Thread Felipe Balbi
Hi, (sorry for the long delay) Vicente Bergas writes: > On Tuesday, August 27, 2019 2:16:20 PM CEST, Vicente Bergas wrote: >> On Tuesday, August 27, 2019 1:53:04 PM CEST, Felipe Balbi wrote: >>> Hi, >>> >>> Vicente Bergas writes: >>>> On Sa

Re: [PATCH 1/4] usb: dwc3: gadget: Don't send unintended link state change

2019-10-22 Thread Felipe Balbi
Hi Thinh, Thinh Nguyen writes: > DCTL.ULSTCHNGREQ is a write-only field. When doing a read-modify-write > to DCTL, the driver must make sure that there's no unintended link state > change request from whatever is read from DCTL.ULSTCHNGREQ. Set link > state change to no-action when the driver wr

Re: [PATCH] USB/Gadget: Fix race between gether_disconnect and rx_submit

2019-10-21 Thread Felipe Balbi
Hi, kvaradarajan writes: > From: Kiruthika Varadarajan > > During gadget connection/disconnect several times panic observed. > > [ 64.723260] BUG: unable to handle kernel NULL pointer dereference at > 00f0 > [ 64.732040] IP: [] rx_fill+0x1ed/0x3b0 > [ 64.737984] PGD 6bece067 PUD

Re: how to test g_webcam

2019-10-14 Thread Felipe Balbi
Hi, Roger Quadros writes: >> Hmm, Link Change is disabled by default upstream, unless you're running >> on anything older than 2.50a. I don't remember the version you're using, >> though :-p > > 2.02a Thanks :-) >>> irq/170-dwc3-270 [000] d... 173.408918: dwc3_event: event >>> (000

Re: how to test g_webcam

2019-10-14 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> I'm having a hard time to figure out how to get g_webcam working with >>> the tip of http://git.ideasonboard.org/uvc-gadget.git >>> >>> Platform I'm using is dra7-evm with dwc3 controller. >> >> which arguments are you passing to g_webcam? > > I've tried a couple

Re: how to test g_webcam

2019-10-11 Thread Felipe Balbi
Hi, Roger Quadros writes: > Hi, > > I'm having a hard time to figure out how to get g_webcam working with > the tip of http://git.ideasonboard.org/uvc-gadget.git > > Platform I'm using is dra7-evm with dwc3 controller. which arguments are you passing to g_webcam? > What platform was g_webca

Re: [PATCH V2] usb: gadget: composite: Fix possible double free memory bug

2019-09-30 Thread Felipe Balbi
Hi, Chandana Kishori Chiluveru writes: > composite_dev_cleanup call from the failure of configfs_composite_bind > frees up the cdev->os_desc_req and cdev->req. If the previous calls of > bind and unbind is successful these will carry stale values. > > Consider the below sequence of function call

RE: BUG report: usb: dwc3: Link TRB triggered an intterupt without IOC being setted

2019-09-25 Thread Felipe Balbi
Hi, David Laight writes: > From: Mathias Nyman >> Sent: 25 September 2019 15:48 >> >> On 24.9.2019 17.45, alex zheng wrote: >> > Hi Mathias, > ... >> Logs show your transfer ring has four segments, but hardware fails to >> jump from the last segment back to first) >> >> Last TRB (LINK TRB) of

Re: BUG report: usb: dwc3: Link TRB triggered an intterupt without IOC being setted

2019-09-23 Thread Felipe Balbi
Hi Alex, alex zheng writes: >> > I am a user of dwc3 USB host controller, I found there are some >> > confused behavior of trb event on this controller. >> > When I run a raw USB data transfer(run bulk in&out transfer with >> > libusb) and iperf3(over rndis) at the same time, >> > there are som

Re: BUG report: usb: dwc3: Link TRB triggered an intterupt without IOC being setted

2019-09-22 Thread Felipe Balbi
Hi, (it helps when you Cc correct maintainers ;-) alex zheng writes: > Hi all, > > I am a user of dwc3 USB host controller, I found there are some > confused behavior of trb event on this controller. > When I run a raw USB data transfer(run bulk in&out transfer with > libusb) and iperf3(over

[GIT PULL] USB changes for v5.4 merge window

2019-08-30 Thread Felipe Balbi
dow With only 45 non-merge commits, we have a small merge window from the Gadget perspective. The biggest change here is the addition of the Cadence USB3 DRD Driver. All other changes are small, non-critical fixes or smaller new features like the improvement to BESL handling in dwc3. Signed

Re: [PATCH] usb: dwc3: gadget: Workaround Mirosoft's BESL check

2019-08-28 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > While testing our host system using Microsoft's usb stack against our > gadget for various BESL values, we found an issue with their usb stack > when the recommended baseline BESL value is 0 (125us) or when the deep > BESL is 1 or less. The Windows host will issue a

Re: [PATCH 1/2] usb: gadget: net2280: Move all "ll" registers in one structure

2019-08-28 Thread Felipe Balbi
Hi, Benjamin Herrenschmidt writes: > On Wed, 2019-08-28 at 13:09 +0300, Felipe Balbi wrote: >> Hi, >> >> Benjamin Herrenschmidt writes: >> >> > The split into multiple structures of the "ll" register bank is >> > impractical. It makes

Re: [PATCH 1/2] usb: gadget: net2280: Move all "ll" registers in one structure

2019-08-28 Thread Felipe Balbi
Hi, Benjamin Herrenschmidt writes: > The split into multiple structures of the "ll" register bank is > impractical. It makes it hard to add ll_lfps_timers_2 which is > at offset 0x794, which is outside of the existing "lfps" structure > and would require us to add yet another one. > > Instead, m

RE: [EXT] Re: [PATCH v1] usb: dwc3: remove the call trace of USBx_GFLADJ

2019-08-27 Thread Felipe Balbi
Hi, Ran Wang writes: >> Yinbo Zhu writes: >> >> Yinbo Zhu writes: >> >> >> > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c >> >> >> > index >> >> >> > 98bce85c29d0..a133d8490322 100644 >> >> >> > --- a/drivers/usb/dwc3/core.c >> >> >> > +++ b/drivers/usb/dwc3/core.c >> >> >> >

Re: [PATCH] usb: dwc3: Add shutdown to platform_driver

2019-08-27 Thread Felipe Balbi
Hi, Vicente Bergas writes: > On Saturday, August 17, 2019 7:41:40 PM CEST, Vicente Bergas wrote: >> Otherwise the device keeps writing to memory after kexec and disturbs >> the next kernel. >> >> Signed-off-by: Vicente Bergas >> --- >> drivers/usb/dwc3/dwc3-of-simple.c | 6 ++ >> 1 file ch

Re: NULL pointer issue due to .pullup timeout at dwc3

2019-08-26 Thread Felipe Balbi
Hi, Peter Chen writes: > Hi Balbi, > > When do configfs function add and remove stress test, I find dwc3 > gadget .pullup will timeout if there is a request on the way. Even I what do you mean by "a request on the way"? > enlarge the delay, there is still timeout for .pullup. > > diff --git a

Re: [PATCH v2] USB: phy: fsl-usb: convert platform driver to use dev_groups

2019-08-15 Thread Felipe Balbi
Hi, Greg Kroah-Hartman writes: > Platform drivers now have the option to have the platform core create > and remove any needed sysfs attribute files. So take advantage of that > and do not register "by hand" any sysfs files. > > Cc: Felipe Balbi > Signed-off-by: G

Re: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-14 Thread Felipe Balbi
Hi, Roger Quadros writes: > On 21/07/2019 21:32, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to Linux kernel. >> >> The Cadence USBSS DRD Controller is a highly configurable IP Core which >> can be instantiated as Dual-Role Device (DRD), Peripheral Only and >> H

Re: kexec on rk3399

2019-08-14 Thread Felipe Balbi
Hi, Vicente Bergas writes: > On Wednesday, August 14, 2019 3:12:26 PM CEST, Robin Murphy wrote: >> On 14/08/2019 13:53, Vicente Bergas wrote: >>> On Monday, July 22, 2019 4:31:27 PM CEST, Vicente Bergas wrote: ... >> >> This particular change looks like it's implicitly specific to >> RK3399,

Re: kexec on rk3399

2019-08-14 Thread Felipe Balbi
Hi, Vicente Bergas writes: >> Vicente Bergas writes: >>> On Monday, July 22, 2019 4:31:27 PM CEST, Vicente Bergas wrote: Hi, i have been running linux on rk3399 booted with kexec fine until 5.2 From 5.2 onwards, there are memory corruption issues as reported here: http://lkml.iu

RE: [EXT] Re: [PATCH v1] usb: dwc3: remove the call trace of USBx_GFLADJ

2019-08-14 Thread Felipe Balbi
Hi, Yinbo Zhu writes: >> Yinbo Zhu writes: >> >> > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c >> >> > index >> >> > 98bce85c29d0..a133d8490322 100644 >> >> > --- a/drivers/usb/dwc3/core.c >> >> > +++ b/drivers/usb/dwc3/core.c >> >> > @@ -300,8 +300,7 @@ static void dwc3_fra

Re: kexec on rk3399

2019-08-14 Thread Felipe Balbi
Hi, Vicente Bergas writes: > On Monday, July 22, 2019 4:31:27 PM CEST, Vicente Bergas wrote: >> Hi, i have been running linux on rk3399 booted with kexec fine until 5.2 >> From 5.2 onwards, there are memory corruption issues as reported here: >> http://lkml.iu.edu/hypermail/linux/kernel/1906.2/0

RE: [PATCH] xhci: wait CNR when doing xhci resume

2019-08-13 Thread Felipe Balbi
(no top-posting, please) Hi, Rick Tseng writes: > Hi Mathias, > > Thanks for suggestion. > The reason I do not use xhci_handshake() is we get build fail when > configuring below as module: > USB_XHCI_HCD = m > USB_XHCI_PCI = m > > Fail message as below: > ERROR: "xhci_handshake" [drivers/usb

Re: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Felipe Balbi
Hi, Roger Quadros writes: >> Roger Quadros writes: The sysfs file we expose from the class for the role switches is primarily meant for supporting proprietary protocols that require us to basically override the connector USB data role. The default role should always be sele

Re: [Patch V6 7/8] usb: gadget: Add UDC driver for tegra XUSB device mode controller

2019-08-12 Thread Felipe Balbi
Hi, Chunfeng Yun writes: >> +/* XUSB_DEV registers */ >> +#define SPARAM 0x000 >> +#define SPARAM_ERSTMAX_SHIFT 16 >> +#define SPARAM_ERSTMAX_MASK GENMASK(4, 0) >> +#define DB 0x004 >> +#define DB_TARGET_SHIFT 8 >> +#define DB_TARGET_MASK GENMASK(7, 0) >> +#define DB_STREAMID_SHIFT 16 >> +#

Re: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Felipe Balbi
Hi, Roger Quadros writes: >> The sysfs file we expose from the class for the role switches is >> primarily meant for supporting proprietary protocols that require us >> to basically override the connector USB data role. The default role >> should always be selected in the drivers. > > OK. Let's

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Felipe Balbi
Hi, Pawel Laszczak writes: Yet another thread? Can't you just run this right before giving back the USB request? So, don't do it from IRQ handler, but from giveback path? >>> >>> Do you mean in: >>> if (request->complete) { >>> spin_unlock(&priv_dev->lock); >>>

[GIT PULL] USB fixes for v5.3-rc

2019-08-12 Thread Felipe Balbi
Hi Greg, here's a pull request for some fixes that I collected from linux-usb mailing list. Let me know if you want anything to be changed. Cheers The following changes since commit d45331b00ddb179e291766617259261c112db872: Linux 5.3-rc4 (2019-08-11 13:26:41 -0700) are available in the Git

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Felipe Balbi
Hi, Pawel Laszczak writes: >>Quick question, then: these ISTS registers, are they masked interrupt >>status or raw interrupt status? > > Yes it's masked, but after masking them the new interrupts will not be > reported > In ISTS registers. Form this reason I can mask onl

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Felipe Balbi
Hi, Pawel Laszczak writes: >>> I have such situation in which one interrupt line is shared with ehci and >>> cdns3 driver. >>> In such case this function returns error code. >> >>which function returns error code? > > devm_request_threaded_irq, of course if I set IRQF_SHARED | IRQF_ONESHOT. > A

Re: [PATCH] xhci: wait CNR when doing xhci resume

2019-08-12 Thread Felipe Balbi
Hi, Rick Tseng writes: > +static int xhci_poll_cnr(struct usb_hcd *hcd) > +{ > + struct xhci_hcd *xhci = hcd_to_xhci(hcd); > + void __iomem *reg = &xhci->op_regs->status; > + u32 result; > + int ret; > + > + ret = readl_poll_timeout_atomic(reg, result, > +

RE: [EXT] Re: [PATCH v1] usb: dwc3: remove the call trace of USBx_GFLADJ

2019-08-11 Thread Felipe Balbi
Hi, Yinbo Zhu writes: >> > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index >> > 98bce85c29d0..a133d8490322 100644 >> > --- a/drivers/usb/dwc3/core.c >> > +++ b/drivers/usb/dwc3/core.c >> > @@ -300,8 +300,7 @@ static void dwc3_frame_length_adjustment(struct >> > dwc3 *dwc) >

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-11 Thread Felipe Balbi
Hi, Pawel Laszczak writes: > Hi, > >> >>Pawel Laszczak writes: > +static int cdns3_gadget_start(struct cdns3 *cdns) > +{ > + struct cdns3_device *priv_dev; > + u32 max_speed; > + int ret; > + > + priv_dev = kzalloc(sizeof(*priv_dev), GFP_KERNEL); > + if (!priv_

Re: [PATCH v5 2/6] usb: gadget: u_serial: reimplement console support

2019-08-09 Thread Felipe Balbi
Hi, Michał Mirosław writes: > Rewrite console support to fix a few shortcomings of the old code > preventing its use with multiple ports. This removes some duplicated > code and replaces a custom kthread with simpler workqueue item. > > Only port ttyGS0 gets to be a console for now. > > Signed-

Re: [Patch V6 7/8] usb: gadget: Add UDC driver for tegra XUSB device mode controller

2019-08-09 Thread Felipe Balbi
Hi, Nagarjuna Kristam writes: > This patch adds UDC driver for tegra XUSB 3.0 device mode controller. > XUSB device mode controller supports SS, HS and FS modes > > Based on work by: > Mark Kuo > Hui Fu > Andrew Bresticker > > Signed-off-by: Nagarjuna Kristam > Acked-by: Thierry Redin

Re: [PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver.

2019-08-09 Thread Felipe Balbi
Hi, Roger Quadros writes: >> It allows me for testing some functionality using only single board >> and even with lacking right cable for proper otg detection. >> >> So, removing this can cause that testing some functionality >> will be limited on my boards. >> >> If you rely want to remo

Re: [PATCH] [RFC] usb: gadget: hid: Add "single_ep" option

2019-08-09 Thread Felipe Balbi
Hi, Benjamin Herrenschmidt writes: > On Fri, 2019-08-09 at 11:08 +0300, Felipe Balbi wrote: >> >> that works too. Another option would to introduce two options, >> has_input_report and has_output_report and have them true by default. >> >> Then user ca

Re: [PATCH] [RFC] usb: gadget: hid: Add "single_ep" option

2019-08-09 Thread Felipe Balbi
Hi, Benjamin Herrenschmidt writes: > On Fri, 2019-08-09 at 08:31 +0300, Felipe Balbi wrote: >> Hi, >> >> Benjamin Herrenschmidt writes: >> >> > Some host drivers really do not like keyboards having an OUT >> > endpoint. >> > >> &

Re: [PATCH 03/22] ARM: omap1: move omap15xx local bus handling to usb.c

2019-08-08 Thread Felipe Balbi
) along with > the computation. > > Similar, a portion of the ohci-omap driver is just there for configuring > the memory translation, this too can get moved into usb.c > > Signed-off-by: Arnd Bergmann For all of these patches related to usb: Acked-by: Felipe Balbi Thanks for cleaning this up, Arnd. -- balbi

Re: [PATCH] [RFC] usb: gadget: hid: Add "single_ep" option

2019-08-08 Thread Felipe Balbi
Hi, Benjamin Herrenschmidt writes: > Some host drivers really do not like keyboards having an OUT endpoint. > > For example, most UEFI forked from EDK2 before 2006 (or was it 2008 ?) > have a bug, they'll try to use the *last* interrupt EP in the > descriptor list and just assume it's an IN en

Re: [balbi-usb:testing/next 2/13] drivers/usb/phy/phy-tahvo.c:434:4: error: 'struct device_driver' has no member named 'dev_groups'; did you mean 'groups'?

2019-08-08 Thread Felipe Balbi
nd on something else that's not upstream yet. I'll drop the patches from my queue. Greg,if you'd like to add my ack: Acked-by: Felipe Balbi cheers -- balbi

Re: [PATCH] usb: dwc3: remove generic PHYs forwarding for XHCI device

2019-08-08 Thread Felipe Balbi
Hi, Marek Szyprowski writes: > Commit 08f871a3aca2 ("usb: dwc3: host: convey the PHYs to xhci") added > forwarding of the generic PHYs from DWC3 core to the instantiated XHCI-plat > device. However XHCI(-plat) driver never gained support for generic PHYs, > thus the lookup added by that commit

Re: [PATCH v3] usb: dwc3: gadget: trb_dequeue is not updated properly

2019-08-08 Thread Felipe Balbi
Hi, John Stultz writes: > On Thu, Jul 18, 2019 at 6:12 PM Thinh Nguyen > wrote: >> fei.y...@intel.com wrote: >> > From: Fei Yang >> > >> > If scatter-gather operation is allowed, a large USB request is split into >> > multiple TRBs. These TRBs are chained up by setting DWC3_TRB_CTRL_CHN bit >

Re: [PATCH v6 46/57] usb: Remove dev_err() usage after platform_get_irq()

2019-08-08 Thread Felipe Balbi
sb/gadget/udc/renesas_usb3.c | 4 +--- > drivers/usb/gadget/udc/s3c-hsudc.c| 4 +--- > drivers/usb/gadget/udc/udc-xilinx.c | 4 +--- For dwc2, dwc3, gadget and usb/phy: Acked-by: Felipe Balbi -- balbi signature.asc Description: PGP signature

Re: [PATCH v2 2/2 RESEND] usb: dwc3: remove generic PHY calibrate() calls

2019-08-08 Thread Felipe Balbi
Hi, Marek Szyprowski writes: > On 2019-08-08 11:51, Felipe Balbi wrote: >> Marek Szyprowski writes: >>> Calls to USB2 generic PHY calibrate() method has been moved to HCD core, >>> which now successfully handles generic PHYs and their calibration after >>>

Re: [PATCH v2 2/2 RESEND] usb: dwc3: remove generic PHY calibrate() calls

2019-08-08 Thread Felipe Balbi
Hi, Marek Szyprowski writes: > Calls to USB2 generic PHY calibrate() method has been moved to HCD core, > which now successfully handles generic PHYs and their calibration after > every HCD reset. This fixes all the timing issues related to PHY > calibration done directly from DWC3 driver: inco

RE: [PATCH V2] usb: dwc3: gadget: trb_dequeue is not updated properly

2019-08-07 Thread Felipe Balbi
Hi, "Yang, Fei" writes: >> I need tracepoints to see what's going on, please collect tracepoints. > > See attached. Search for "length 16384/16384" to the USB request using > sg list. And the transfer stalls at a request with "length 512/512". which gadget driver is this btw? Let's look at wha

Re: [PATCH v1] usb: dwc3: remove the call trace of USBx_GFLADJ

2019-08-07 Thread Felipe Balbi
Hi, Yinbo Zhu writes: > layerscape board sometimes reported some usb call trace, that is due to > kernel sent LPM tokerns automatically when it has no pending transfers > and think that the link is idle enough to enter L1, which procedure will > ask usb register has a recovery,then kernel will

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-07 Thread Felipe Balbi
Hi, Pawel Laszczak writes: >>> +static int cdns3_gadget_start(struct cdns3 *cdns) >>> +{ >>> + struct cdns3_device *priv_dev; >>> + u32 max_speed; >>> + int ret; >>> + >>> + priv_dev = kzalloc(sizeof(*priv_dev), GFP_KERNEL); >>> + if (!priv_dev) >>> + return -ENOMEM; >>> + >

Re: [PATCH v9 2/6] usb:gadget Separated decoding functions from dwc3 driver.

2019-08-07 Thread Felipe Balbi
Hi, Roger Quadros writes: +extern const char *usb_decode_ctrl(char *str, size_t size, __u8 bRequestType, + __u8 bRequest, __u16 wValue, __u16 wIndex, + __u16 wLength); + >>> >>> where's the stub when !TRACING? >>

RE: EHSET USB testing

2019-08-07 Thread Felipe Balbi
Hi, Peter Chen writes: >> (Pinging Mathias regarding xHCI support of the USB 2.0 test modes) >> >> On Mon, Aug 05, 2019 at 02:07:23PM +0800, Peter Chen wrote: >> > On Sun, Aug 4, 2019 at 10:45 AM Evan Gates wrote: >> > > >> > > I'm trying to get my device to pass the EHSET tests. I found the

Re: [heads-up] deadlock in configfs_symlink()

2019-08-05 Thread Felipe Balbi
Hi, On Sun, Aug 4, 2019 at 11:48 PM Al Viro wrote: > > On Sun, Aug 04, 2019 at 09:31:43PM +0100, Al Viro wrote: > > > FWIW, the following reproduces the deadlock on mainline: > > > > dd if=/dev/zero of=/tmp/image bs=1M count=20 > > modprobe dummy_hcd > > modprobe configfs > > mount -t configfs no

Re: Titan Ridge xHCI may stop to working after re-plugging the dock

2019-07-19 Thread Felipe Balbi
Hi, Kai Heng Feng writes: >> Oliver Neukum writes: >>> Am Dienstag, den 09.07.2019, 21:10 +0800 schrieb Kai-Heng Feng: Hi Mika and Mathias, I’ve filed a bug [1] which renders docking station unusable. I am not sure it's a bug in PCI, Thunderbolt or xHCI so raise the iss

Re: [PATCH v3] usb: dwc3: gadget: trb_dequeue is not updated properly

2019-07-19 Thread Felipe Balbi
Hi, fei.y...@intel.com writes: > From: Fei Yang > > If scatter-gather operation is allowed, a large USB request is split into > multiple TRBs. These TRBs are chained up by setting DWC3_TRB_CTRL_CHN bit > except the last one which has DWC3_TRB_CTRL_IOC bit set instead. > Since only the last TRB h

RE: [PATCH V2] usb: dwc3: gadget: trb_dequeue is not updated properly

2019-07-19 Thread Felipe Balbi
"Yang, Fei" writes: Hi, >> Can only be true for last TRB >> > | if (event->status & DEPEVT_STATUS_IOC) > | return 1; > > This is the problem. The whole USB request gets only one interrupt > when the last TRB completes, so dwc3_gadget_ep_reclaim_trb_sg() gets > called with event->

Re: Titan Ridge xHCI may stop to working after re-plugging the dock

2019-07-19 Thread Felipe Balbi
Hi, Oliver Neukum writes: > Am Dienstag, den 09.07.2019, 21:10 +0800 schrieb Kai-Heng Feng: >> Hi Mika and Mathias, >> >> I’ve filed a bug [1] which renders docking station unusable. >> >> I am not sure it's a bug in PCI, Thunderbolt or xHCI so raise the issue to >> you both. >> >> [1] http

Re: [PATCH V2] usb: dwc3: gadget: trb_dequeue is not updated properly

2019-07-18 Thread Felipe Balbi
Hi, Let's look at the relevant code: fei.y...@intel.com writes: > From: Fei Yang > > If scatter-gather operation is allowed, a large USB request would be split > into multiple TRBs. These TRBs are chained up by setting DWC3_TRB_CTRL_CHN > bit except the last one which has DWC3_TRB_CTRL_IOC bi

Re: dwc3 Disable Compliance Mode

2019-07-14 Thread Felipe Balbi
Hi, Rob Weber writes: >> I think our best bet is understanding why we're transitioning to >> compliance and preventing that. >> >> One question comes to mind: Does this happen *only* with the ethernet >> gadget? Does it happen with *all* hosts or just a particular host? > > This issue does not

Re: dwc3 Disable Compliance Mode

2019-07-12 Thread Felipe Balbi
Hi, Rob Weber writes: >> > If not, is there some mechanism we could implement to reset the >> > dwc3 when we enter compliance mode? I attempted some sort of mechanism >> > to reset the link state, but it does not seem to help the issue. I've >> > attached my patch and the trace events for my att

Re: dwc3 Disable Compliance Mode

2019-07-11 Thread Felipe Balbi
Hi Rob, Rob Weber writes: > Hi Felipe, > > I hope you are doing well. My team and I are frequently experiencing an > issue with the dwc3 in our CherryTrail SoC where we encounter an LFPS > Polling timeout while our device is being enumerated. > > We configured the dwc3 as an ethernet gadget us

[GIT PULL part2] USB: changes for v5.3 merge window

2019-07-03 Thread Felipe Balbi
ycle. Signed-off-by: Felipe Balbi Colin Ian King (1): usb: gadget: udc: renesas_usb3: remove redundant assignment to ret Felipe Balbi (1): usb: dwc3: pci: add support for TigerLake Devices Hariprasad Kelam (1): U

[PATCH] usb: dwc3: pci: add support for TigerLake Devices

2019-07-03 Thread Felipe Balbi
This patch adds the necessary PCI ID for TGP-LP devices. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/dwc3-pci.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index f9b550081550..5e8e18222f92 100644 --- a/drivers/usb/dwc3

Re: Aspeed vhub configuration

2019-07-02 Thread Felipe Balbi
Hi, Benjamin Herrenschmidt writes: > On Tue, 2019-07-02 at 15:56 +0300, Felipe Balbi wrote: >> We already have an interface for disconnecting from the host >> programatically by disconnecting data pullup. >> >> static ssize_t soft_connect_store(struct device *dev

Re: configfs on dwc3: msc enum failed if three functions defined

2019-07-02 Thread Felipe Balbi
>> > > > the default hardware values it might be deficient as compared to the >> > > > working endpoint that gets assigned in your 2-function config. >> > > >> > > Jack, >> > > >> > > thanks for the pointer, it is indee

Re: Aspeed vhub configuration

2019-07-02 Thread Felipe Balbi
Hi, Benjamin Herrenschmidt writes: > On Tue, 2019-07-02 at 14:24 +0200, Greg KH wrote: >> >> > That leaves me with two approaches, that aren't mutually exclusive, but >> > I'd like to run them past the folks here before I start coding: >> > >> > - The defaults, currently hard coded, could b

[GIT PULL] USB: changes for v5.3 merge window

2019-06-27 Thread Felipe Balbi
Fix core validation in probe, move after clocks are enabled Fei Yang (1): usb: gadget: f_fs: data_len used before properly set Felipe Balbi (1): usb: dwc3: pci: Add Support for Intel Elkhart Lake Devices Guenter Roeck (1): Revert "usb: dwc2: host: Setting qtd to NUL

RE: No carrier lost information with gadget RNDIS/ECM

2019-06-26 Thread Felipe Balbi
Hi, Kai Ruhnau writes: >>> I have activated CONFIG_USB_GADGET_DEBUG_FILES, and the contents of >>> /proc/driver/rndis-000 don't change when I pull the cable: >>> >>> Config Nr. 0 >>> used : y >>> state : RNDIS_DATA_INITIALIZED >>> medium: 0x >>> speed : 425984000 >>> ca

Re: No carrier lost information with gadget RNDIS/ECM

2019-06-26 Thread Felipe Balbi
Hi, Kai Ruhnau writes: > On my i.MX6 SoloX, I have configured one of the OTG ports for a > combined RNDIS/ECM gadget. After boot, I have two network interfaces > (usb0 and usb1) which are managed by systemd-networkd. > > With kernel 4.9.153, systemd-networkd reports an immediate carrier > loss

[GIT PULL] USB: fixes for v5.2-rc5

2019-06-20 Thread Felipe Balbi
A single fix to take into account the PHY width during initialization of dwc2 driver. This change allows deviceTree to pass PHY width if necessary. Signed-off-by: Felipe Balbi Jules Maselbas (1): usb: dwc2: Use generic PHY

[PATCH] usb: dwc3: pci: Add Support for Intel Elkhart Lake Devices

2019-06-20 Thread Felipe Balbi
This patch simply adds a new PCI Device ID Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/dwc3-pci.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 8cced3609e24..f9b550081550 100644 --- a/drivers/usb/dwc3/dwc3-pci.c

Re: [PATCH] usb: gadget: avoid using gadget after freed

2019-06-19 Thread Felipe Balbi
Hi, Lianwei Wang writes: > On Tue, Jun 18, 2019 at 11:21 PM Felipe Balbi wrote: >> >> >> Hi, >> >> Lianwei Wang writes: >> >> Lianwei Wang writes: >> >> > On Mon, Jun 17, 2019 at 5:40 AM Felipe Balbi wrote: >> >>

Re: Pass transfer_buffer to gadget drivers

2019-06-18 Thread Felipe Balbi
Hi, Alan Stern writes: >> Also, does the gadget subsystem guarantee, that we get the complete() >> callback for the DATA stage of the OUT control request before we get a >> setup() callback for the next control request if there's any? > > As I recall, this isn't mentioned in the documentation.

Re: [PATCH] usb: xhci: dbc: get rid of global pointer

2019-06-18 Thread Felipe Balbi
Hi, Johan Hovold writes: >> Johan Hovold writes: >> > On Tue, Jun 11, 2019 at 08:24:16PM +0300, Felipe Balbi wrote: >> >> If we happen to have two XHCI controllers with DbC capability, then >> >> there's no hope this will ever work as the glo

Re: [RFC] Sorting out dwc3 ISOC endpoints once and for all

2019-06-18 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > Would there be any obvious draw-back to going down this route? The thing > is that, as it is, it seems like we will *always* have some corner case > where we can't guarantee that we can even start a transfer since there's > no upper-bound between XferNo

Re: [PATCH] usb: gadget: avoid using gadget after freed

2019-06-18 Thread Felipe Balbi
Hi, Lianwei Wang writes: >> Lianwei Wang writes: >> > On Mon, Jun 17, 2019 at 5:40 AM Felipe Balbi wrote: >> >> >> >> Lianwei Wang writes: >> >> >> >> > The udc and gadget device will be deleted when udc device is &g

[PATCH] usb: gadget: ether: Fix race between gether_disconnect and rx_submit

2019-06-18 Thread Felipe Balbi
adget: split out network core") Cc: Signed-off-by: Kiruthika Varadarajan Signed-off-by: Felipe Balbi --- drivers/usb/gadget/function/u_ether.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_eth

Re: [PATCH v2] usb: dwc2: Use generic PHY width in params setup

2019-06-18 Thread Felipe Balbi
Hi, Marek Szyprowski writes: > Hi All, > > On 2019-05-31 14:44, Minas Harutyunyan wrote: >> On 5/9/2019 1:16 PM, Jules Maselbas wrote: >>> Setting params.phy_utmi_width in dwc2_lowlevel_hw_init() is pointless >>> since >>> it's value will be overwritten by dwc2_init_params(). >>> >>> This chang

Re: [PATCH] usb: gadget: avoid using gadget after freed

2019-06-18 Thread Felipe Balbi
Hi, Lianwei Wang writes: > On Mon, Jun 17, 2019 at 5:40 AM Felipe Balbi wrote: >> >> Lianwei Wang writes: >> >> > The udc and gadget device will be deleted when udc device is >> > disconnected and the related function will be unbind with it. >> &g

Re: [RFC] Sorting out dwc3 ISOC endpoints once and for all

2019-06-18 Thread Felipe Balbi
Hi, Thinh Nguyen writes: >>> >>> static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct >>> dwc3_request *req) >>> >>> >>> Would there be any obvious draw-back to going down this route? The thing >>> is that, as it is, it seems like we will *always* have some corner case >>> where we can

Re: [PATCH] usb: Replace a < b ? a : b construct with min_t(type, a, b) in drivers/usb

2019-06-18 Thread Felipe Balbi
Hi, d...@turingmachine.org writes: > From: Daniel M German > > Use min_t to find the minimum of two values instead of using the ?: operator. > > This change does not alter functionality. It is merely cosmetic intended to > improve the readability of the code. > > Signed-off-by: Daniel M German

Re: [PATCH] usb: gadget: avoid using gadget after freed

2019-06-17 Thread Felipe Balbi
Lianwei Wang writes: > The udc and gadget device will be deleted when udc device is > disconnected and the related function will be unbind with it. > > But if the configfs is not deleted, then the function object > will be kept and the bound status is kept true. > > Then after udc device is conne

Re: DWC3 USB hub issue

2019-06-17 Thread Felipe Balbi
Hi, Manivannan Sadhasivam writes: > Hello, > > I'm trying to upstream Designware USB3 host driver present in the Actions > Semi S900 SoC. It can successfully detect the USB hub but when any of the > USB device got plugged in, it fails with following error: > > [4.365566] usb usb1-port1: conn

Re: [PATCH] usb: xhci: dbc: get rid of global pointer

2019-06-16 Thread Felipe Balbi
Hi, Johan Hovold writes: > On Tue, Jun 11, 2019 at 08:24:16PM +0300, Felipe Balbi wrote: >> If we happen to have two XHCI controllers with DbC capability, then >> there's no hope this will ever work as the global pointer will be >> overwritten by the controller that

Re: [PATCH 4/5] usb: xhci: dbc: Add a dbc raw driver to provide a raw interface on DbC

2019-06-13 Thread Felipe Balbi
Hi, Greg KH writes: >> > > > Who can use this interface in the "real world", is it only >> > > > developers that have access to the special hardware dongle? Or can >> > > > anyone use this on their laptops for getting console access in a way >> > > > that is somehow "better" than the existing i

[PATCH] usb: xhci: dbc: get rid of global pointer

2019-06-11 Thread Felipe Balbi
xhci: Add DbC support in xHCI driver Cc: # v4.16+ Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-dbgcap.c | 4 +-- drivers/usb/host/xhci-dbgcap.h | 3 +- drivers/usb/host/xhci-dbgtty.c | 54 +- 3 files changed, 31 insertions(+), 30 deletions(-) diff --

Re: fsl_udc status?

2019-06-10 Thread Felipe Balbi
Hi, Joakim Tjernlund writes: > On Mon, 2019-06-10 at 10:56 +0300, Felipe Balbi wrote: >> Hi, >> >> Joakim Tjernlund writes: >> > We are trying to get fsl_udc up and running on a T1042 with without >> > success. >> > Seems like this

Re: fsl_udc status?

2019-06-10 Thread Felipe Balbi
Hi, Joakim Tjernlund writes: > We are trying to get fsl_udc up and running on a T1042 with without success. > Seems like this driver is lagging behind the corresponding host driver(mph). > The mph driver has a number of USB errata workarounds while udc has none. > At least erratas A007792 seems

Re: Pass transfer_buffer to gadget drivers

2019-06-07 Thread Felipe Balbi
Hi, Andrey Konovalov writes: >> >> Andrey Konovalov writes: >> >> > I've noticed that when the host performs a control request, >> >> > urb->transfer_buffer/transfer_buffer_length are not passed to the >> >> > gadget drivers via the setup() call, the only thing that is passed is >> >> > the usb

Re: Pass transfer_buffer to gadget drivers

2019-06-07 Thread Felipe Balbi
Hi, Andrey Konovalov writes: >> Andrey Konovalov writes: >> > I've noticed that when the host performs a control request, >> > urb->transfer_buffer/transfer_buffer_length are not passed to the >> > gadget drivers via the setup() call, the only thing that is passed is >> > the usb_ctrlrequest st

Re: Pass transfer_buffer to gadget drivers

2019-06-07 Thread Felipe Balbi
Hi, Andrey Konovalov writes: > I've noticed that when the host performs a control request, > urb->transfer_buffer/transfer_buffer_length are not passed to the > gadget drivers via the setup() call, the only thing that is passed is > the usb_ctrlrequest struct. Is there a way to get the transfer_

[RFC] Sorting out dwc3 ISOC endpoints once and for all

2019-06-07 Thread Felipe Balbi
Hi John, Now that we have dwc3_gadget_start_isoc_quirk() which figures out the correct combination for the top-most 2 bits in the frame number, why don't we just use that to start isochronous transfers and never, again, have Bus Expiry problems? I mean something along the lines of below diff (co

[GIT PULL] USB: fixes for v5.2-rc4

2019-06-06 Thread Felipe Balbi
e acting as host which fixes a regression with USB Cameras. Apart from these, the usual set of minor fixes. Signed-off-by: Felipe Balbi Alexandre Belloni (1): usb: gadget: udc: lpc32xx: allocate descriptor with GFP_ATOMIC A

Re: TODO advice for octeon-usb?

2019-05-20 Thread Felipe Balbi
Hi, Aaro Koskinen writes: > I'm looking for input what should be done next to get > drivers/staging/octeon-usb out of staging. > > Thousands of checkpatch errors/warnings have been fixed (starting point > was ), > also the size of th

Re: [BUG REPORT] usb: dwc3: "failed to enable ep0out" when enabling mass storage mode

2019-05-14 Thread Felipe Balbi
Hi, e...@gnarbox.com writes: > Hi Felipe, > > I'm picking up a bug my coworker Rob touched on in this thread: > https://marc.info/?l=linux-usb&m=155349928622570&w=2 > > We occasionally see the following dmesg when enabling mass storage mode: > > dwc3 dwc3.1.auto: failed to enable ep0out >

[GIT PULL] USB changes for v5.2 merge window

2019-05-03 Thread Felipe Balbi
Hi Greg, here's my pull request for the next merge window. A bit later than usuall this time around, due to internal high-priority tasks. Sorry about that. Let me know if you need anything to be changed. cheers ___ < Busy as a bee > --- \ ^__^ \

Re: [PATCH V2 7/8] usb: gadget: Add UDC driver for tegra XUSB device mode controller

2019-04-25 Thread Felipe Balbi
Nagarjuna Kristam writes: > This patch adds UDC driver for tegra XUSB 3.0 device mode controller. > XUSB device mode controller support SS, HS and FS modes > > Based on work by: > Mark Kuo > Andrew Bresticker > > Signed-off-by: Nagarjuna Kristam > --- > drivers/usb/gadget/udc/Kconfig

Re: [PATCH 1/5] usb: dwc2: Move UTMI_PHY_DATA defines closer

2019-04-25 Thread Felipe Balbi
Jules Maselbas writes: > Makes GHWCFG4_UTMI_PHY_DATA* defines closer to their relative shift and > mask defines to improve readability. > > Signed-off-by: Jules Maselbas Doesn't apply. Please make sure to rebase on testing/next -- balbi signature.asc Description: PGP signature

  1   2   3   4   5   6   7   8   9   10   >