Re: [PATCH] usb: core: add option of only authorizing internal devices

2019-02-22 Thread Greg Kroah-Hartman
On Sat, Feb 16, 2019 at 11:21:51PM -0800, Dmitry Torokhov wrote: > On Chrome OS we want to use USBguard to potentially limit access to USB > devices based on policy. We however to do not want to wait for userspace to > come up before initializing fixed USB devices to not regress our boot > times. >

RE: [PATCH v4 2/2] usb: chipidea: Refactor USB PHY selection and keep a single PHY

2019-02-22 Thread Peter Chen
> > Refactor the code in charge of looking up the USB PHY when no platdata is > provided. Attempt to get a generic USB PHY first, then look for a legacy USB > PHY > through device-tree and finally get any registered PHY with the correct type. > > This way, only a single USB PHY is obtained and

[PATCH] dwc2: gadget: Fix completed transfer size calculation in DDMA

2019-02-22 Thread Minas Harutyunyan
Fix calculation of transfer size on completion in function dwc2_gadget_get_xfersize_ddma(). Added increment of descriptor pointer to move to next descriptor in the loop. Fixes: aa3e8bc81311 ("usb: dwc2: gadget: DDMA transfer start and complete") Signed-off-by: Minas Harutyunyan --- drivers/usb

[PATCH 8/8] usb: typec: fusb302: Add __printf attribute to fusb302_log function

2019-02-22 Thread Hans de Goede
Add __printf attribute to fusb302_log function, so that we get compiler warnings when specifying wrong vararg parameters. Signed-off-by: Hans de Goede --- drivers/usb/typec/tcpm/fusb302.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drive

[PATCH 3/8] usb: typec: fusb302: Fold fusb302_set_cc_pull into tcpm_set_cc

2019-02-22 Thread Hans de Goede
After the recent cleanups, tcpm_set_cc is the only caller of fusb302_set_cc_pull, fold fusb302_set_cc_pull directly into tcpm_set_cc for a nice cleanup. Signed-off-by: Hans de Goede --- drivers/usb/typec/tcpm/fusb302.c | 51 1 file changed, 13 insertions(+), 38 d

[PATCH 5/8] usb: typec: fusb302: Fix fusb302_handle_togdone_src Ra handling

2019-02-22 Thread Hans de Goede
The FUSB302 will stop toggling with a FUSB_REG_STATUS1A_TOGSS_SRC? status, as soon as it sees either Ra or Rd on a CC pin. Before this commit fusb302_handle_togdone_src would assume that the toggle- engine always stopped at the CC pin indicating the polarity, IOW it assumed that it stopped at the

[PATCH 4/8] usb: typec: fusb302: Check vconn is off when we start toggling

2019-02-22 Thread Hans de Goede
The datasheet says the vconn MUST be off when we start toggling. The tcpm.c state-machine is responsible to make sure vconn is off, but lets add a WARN_ON check to catch any cases where vconn is not off for some reason. Signed-off-by: Hans de Goede --- drivers/usb/typec/tcpm/fusb302.c | 2 ++ 1

[PATCH 1/8] usb: typec: fusb302: Make fusb302_set_cc_polarity also set pull ups / downs

2019-02-22 Thread Hans de Goede
The 2 callers of fusb302_set_cc_polarity both call fusb302_set_cc_pull directly before calling fusb302_set_cc_polarity, this is not ideal for 2 reasons: 1) fusb302_set_cc_pull uses the cached polarity when applying pull-ups, which maybe changed immediately afterwards, to fix this set_cc_polarity a

[PATCH 2/8] usb: typec: fusb302: Refactor / simplify tcpm_set_cc()

2019-02-22 Thread Hans de Goede
After commit ea3b4d5523bc ("usb: typec: fusb302: Resolve fixed power role contract setup"), tcpm_set_cc always calls fusb302_set_toggling. Before this refactor tcpm_set_cc does the following: 1) fusb302_set_toggling(TOGGLING_MODE_OFF), this sets both FUSB_REG_MASK_BC_LVL and FUSB_REG_MASK_COMP

[PATCH 6/8] usb: typec: fusb302: 2 small misc. fixes

