Re: [PATCH] usb: gadget: uvc: Missing files for configfs interface

2017-03-31 Thread Petr Cvek
Dne 31.3.2017 v 11:01 Laurent Pinchart napsal(a): > Hi Felipe and Petr, > > On Tuesday 28 Mar 2017 16:48:46 Felipe Balbi wrote: >> Petr Cvek writes: >>> Dne 7.3.2017 v 06:58 Laurent Pinchart napsal(a): On Tuesday 07 Mar 2017 00:57:20 Petr Cvek wrote: > Commit 76e0da34c7ce ("usb-gadget/uv

[PATCH v2] usb: gadget: uvc: Missing files for configfs interface

2017-03-31 Thread Petr Cvek
Commit 76e0da34c7ce ("usb-gadget/uvc: use per-attribute show and store methods") caused a stringification of an undefined macro argument "aname", so three UVC parameters (streaming_interval, streaming_maxpacket and streaming_maxburst) were named "aname". Fix the definition to use "cname", name of

[PATCH] usb: gadget: mv_u3d: fix error handling in mv_u3d_probe()

2017-03-31 Thread Alexey Khoroshilov
There are several inconsistencies in the error handling code. 1. If clk_get() fails, it goes to clk_put(). 2. If pdata->phy_init() fails, it does not disable u3d->clk. 3. In case of failure after stopping u3d, it does pdata->phy_deinit() and clk_disable(u3d->clk) twice. 4. It ignores failures i

Re: [PATCH v6 00/15] Replace PCI pool by DMA pool API

2017-03-31 Thread Romain Perier
ping Le 19/03/2017 à 18:03, Romain Perier a écrit : > The current PCI pool API are simple macro functions direct expanded to > the appropriate dma pool functions. The prototypes are almost the same > and semantically, they are very similar. I propose to use the DMA pool > API directly and get rid

Re: [PATCH 02/22] docs-rst: convert usb docbooks to ReST

2017-03-31 Thread Jonathan Corbet
On Thu, 30 Mar 2017 11:20:14 +0200 Markus Heiser wrote: > @Jon: what do you think about a bulk conversion? I'm a bit leery of it, to tell the truth. We're trying to create a better set of kernel docs, and I'm far from convinced that dumping a bunch of unloved stuff there in a mechanical way wil

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-31 Thread Alan Stern
On Thu, 30 Mar 2017, Oliver Neukum wrote: > Am Donnerstag, den 30.03.2017, 11:55 -0400 schrieb Alan Stern: > > > > I'm pretty sure that usb-storage does not do this, at least, not when > > operating in its normal Bulk-Only-Transport mode.  It never tries to > > read the results of an earlier tr

[PATCH 2/3] usb: dwc3: debugfs: return strings that match tracepoints

2017-03-31 Thread Felipe Balbi
In order to improve usability a tiny bit, we will return strings that match what our tracepoints return. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/debugfs.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c

[PATCH 3/3] usb: dwc3: expose dwc3_trb_type_string()

2017-03-31 Thread Felipe Balbi
That helper can be used from our tracepoint interface with very minor edits. Let's do so. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/debug.h | 28 drivers/usb/dwc3/debugfs.c | 27 ++- drivers/usb/dwc3/trace.h | 31 +--

[PATCH 1/3] usb: dwc3: debugfs: make use of dwc3_gadget_link_string()

2017-03-31 Thread Felipe Balbi
Instead of redecoding link state into a string, use our helper. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/debugfs.c | 47 +- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c in

Re: [PATCHv3] net: usbnet: support 64bit stats in qmi_wwan driver

2017-03-31 Thread Bjørn Mork
On March 31, 2017 3:27:59 PM CEST, Greg Ungerer wrote: >On 31/03/17 18:48, Bjørn Mork wrote: > >>> +void usbnet_get_stats64(struct net_device *net, struct >rtnl_link_stats64 *stats) >>> +{ >>> + struct usbnet *dev = netdev_priv(net); >>> + unsigned int start; >>> + int cpu; >>> + >>> + n

Re: [PATCHv3] net: usbnet: support 64bit stats in qmi_wwan driver

2017-03-31 Thread Greg Ungerer
Hi Oliver, On 31/03/17 19:39, Oliver Neukum wrote: Am Freitag, den 31.03.2017, 10:48 +0200 schrieb Bjørn Mork: You get *all* the "0" line drivers for free, not only "qmi_wwan". No code changes needed, except for adding the single .ndo line to drivers overriding the usbnet default net_device_op

Re: [PATCHv3] net: usbnet: support 64bit stats in qmi_wwan driver

2017-03-31 Thread Greg Ungerer
Hi Bjorn, On 31/03/17 18:48, Bjørn Mork wrote: Greg Ungerer writes: Add support for the net stats64 counters to the usbnet core and then to the qmi_wwan driver. This is a strait forward addition of 64bit counters for RX and TX packets and byte counts. It is done in the same style as for the o

[RESEND PATCH v3 0/7] Platform driver support for 'amd5536udc' driver

2017-03-31 Thread Raviteja Garimella
Resending PATCH v3 after rebasing with testing/next branch in Felipe Balbi's git tree. Resolved few merge conflicts. Tested applying all patches. Patch 1/7 can be ignored since it's already applied. Changes in PATCH v3: === 1. Updated bindings documentation and platform driver to

Re: [PATCH v3 2/7] UDC: Rename amd5536udc driver file based on IP

2017-03-31 Thread Raviteja Garimella
Hi Felipe, On Fri, Mar 31, 2017 at 3:19 PM, Felipe Balbi wrote: > > Hi, > > Raviteja Garimella writes: > >> This patch renames the amd5536udc.c that has the core driver >> functionality of Synopsys UDC to snps_udc_core.c >> >> The symbols exported here can be used by any UDC driver that uses >>

[RESEND PATCH v3 7/7] UDC: Add Synopsys UDC Platform driver

2017-03-31 Thread Raviteja Garimella
This patch adds platform driver support for Synopsys UDC. A new driver file (snps_udc_plat.c) is created for this purpose where the platform driver registration is done based on OF node. Currently, UDC integrated into Broadcom's iProc SoCs (Northstar2 and Cygnus) work with this driver. New membe

[RESEND PATCH v3 5/7] UDC: Use struct dma_pool instead of pci_pool

2017-03-31 Thread Raviteja Garimella
Using dma_pool instead of pci_pool will make snps_udc_core driver to be compatible with non-pci platforms. Signed-off-by: Raviteja Garimella --- drivers/usb/gadget/udc/snps_udc_core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/udc/snps_udc_core

[RESEND PATCH v3 6/7] DT bindings documentation for Broadcom IPROC USB Device controller.

2017-03-31 Thread Raviteja Garimella
The device node is used for UDCs integrated into Broadcom's iProc family of SoCs'. The UDC is based on Synopsys Designware Cores AHB Subsystem USB Device Controller IP. Signed-off-by: Raviteja Garimella --- Documentation/devicetree/bindings/usb/iproc-udc.txt | 21 + 1 file ch

[RESEND PATCH v3 3/7] UDC: make debug prints compatible with both pci and platform devices

2017-03-31 Thread Raviteja Garimella
This patch adds a struct device member to UDC data structure and makes changes to the arguments of dev_err and dev_dbg calls so that the debug prints work for both pci and platform devices. Signed-off-by: Raviteja Garimella --- drivers/usb/gadget/udc/amd5536udc.h | 4 +++- drivers/usb/gadge

[RESEND PATCH v3 4/7] UDC: Provide correct arguments for 'dma_pool_create'

2017-03-31 Thread Raviteja Garimella
Change the argument from NULL to a struct device for the dma_pool_create call during dma init. Signed-off-by: Raviteja Garimella --- drivers/usb/gadget/udc/snps_udc_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/snps_udc_core.c b/drivers/us

Re: [PATCH] usb: dwc3: debugfs: downcase OTG on 'mode' file

2017-03-31 Thread Sergei Shtylyov
Hello. On 03/31/2017 02:12 PM, Felipe Balbi wrote: When writing, we expect the "otg" string. When showing, we return "OTG". Let's downcase that word to avoid confusion. Lowercase, maybe? Signed-off-by: Felipe Balbi [...] MBR, Sergei -- To unsubscribe from this list: send the line "u

Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode

2017-03-31 Thread Felipe Balbi
Hi, Roger Quadros writes: > On 31/03/17 15:00, Felipe Balbi wrote: >> >> Hi, >> >> Roger Quadros writes: >> Your first implementation could be just that. Refactoring what needs to >> be refactored, then patching "mode" debugfs to work properly in that >> case. Only add otg.c/drd.c

Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode

2017-03-31 Thread Roger Quadros
On 31/03/17 15:00, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: > Your first implementation could be just that. Refactoring what needs to > be refactored, then patching "mode" debugfs to work properly in that > case. Only add otg.c/drd.c after "mode" debugfs file is stable

Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode

2017-03-31 Thread Felipe Balbi
Hi, Roger Quadros writes: Your first implementation could be just that. Refactoring what needs to be refactored, then patching "mode" debugfs to work properly in that case. Only add otg.c/drd.c after "mode" debugfs file is stable, because then you know what needs to be taken

Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode

2017-03-31 Thread Roger Quadros
+Mathias On 31/03/17 10:46, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: > Roger Quadros writes: >> dra7 OTG core limits the host controller to USB2.0 (high-speed) mode >> when we're operating in dual-role. > > yeah, that's not a quirk. DRA7 supports OTGv2, not OTG

[PATCH] usb: dwc3: debugfs: downcase OTG on 'mode' file

2017-03-31 Thread Felipe Balbi
When writing, we expect the "otg" string. When showing, we return "OTG". Let's downcase that word to avoid confusion. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debug

Re: [PATCH v3 2/7] UDC: Rename amd5536udc driver file based on IP

2017-03-31 Thread Felipe Balbi
Hi, Raviteja Garimella writes: > This patch renames the amd5536udc.c that has the core driver > functionality of Synopsys UDC to snps_udc_core.c > > The symbols exported here can be used by any UDC driver that uses > the same Synopsys IP. > > Signed-off-by: Raviteja Garimella unfortunately, t

Re: [PATCHv3] net: usbnet: support 64bit stats in qmi_wwan driver

2017-03-31 Thread Oliver Neukum
Am Freitag, den 31.03.2017, 10:48 +0200 schrieb Bjørn Mork: > You get *all* the "0" line drivers for free, not only "qmi_wwan".  No > code changes needed, except for adding the single .ndo line to drivers > overriding the usbnet default net_device_ops. And even that only applies > to a few of them.

Re: [PATCH v3 4/4] cdc-acm: remove unused element of struct acm

2017-03-31 Thread Oliver Neukum
Am Donnerstag, den 30.03.2017, 22:15 +0200 schrieb Tobias Herzog: > write_used was introduced with commit 884b600f63dc ("[PATCH] USB: fix acm > trouble with terminals") but never used since. > > Signed-off-by: Tobias Herzog Acked-by: Oliver Neukum -- To unsubscribe from this list: send the line

Re: [PATCH v3 3/4] cdc-acm: log message for serial state notification

2017-03-31 Thread Oliver Neukum
Am Donnerstag, den 30.03.2017, 22:15 +0200 schrieb Tobias Herzog: > Adds a similar log message to USB_CDC_NOTIFY_SERIAL_STATE as it is > already done with USB_CDC_NOTIFY_NETWORK_CONNECTION. > > Signed-off-by: Tobias Herzog Acked-by: Oliver Neukum -- To unsubscribe from this list: send the line

Re: [PATCH v3 2/4] cdc-acm: reassemble fragmented notifications

2017-03-31 Thread Oliver Neukum
Am Donnerstag, den 30.03.2017, 22:15 +0200 schrieb Tobias Herzog: > USB devices may have very limited endpoint packet sizes, so that > notifications can not be transferred within one single usb packet. > Reassembling of multiple packages may be necessary. > > Signed-off-by: Tobias Herzog Acked-by

Re: [PATCH v3 1/4] cdc-acm: fix possible invalid access when processing notification

2017-03-31 Thread Oliver Neukum
Am Donnerstag, den 30.03.2017, 22:15 +0200 schrieb Tobias Herzog: > Notifications may only be 8 bytes long. Accessing the 9th and > 10th byte of unimplemented/unknown notifications may be insecure. > Also check the length of known notifications before accessing anything > behind the 8th byte. > >

Re: [PATCH] usb: gadget: uvc: Missing files for configfs interface

2017-03-31 Thread Laurent Pinchart
Hi Felipe and Petr, On Tuesday 28 Mar 2017 16:48:46 Felipe Balbi wrote: > Petr Cvek writes: > > Dne 7.3.2017 v 06:58 Laurent Pinchart napsal(a): > >> On Tuesday 07 Mar 2017 00:57:20 Petr Cvek wrote: > >>> Commit 76e0da34c7ce ("usb-gadget/uvc: use per-attribute show and store > >>> methods") cause

Re: [PATCHv3] net: usbnet: support 64bit stats in qmi_wwan driver

2017-03-31 Thread Bjørn Mork
Greg Ungerer writes: > Add support for the net stats64 counters to the usbnet core and then to > the qmi_wwan driver. > > This is a strait forward addition of 64bit counters for RX and TX packets > and byte counts. It is done in the same style as for the other net drivers > that support stats64.

[PATCH v2 6/6] usb: usbip tool: Remove empty lines

2017-03-31 Thread Yuyang Du
Signed-off-by: Yuyang Du --- tools/usb/usbip/libsrc/vhci_driver.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/usb/usbip/libsrc/vhci_driver.c b/tools/usb/usbip/libsrc/vhci_driver.c index f596ef4..d34a482 100644 --- a/tools/usb/usbip/libsrc/vhci_driver.c +++ b/tools/usb/usbip/libsrc

[PATCH v2 5/6] usb: usbip tool: Fix parse_status()

2017-03-31 Thread Yuyang Du
parse_status() reads the status file one by one, so it can only update the available and according vhci_driver->idev's. Signed-off-by: Yuyang Du --- tools/usb/usbip/libsrc/vhci_driver.c | 36 +++- tools/usb/usbip/src/usbip_attach.c | 2 ++ 2 files changed, 17 i

[PATCH v2 1/6] usb: usbip: Remove unnecessary get_vdev()

2017-03-31 Thread Yuyang Du
vhci_tx_urb() should be able to get the vhci_device from its caller vhci_urb_enqueue(), instead of brutal-force searching it. Signed-off-by: Yuyang Du --- drivers/usb/usbip/vhci_hcd.c | 32 ++-- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/drivers/us

[PATCH v2 4/6] usb: usbip tool: Fix refresh_imported_device_list()

2017-03-31 Thread Yuyang Du
The commit 0775a9cbc694e8c7 ("usbip: vhci extension: modifications to vhci driver") introduced multiple controllers, but the status of the ports are only extracted from the first status file, fix it. Signed-off-by: Yuyang Du --- tools/usb/usbip/libsrc/vhci_driver.c | 27 +

[PATCH v2 2/6] usb: usbip tool: Fix get_nports()

2017-03-31 Thread Yuyang Du
The commit 0775a9cbc694e8c72 ("usbip: vhci extension: modifications to vhci driver") introduced multiple controllers, and nports as a sys file, and claimed to read the nports from it, but it didn't. In addition, the get_nports() has been so wrong that even with 8 port lines for instance, it gets 7

[PATCH v2 0/6] usb: usbip: Fix ports and port status

2017-03-31 Thread Yuyang Du
The commit 0775a9cbc694e8c7 ("usbip: vhci extension: modifications to vhci driver") introduced several bugs relating to the number of ports amd the port status. In addition, a small improvement is made to the vhci_hcd module. v2: - Remove ncontrollers RO attr as suggested by Krzysztof - As a res

[PATCH v2 3/6] usb: usbip tool: Add ncontrollers in vhci_driver structure

2017-03-31 Thread Yuyang Du
A new field ncontrollers is added to the vhci_driver structure. And this field is stored by scanning the vhci_hcd* dirs in the platform udev. Suggested-by: Krzysztof Opasiak Signed-off-by: Yuyang Du --- tools/usb/usbip/libsrc/vhci_driver.c | 32 +++- tools/usb/usbip/

Re: [PATCH 5/6] usb: usbip tool: Fix refresh_imported_device_list()

2017-03-31 Thread Yuyang Du
Hi Krzysztof, On Mon, Mar 27, 2017 at 04:31:42PM +0200, Krzysztof Opasiak wrote: > > > On 03/27/2017 07:25 AM, Yuyang Du wrote: > >On Mon, Mar 27, 2017 at 09:07:50AM +0200, Krzysztof Opasiak wrote: > >> > >>As now we have multiple controllers I would be more than happy if we > >>could fix functi

Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode

2017-03-31 Thread Felipe Balbi
Hi, Roger Quadros writes: Roger Quadros writes: > dra7 OTG core limits the host controller to USB2.0 (high-speed) mode > when we're operating in dual-role. yeah, that's not a quirk. DRA7 supports OTGv2, not OTGv3. There was no USB3 when OTGv2 was written. D

Re: [PATCH] USB: serial: drop obsolete open-race workaround

2017-03-31 Thread Greg KH
On Thu, Mar 30, 2017 at 03:46:30PM +0200, Johan Hovold wrote: > Commit a65a6f14dc24 ("USB: serial: fix race between probe and open") > fixed a race between probe and open, which could lead to crashes when a > not yet fully initialised port was being opened. > > This race was later incidentally clo

Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode

2017-03-31 Thread Roger Quadros
Hi, On 29/03/17 13:32, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >>> Roger Quadros writes: dra7 OTG core limits the host controller to USB2.0 (high-speed) mode when we're operating in dual-role. >>> >>> yeah, that's not a quirk. DRA7 supports OTGv2, not OTGv3. There was n

[PATCH v5 3/9] phy: phy-mt65xx-usb3: split SuperSpeed port into two ones

2017-03-31 Thread Chunfeng Yun
Currently usb3 port in fact includes two sub-ports, but it is not flexible for some cases, such as following one: usb3 port0 includes u2port0 and u3port0; usb2 port0 includes u2port1; If wants to support only HS, we can use u2port0 or u2port1, when select u2port0, u3port0 is not needed; If

[PATCH v5 1/9] phy: phy-mt65xx-usb3: improve RX detection stable time

2017-03-31 Thread Chunfeng Yun
The default value of RX detection stable time is 10us, and this margin is too big for some critical cases which cause U3 link fail and link to U2(probability is about 1%). So change it to 5us. Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mt65xx-usb3.c | 18 ++ 1 file changed

[PATCH v5 4/9] phy: phy-mt65xx-usb3: move clock from phy node into port nodes

2017-03-31 Thread Chunfeng Yun
each port has its own reference clock, the HighSpeed port is 48M, and the SuperSpeed port is usually 26M, put them into port node for flexibility, this can close clock if the port is not used. Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mt65xx-usb3.c | 27 +-- 1 fil

[PATCH v5 5/9] phy: phy-mt65xx-usb3: add support for new version phy

2017-03-31 Thread Chunfeng Yun
There are some variations from mt2701 to mt2712: 1. banks shared by multiple ports are put back into each port, such as SPLLC and U2FREQ; 2. add a new bank MISC for u2port, and CHIP for u3port; 3. bank's offset in each port are also rearranged; Signed-off-by: Chunfeng Yun --- drivers/phy/phy

[PATCH v5 9/9] dt-bindings: phy-mt65xx-usb: add support for new version phy

2017-03-31 Thread Chunfeng Yun
add a new compatible string for "mt2712", and move reference clock into each port node; Signed-off-by: Chunfeng Yun Acked-by: Rob Herring --- .../devicetree/bindings/phy/phy-mt65xx-usb.txt | 93 +--- 1 file changed, 80 insertions(+), 13 deletions(-) diff --git a/Documenta

[PATCH v5 7/9] arm64: dts: mt8173: split usb SuperSpeed port into two ports

2017-03-31 Thread Chunfeng Yun
split the old SuperSpeed port node into a HighSpeed one and a new SuperSpeed one. Signed-off-by: Chunfeng Yun --- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/a

[PATCH v5 6/9] phy: phy-mt65xx-usb3: disable 100uA extraction from SS port to HS port

2017-03-31 Thread Chunfeng Yun
There will be a problem if SS port is diasbled and HS port extracts 100uA from SS port, so disable extract 100uA from SS port in the case, when disable it, PA0_RG_USB20_INTR_EN should be set, otherwise HS port only works on LS. Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mt65xx-usb3.c | 24

[PATCH v5 8/9] arm64: dts: mt8173: move clock from phy node into port nodes

2017-03-31 Thread Chunfeng Yun
there is a reference clock for each port, HighSpeed port is 48M, and SuperSpeed port is usually 26M. it is flexible to move it into port node, then unused clock can be disabled. Signed-off-by: Chunfeng Yun --- arch/arm64/boot/dts/mediatek/mt8173.dtsi |8 ++-- 1 file changed, 6 insertions

[PATCH v5 2/9] phy: phy-mt65xx-usb3: increase LFPS filter threshold

2017-03-31 Thread Chunfeng Yun
Increase LFPS filter threshold to avoid some fake remote wakeup signal which cause U3 link fail and link to U2 only at about 0.01% probability. Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mt65xx-usb3.c |9 + 1 file changed, 9 insertions(+) diff --git a/drivers/phy/phy-mt65xx-usb