2019-02-22 Thread Hans de Goede
Fix a copy and paste error in an error message and a spelling error in a comment. Signed-off-by: Hans de Goede --- drivers/usb/typec/tcpm/fusb302.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c index 05

[PATCH 7/8] usb: typec: fusb302: Simplify suspend/resume handling

2019-02-22 Thread Hans de Goede
Remove the DIY code to avoid doing i2c-transfers while our parent i2c-adapter may be suspended. Instead simply disable our irq from our suspend handler and re-enable it on resume. This is a much cleaner way to avoid this problem and mirrors how most i2c drivers handle this. Signed-off-by: Hans de

Bus noise periodically causes ci_hdrc IRQ lockup

2019-02-22 Thread Chandler Griscom
Hello, I am encountering an issue where noise on USB devices is causing the host ci_hdrc driver to stall. The system contains an i.MX6 board (UDOO) connected to a USB touchscreen, SMSC95xx hub, an FTDI device, and a hi-speed camera. Occasionally (after hours or days), or in a noisy environmen

Re: [PATCH v5 1/6] dt-bindings: usb: musb: Add support for MediaTek musb controller

2019-02-22 Thread Rob Herring
On Tue, Feb 19, 2019 at 03:36:30PM +0800, min@mediatek.com wrote: > From: Min Guo > > This adds support for MediaTek musb controller in > host, peripheral and otg mode. > > Signed-off-by: Min Guo > --- > changes in v5: > suggested by Rob: > 1. Modify compatible as > - compatible : should b

[PATCH] usb: typec: pi3usb30532: Keep orientation when setting mux to safe mode

2019-02-22 Thread Hans de Goede
Keep the orientation value when setting the mux to safe mode, this fixes the orientation getting reset when switching alt-modes. Signed-off-by: Hans de Goede --- drivers/usb/typec/mux/pi3usb30532.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/typec/mux/pi3usb

Re: [PATCH] r8152: Fix an error on RTL8153-BD MAC Address Passthrough support

2019-02-22 Thread David Miller
From: David Chen Date: Wed, 20 Feb 2019 13:47:19 +0800 > From: David Chen > > RTL8153-BD is used in Dell DA300 type-C dongle. > Added RTL8153-BD support to activate MAC address pass through on DA300. > Apply correction on previously submitted patch in net.git tree. > > Signed-off-by: David Che

Re: [PATCH v2 1/2] usb: dwc3: Add avoiding vbus glitch happen during xhci reset

2019-02-22 Thread Rob Herring
On Tue, 19 Feb 2019 07:23:14 +, Ran Wang wrote: > When DWC3 is set to host mode by programming register DWC3_GCTL, VBUS > (or its control signal) will turn on immediately on related Root Hub > ports. Then the VBUS will be de-asserted for a little while during xhci > reset (conducted by xhci dri

Re: usb: gadget: net2280: Fix function net2280_dequeue()

2019-02-22 Thread Alan Stern
On Tue, 19 Feb 2019 gu...@kiener-muenchen.de wrote: > Hi Alan, > > My last proposal "udc: net2280: Fix overrun of OUT messages" is still > under investigation. > > During the random stress tests I found a new rare problem: > > When a request must be dequeued with net2280_dequeue() e.g. due > to

Re: [PATCH 1/2] Documentation: usb: dwc3: add power down clock scale property

2019-02-22 Thread Rob Herring
On Tue, Jan 22, 2019 at 10:37:17AM +, Jun Li wrote: > The USB3 suspend_clk input replaces pipe3_rx_pclk as a clock > source to a small part of the USB3 core that operates when the > SS PHY is in its lowest power(P3) state, and therefore does > not provide a clock. The power down scale specifies

Re: [PATCH 1/6] dt-bindings: usb: xhci-tegra: Add Tegra186 support

2019-02-22 Thread Rob Herring
On Fri, 25 Jan 2019 12:30:08 +0100, Thierry Reding wrote: > From: Thierry Reding > > Extend the bindings to cover the set of features found in Tegra186. > > Signed-off-by: Thierry Reding > --- > .../devicetree/bindings/usb/nvidia,tegra124-xusb.txt | 4 > 1 file changed, 4 inserti