Re: [PATCH V2] cdc_ncm: Add support for moving NDP to end of NCM frame

2015-07-08 Thread Enrico Mioso
So, here is what I tried so far: 1 - Check if the pointer gets corrupted somehow (address change): it seems this doesn't happen at all. 2 - Size problems: I tried setting higher values of the size just in case, with absolutely no changei n behaviour. The code that assigns the pointer the addre

RE: [PATCH v5] usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS

2015-07-08 Thread Phil Edworthy
Hi Laurent, On 08 July 2015 00:08, Laurent wrote: > Hi Phil, > > Thank you for the patch. > > On Tuesday 07 July 2015 12:52:43 Phil Edworthy wrote: > > These changes allow a PHY driver to trigger a VBUS interrupt and > > to provide the value of VBUS. > > > > Signed-off-by: Phil Edworthy > > Th

Re: [PATCH 5/5] usb: gadget: atmel_usba_udc: add missing ret value check

2015-07-08 Thread Nicolas Ferre
Le 07/07/2015 16:02, Robert Baldyga a écrit : > Add missing return value check. In case of error print debug message > and return error code. > > Signed-off-by: Robert Baldyga Yes, it's indeed missing: Acked-by: Nicolas Ferre Thanks, bye. > --- > drivers/usb/gadget/udc/atmel_usba_udc.c | 4 +

linux-4.2-rc1/drivers/usb/host/ohci-tmio.c:104: possible missing break ?

2015-07-08 Thread David Binderman
Hello there, [linux-4.2-rc1/drivers/usb/host/ohci-tmio.c:104]: (warning) Redundant bitwise operation on 'pm' in 'switch' statement. 'break;' missing?     case 3:     pm |= CCR_PM_USBPW3;     case 2:     pm |= CCR_PM_USBPW2;     case 1:     pm |= CCR_PM_USBPW1;

Re: [PATCH v6 08/23] usb: chipidea: set usb otg capabilities

2015-07-08 Thread Roger Quadros
On 08/07/15 05:20, Li Jun wrote: > On Tue, Jul 07, 2015 at 04:25:44PM +0300, Roger Quadros wrote: >> On 29/06/15 10:47, Li Jun wrote: >>> Init and update otg capabilities by DT, set gadget's otg capabilities >>> accordingly. >>> >>> Signed-off-by: Li Jun >>> --- >>> drivers/usb/chipidea/core.c |

[PATCH v2 0/5] usb: gadget: miscellaneous fixes

2015-07-08 Thread Robert Baldyga
Hello, This patch set contains few small bugfixes found in usb gadget functions and UDC drivers. The most important is the [1] as it fixes bug causing BUG_ON() in f_fs driver. Remaining patches contain minor fixes. Best regards, Robert Baldyga Changelog: v2: - Addressed comments from Dan Carpen

[PATCH v2 2/5] usb: gadget: midi: avoid redundant f_midi_set_alt() call

2015-07-08 Thread Robert Baldyga
Function midi registers two interfaces with single set_alt() function which means that f_midi_set_alt() is called twice when configuration is set. That means that endpoint initialization and ep request allocation is done two times. To avoid this problem we do such things only once, for interface nu

[PATCH v2 4/5] staging: emxx_udc: add missing usb_ep_set_maxpacket_limit()

2015-07-08 Thread Robert Baldyga
Since maxpacket_limit was introduced all UDC drivers should use usb_ep_set_maxpacket_limit() function instead of setting maxpacket value manually. ep.maxpacket_limit contains actual maximum maxpacket value supported by hardware which is needed by epautoconf. Signed-off-by: Robert Baldyga --- dri

[PATCH v2 5/5] usb: gadget: atmel_usba_udc: add missing ret value check

2015-07-08 Thread Robert Baldyga
Add missing return value check. In case of error print debug message and return error code. Signed-off-by: Robert Baldyga Acked-by: Nicolas Ferre --- drivers/usb/gadget/udc/atmel_usba_udc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/driver

[PATCH v2 3/5] usb: isp1760: udc: add missing usb_ep_set_maxpacket_limit()

2015-07-08 Thread Robert Baldyga
Since maxpacket_limit was introduced all UDC drivers should use usb_ep_set_maxpacket_limit() function instead of setting maxpacket value manually. ep.maxpacket_limit contains actual maximum maxpacket value supported by hardware which is needed by epautoconf. Signed-off-by: Robert Baldyga --- dri

[PATCH v2 1/5] usb: gadget: ffs: call functionfs_unbind() if _ffs_func_bind() fails

2015-07-08 Thread Robert Baldyga
Function ffs_do_functionfs_bind() calls functionfs_bind() which allocates usb request and increments refcounts. These things needs to be cleaned up by if further steps of initialization fail by calling functionfs_unbind(). Signed-off-by: Robert Baldyga --- drivers/usb/gadget/function/f_fs.c | 9

Re: [PATCH v6 07/23] usb: common: add API to update usb otg capabilities by device tree

2015-07-08 Thread Roger Quadros
On 08/07/15 05:05, Li Jun wrote: > On Tue, Jul 07, 2015 at 04:23:14PM +0300, Roger Quadros wrote: >> Hi, >> >> On 29/06/15 10:47, Li Jun wrote: >>> Check property of usb hardware to update otg version and disable SRP, HNP >>> and ADP if its disable flag is present. >>> >>> Signed-off-by: Li Jun

Re: [PATCH] usbhid: no flushing if device is already polled

2015-07-08 Thread Jiri Kosina
On Mon, 29 Jun 2015, Oliver Neukum wrote: > From: Oliver Neukum > > During open() it is unnecessary to wait for the device to flush > stale inputs if the device is polled while closed due to a quirk > or opening fails. Okay, super-micro-optimization, but why not. Applied to for-4.3/upstream, t

[PATCH v2 0/5] Mediatek xHCI support

2015-07-08 Thread Chunfeng Yun
The patch supports MediaTek's xHCI controller. There are some differences from xHCI spec: 1. The interval is specified in 250 * 8ns increments for Interrupt Moderation Interval(IMODI) of the Interrupter Moderation(IMOD) register, it is 8 times as much as that defined in xHCI spec. 2. For the valu

[PATCH v2 1/5] dt-bindings: Add usb3.0 phy binding for MT65xx SoCs

2015-07-08 Thread Chunfeng Yun
add a DT binding documentation of usb3.0 phy for MT65xx SoCs from Mediatek. Signed-off-by: Chunfeng Yun --- .../devicetree/bindings/usb/mt65xx-u3phy.txt | 34 ++ 1 file changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/mt65xx-u3phy.txt

[PATCH v2 5/5] arm64: dts: mediatek: add xHCI & usb phy for mt8173

2015-07-08 Thread Chunfeng Yun
Signed-off-by: Chunfeng Yun --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 15 +++ arch/arm64/boot/dts/mediatek/mt8173.dtsi| 27 +++ 2 files changed, 42 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediat

[PATCH v2 4/5] xhci: mediatek: support MTK xHCI host controller

2015-07-08 Thread Chunfeng Yun
MTK xhci host controller defines some extra SW scheduling parameters for HW to minimize the scheduling effort for synchronous and interrupt endpoints. The parameters are put into reseved DWs of slot context and endpoint context Signed-off-by: Chunfeng Yun --- drivers/usb/host/Kconfig | 9 +

[PATCH v2 3/5] usb: phy: add usb3.0 phy driver for mt65xx SoCs

2015-07-08 Thread Chunfeng Yun
Signed-off-by: Chunfeng Yun --- drivers/usb/phy/Kconfig | 10 + drivers/usb/phy/Makefile | 1 + drivers/usb/phy/phy-mt65xx-usb3.c | 856 ++ 3 files changed, 867 insertions(+) create mode 100644 drivers/usb/phy/phy-mt65xx-usb3.c diff --gi

[PATCH v2 2/5] dt-bindings: Add a binding for Mediatek xHCI host controller

2015-07-08 Thread Chunfeng Yun
add a DT binding documentation of xHCI host controller for the MT8173 SoC from Mediatek. Signed-off-by: Chunfeng Yun --- .../devicetree/bindings/usb/mt8173-xhci.txt| 27 ++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/mt81

[PATCH] usb: phy: msm: Add D+/D- lines route control

2015-07-08 Thread Ivan T. Ivanov
apq8016-sbc board is using Dual SPDT USB Switch (TC7USB40MU), witch is controlled by GPIO to de/multiplex D+/D- USB lines to USB2513B Hub and uB connector. Add support for this. Signed-off-by: Ivan T. Ivanov --- .../devicetree/bindings/usb/msm-hsusb.txt | 4 ++ drivers/usb/phy/phy-msm-

RE: [PATCH v2 3/3] usb: dwc3: gadget: return error if command sent to DEPCMD register fails

2015-07-08 Thread Subbaraya Sundeep Bhatta
Hi Felipe, > -Original Message- > From: Subbaraya Sundeep Bhatta > Sent: Tuesday, July 07, 2015 10:32 AM > To: 'ba...@ti.com' > Cc: gre...@linuxfoundation.org; linux-usb@vger.kernel.org; linux- > ker...@vger.kernel.org; sta...@vger.kernel.org > Subject: RE: [PATCH v2 3/3] usb: dwc3: gadget

[PATCH v3 02/11] usb: otg-fsm: support multiple instances

2015-07-08 Thread Roger Quadros
Move the state_changed variable into struct otg_fsm so that we can support multiple instances. Signed-off-by: Roger Quadros --- drivers/usb/common/usb-otg-fsm.c | 10 -- include/linux/usb/otg-fsm.h | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/usb/co

[PATCH v3 09/11] usb: gadget: udc: adapt to OTG core

2015-07-08 Thread Roger Quadros
The OTG state machine needs a mechanism to start and stop the gadget controller. Add usb_gadget_start() and usb_gadget_stop(). Register with OTG core when gadget function driver is available and unregister when function driver is unbound. We need to unlock the usb_lock mutexbefore calling usb_otg

[PATCH v3 06/11] usb: gadget.h: Add OTG to gadget interface

2015-07-08 Thread Roger Quadros
The OTG core will use struct otg_gadget_ops to start/stop the gadget controller. The main purpose of this interface is to avoid directly calling usb_gadget_start/stop() from the OTG core as they wouldn't be defined in the built-in symbol table if CONFIG_USB_GADGET is m. Signed-off-by: Roger Quadr

[PATCH v3 08/11] usb: hcd: Adapt to OTG core

2015-07-08 Thread Roger Quadros
The existing usb_add/remove_hcd() functionality remains unchanged for non-OTG devices. For OTG devices they only register the HCD with the OTG core. Introduce usb_otg_add/remove_hcd() for use by OTG core. These functions actually add/remove the HCD. Signed-off-by: Roger Quadros --- drivers/usb/

[PATCH v3 11/11] usb: otg: hub: Notify OTG fsm when A device sets b_hnp_enable

2015-07-08 Thread Roger Quadros
This is the a_set_b_hnp_enable flag in the OTG state machine diagram and must be set when the A-Host has successfully set the b_hnp_enable feature of the OTG-B-Peripheral attached to it. When this bit changes we kick our OTG FSM to make note of the change and act accordingly. Signed-off-by: Roger

[PATCH v3 07/11] usb: otg: add OTG core

2015-07-08 Thread Roger Quadros
The OTG core instantiates the OTG Finite State Machine per OTG controller and manages starting/stopping the host and gadget controllers based on the bus state. It provides APIs for the following tasks - Registering an OTG capable controller - Registering Host and Gadget controllers to OTG core -

[PATCH v3 10/11] usb: otg: Add dual-role device (DRD) support

2015-07-08 Thread Roger Quadros
DRD mode is a reduced functionality OTG mode. In this mode we don't support SRP, HNP and dynamic role-swap. In DRD operation, the controller mode (Host or Peripheral) is decided based on the ID pin status. Once a cable plug (Type-A or Type-B) is attached the controller selects the state and doesn'

[PATCH v3 12/12] usb: chipidea: move from CONFIG_USB_OTG_FSM to CONFIG_USB_OTG

2015-07-08 Thread Roger Quadros
CONFIG_USB_OTG_FSM no longer exists and the OTG FSM is available if CONFIG_USB_OTG is defined so move to using CONFIG_USB_OTG. Signed-off-by: Roger Quadros --- Documentation/usb/chipidea.txt | 2 +- drivers/usb/chipidea/Makefile | 2 +- drivers/usb/chipidea/ci.h | 2 +- drivers/usb/chipide

[PATCH v3 01/11] usb: otg-fsm: Add documentation for struct otg_fsm

2015-07-08 Thread Roger Quadros
struct otg_fsm is the interface to the OTG state machine. Document the input, output and internal state variables. Definations are taken from Table 7-2 and Table 7-4 of the USB OTG & EH Specification Rev.2.0 Re-arrange some of the members as per use case for more clarity. Signed-off-by: Roger Qu

[PATCH v3 05/11] usb: hcd.h: Add OTG to HCD interface

2015-07-08 Thread Roger Quadros
The OTG core will use struct otg_hcd_ops to add/remove the HCD controller. The main purpose of this interface is to avoid directly calling usb_add/remove_hcd() from the OTG core as they wouldn't be defined in the built-in symbol table if CONFIG_USB is m. Signed-off-by: Roger Quadros --- include

[PATCH v3 04/11] otg-fsm: move usb_bus_start_enum into otg-fsm->ops

2015-07-08 Thread Roger Quadros
This is to prevent missing symbol build error if OTG is enabled (built-in) and HCD core (CONFIG_USB) is module. Signed-off-by: Roger Quadros --- drivers/usb/common/usb-otg-fsm.c | 6 -- drivers/usb/phy/phy-fsl-usb.c| 2 ++ include/linux/usb/otg-fsm.h | 1 + 3 files changed, 7 insert

[PATCH v3 03/11] usb: otg-fsm: Prevent build warning "VDBG" redefined

2015-07-08 Thread Roger Quadros
If usb/otg-fsm.h and usb/composite.h are included together then it results in the build warning [1]. Prevent that by using dev_vdbg() instead. Also get rid of MPC_LOC which doesn't seem to be used by anyone. [1] - warning fixed by this patch: In file included from drivers/usb/dwc3/core.h:33,

[PATCH v3 00/11] USB: OTG/DRD Core functionality

2015-07-08 Thread Roger Quadros
Hi, This series centralizes OTG/Dual-role functionality in the kernel. As of now I've got Dual-role functionality working pretty reliably on dra7-evm and am437x-gp-evm. xhci side of things for OTG/DRD use are already in v4.2 http://thread.gmane.org/gmane.linux.kernel/1923161 DWC3 controller and

[PATCH v3 1/9] usb: dwc3: add dual-role support

2015-07-08 Thread Roger Quadros
Register with the USB OTG core. Since we don't support OTG yet we just work as a dual-role device even if device tree says "otg". Use extcon framework to get VBUS/ID cable events and kick the OTG state machine. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/core.c | 155

[PATCH v3 2/9] usb: dwc3: core.h: add some register definitions

2015-07-08 Thread Roger Quadros
Add OTG and GHWPARAMS6 register definitions Signed-off-by: Roger Quadros --- drivers/usb/dwc3/core.h | 82 + 1 file changed, 82 insertions(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index d0fda04..9c1c094 100644 --- a/driver

[PATCH v3 0/9] usb: dwc3: add dual-role support

2015-07-08 Thread Roger Quadros
Hi, Adds dual role support to dwc3 controller driver. Series depends on [1] for core OTG/dual-role support. Patches are based on v4.2-rc1. Tested on am437x-gp-evm and dra7-evm after platform related patches are applied. Those are sent seprately. You will also need the fixes mentioned in [2] [1

[PATCH v3 3/9] usb: dwc3: dwc3-omap: Make the wrapper interrupt shared

2015-07-08 Thread Roger Quadros
The wrapper interrupt is shared with OTG core so mark it IRQF_SHARED. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/dwc3-omap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 6b486a3..1bc1766 100644 --

[PATCH v3 5/9] usb: dwc3: core: make dual-role work with OTG irq

2015-07-08 Thread Roger Quadros
If the ID pin event is not available over extcon then we rely on the OTG controller to provide us ID and VBUS information. We still don't support any OTG features but just dual-role operation. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/core.c | 225 +++

[PATCH v3 4/9] usb: dwc3: core: Adapt to named interrupts

2015-07-08 Thread Roger Quadros
From: Felipe Balbi Add support to use interrupt names, Following are the interrupt names Peripheral Interrupt - peripheral HOST Interrupt - host OTG Interrupt - otg [Roger Q] - If any of these are missing we use the first available IRQ resource so that we don't break with older DTBs. - Use ga

[PATCH v3 9/9] usb: dwc3: core: don't break during suspend/resume while we're dual-role

2015-07-08 Thread Roger Quadros
We can't rely just on dr_mode to decide if we're in host or gadget mode when we're configured as otg/dual-role. So while dr_mode is OTG, we find out from the otg state machine if we're in host or gadget mode and take the necessary actions during suspend/resume. Also make sure that we disable OTG

[PATCH v3 7/9] usb: dwc3: gadget: Fix suspend/resume during dual-role mode

2015-07-08 Thread Roger Quadros
Gdget controller might not be always active during suspend/ resume when we are operating in dual-role/otg mode. Check if we're active and only if we are then perform necessary actions during suspend/resume. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/gadget.c | 6 ++ 1 file changed, 6

[PATCH v3 8/9] usb: dwc3: core: Prevent otg events from disabling themselves

2015-07-08 Thread Roger Quadros
There is a race happening during dwc3_drd_init() that causes otg events to get disabled. This is what happens. dwc3_otg_irq() happens immediately when PRTCAP is set to OTG, even though OEVTEN is 0. This is because BIT 31 IRQ of OEVT can't be disabled by OEVTEN. We configure OEVTEN in dwc3_otg_init

[PATCH v3 6/9] usb: dwc3: save/restore OTG registers during suspend/resume

2015-07-08 Thread Roger Quadros
Without this we loose OTG controller register context and malfunction after a system suspend-resume. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/core.c | 17 + drivers/usb/dwc3/core.h | 6 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dw

[PATCH v3 0/5] ARM: dts: OMAP2+: Enable USB dual-role on supported boards

2015-07-08 Thread Roger Quadros
Hi, Enables dual-role feaure on supported boards. Depends on [1] - core USB DRD support - http://thread.gmane.org/gmane.linux.kernel/1991413 [2] - dwc3 DRD support - http://thread.gmane.org/gmane.linux.usb.general/127890 Tested on am437x-gp-evm and dra7-evm. cheers, -roger Felipe Balbi (1):

[PATCH v3 5/5] ARM: dts: am43xx: Enable dual-role on USB1

2015-07-08 Thread Roger Quadros
USB1 port is micro-AB type and can function as peripheral as well as host. Enable dual-role mode for USB1. Signed-off-by: Roger Quadros --- arch/arm/boot/dts/am437x-gp-evm.dts | 2 +- arch/arm/boot/dts/am437x-sk-evm.dts | 2 +- arch/arm/boot/dts/am43x-epos-evm.dts | 2 +- 3 files changed, 3 in

[PATCH v3 2/5] ARM: dts: omap5: Add named interrupt property for dwc3

2015-07-08 Thread Roger Quadros
Add interrupt names so that the same can be used for OTG easily. Signed-off-by: Roger Quadros --- arch/arm/boot/dts/omap5.dtsi | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi index 7d24ae0..0b25c96 100644 --- a

[PATCH v3 4/5] ARM: dts: dra7*-evm: Enable dual-role for usb1

2015-07-08 Thread Roger Quadros
Now that we have dual-role support working at USB core, enable dual-role support for usb1 controller. Signed-off-by: Roger Quadros --- arch/arm/boot/dts/dra7-evm.dts | 2 +- arch/arm/boot/dts/dra72-evm.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/

[PATCH v3 3/5] ARM: dts: dra7: Add named interrupt property for dwc3

2015-07-08 Thread Roger Quadros
Add interrupt names so that the same can be used for OTG easily. Signed-off-by: Roger Quadros --- arch/arm/boot/dts/dra7.dtsi | 21 ++--- arch/arm/boot/dts/dra74x.dtsi | 7 ++- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/dra7.dtsi b/ar

[PATCH v3 1/5] ARM: dts: am4372: Add named interrupt property for dwc3

2015-07-08 Thread Roger Quadros
From: Felipe Balbi Add interrupt names so that the same can be used for OTG easily. Signed-off-by: Felipe Balbi Signed-off-by: Roger Quadros --- arch/arm/boot/dts/am4372.dtsi | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/am4372.dtsi b/ar

Re: Cannot use the logitech k520 (046d:c52b) to unlock my luks disk at boot time

2015-07-08 Thread Glasswall Information Point
I found the bad commit. git bisect gave me the following: -- ab94e562ed45c99914fe874b7feaf75b80ceea84 is the first bad commit commit ab94e562ed45c99914fe874b7feaf75b80ceea84 Author: Benjamin Tissoires Date: Tue Sep 30 13:18:28 2014 -0400 HID: logitech: move dj devi

[PATCH] USB: pl2303: Rewrite pl2303_encode_baud_rate_divisor

2015-07-08 Thread Michał Pecio
This commit fixes the following issues: 1. The 9th bit of buf was believed to be the LSB of divisor's exponent, but the hardware interprets it as MSB (9th bit) of the mantissa. The exponent is actually one bit shorter and applies to base 4, not 2 as previously believed. 2. Loop iterations double

Re: [PATCH] usb: gadget: dummy_hcd: check hcd at urb enqueue

2015-07-08 Thread Rui Miguel Silva
Hi Alan, On Tue, Jul 07, 2015 at 02:07:48PM -0400, Alan Stern wrote: On Tue, 7 Jul 2015, Rui Miguel Silva wrote: When processing urb list in dummy_timer and an ep goes away, the urb is giveback with an -EPROTO error. However the same urb can be enqueued once again and the loop in dummy_timer ne

[PATCH V3] cdc_ncm: Add support for moving NDP to end of NCM frame

2015-07-08 Thread Enrico Mioso
NCM specs are not actually mandating a specific position in the frame for the NDP (Network Datagram Pointer). However, some Huawei devices will ignore our aggregates if it is not placed after the datagrams it points to. Add support for doing just this, in a per-device configurable way. While at it,

[PATCH 03/37] usb: gadget: add endpoint capabilities helper macros

2015-07-08 Thread Robert Baldyga
Add macros useful while initializing array of endpoint capabilities structures. These macros makes structure initialization more compact to decrease number of code lines and increase readability of code. Signed-off-by: Robert Baldyga --- include/linux/usb/gadget.h | 20 1 fi

Re: [PATCH] usb: gadget: dummy_hcd: fix status in transfer

2015-07-08 Thread Rui Miguel Silva
Hi Alan, On Tue, Jul 07, 2015 at 01:53:14PM -0400, Alan Stern wrote: On Tue, 7 Jul 2015, Rui Miguel Silva wrote: When the request actual state is equal to lenght, besides setting the "state"? Do you mean "status"? "lenght" is a typo. request status to done, the status variable also need t

[PATCH 11/37] usb: gadget: bdc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/bdc/bdc_ep.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.c b/drivers/usb/gadget/udc/bdc/bdc_ep.c index b04980c..f9a8f57 100644 --

[PATCH 15/37] usb: gadget: fsl_udc_core: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/fsl_udc_core.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c index c60022b..aab52

[PATCH 27/37] usb: gadget: pxa25x_udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/pxa25x_udc.c | 32 1 file changed, 32 insertions(+) diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c index f

[PATCH 26/37] usb: gadget: pch_ud: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/pch_udc.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/pch_udc.c b/drivers/usb/gadget/udc/pch_udc.c index 613547f..cc8f

[PATCH 28/37] usb: gadget: pxa27x_udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/pxa27x_udc.h | 33 ++--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/usb/gadget/udc/pxa27x_udc.h b/drivers/usb/gadget/udc/px

[PATCH 36/37] usb: gadget: atmel_usba_udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/atmel_usba_udc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c index 37d414e..2

[PATCH 35/37] usb: renesas: gadget: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/renesas_usbhs/mod_gadget.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index dc2aa32..ed8d890 100

Re: [PATCH V2] cdc_ncm: Add support for moving NDP to end of NCM frame

2015-07-08 Thread Enrico Mioso
Hi Oliver and everybody reading this message. So V3 of this patch fixed the issue I reported recently. I wasn't properly accounting for the NDP size when writing new packets to the SKB: so i ended up writing past the end of SKB buffer. Thank you for your patience and help. Enrico -- To unsubsc

[PATCH 34/37] usb: musb: gadget: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/musb/musb_gadget.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 625d482f..043248a 100644 --- a/driver

[PATCH 33/37] usb: isp1760: udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/isp1760/isp1760-udc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/isp1760/isp1760-udc.c b/drivers/usb/isp1760/isp1760-udc.c index 3699962..1c3d0fd 100644 ---

[PATCH 37/37] usb: gadget: epautoconf: add endpoint capabilities flags verification

2015-07-08 Thread Robert Baldyga
Introduce endpoint matching mechanism basing on endpoint capabilities flags. We check if endpoint supports transfer type and direction requested in ep descriptor. Since we have this new endpoint matching mechanism there is no need to have old code guessing endpoint capabilities basing on its name,

[PATCH 32/37] usb: gadget: udc-xilinx: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/udc-xilinx.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/usb/gadget/udc/udc-xilinx.c b/drivers/usb/gadget/udc/udc-xilinx.c index 1f24274..1cbb0ac 100644 --

[PATCH 30/37] usb: gadget: s3c-hsudc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/s3c-hsudc.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/usb/gadget/udc/s3c-hsudc.c b/drivers/usb/gadget/udc/s3c-hsudc.c index 85a712a..e9def42 1006

[PATCH 31/37] usb: gadget: s3c2410_udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/s3c2410_udc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/usb/gadget/udc/s3c2410_udc.c b/drivers/usb/gadget/udc/s3c2410_udc.c index 5d9aa81..eb3571e 100

[PATCH 29/37] usb: gadget: r8a66597-udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/r8a66597-udc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/usb/gadget/udc/r8a66597-udc.c b/drivers/usb/gadget/udc/r8a66597-udc.c index 0293f71..baa0609

[PATCH 21/37] usb: gadget: mv_u3d_core: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/mv_u3d_core.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/usb/gadget/udc/mv_u3d_core.c b/drivers/usb/gadget/udc/mv_u3d_core.c index ea35a24..4c48969 100644

[PATCH 09/37] usb: gadget: at91_udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/at91_udc.c | 33 - 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/drivers/usb/gadget/udc/at91_udc.c b/drivers/usb/gadget/udc/at91_ud

[PATCH 08/37] usb: gadget: amd5536udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/amd5536udc.c | 57 ++--- 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/drivers/usb/gadget/udc/amd5536udc.c b/drivers/usb/gadget/ud

[PATCH 07/37] usb: dwc3: gadget: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/dwc3/gadget.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 333a7c0..8d1f768 100644 --- a/drivers/usb/dwc3/gadg

[PATCH 06/37] usb: dwc2: gadget: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/dwc2/gadget.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 4d47b7c..8771b66 100644 --- a/drivers/usb/dwc2/gadg

[PATCH 05/37] usb: chipidea: udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/chipidea/udc.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 764f668..eff7cfb 100644 --- a/drivers/usb/chipi

[PATCH 04/37] staging: emxx_udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Fixed typo in "epc-nulk" to "epc-bulk". Signed-off-by: Robert Baldyga --- drivers/staging/emxx_udc/emxx_udc.c | 60 ++--- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/drivers/staging/emx

[PATCH 12/37] usb: gadget: dummy-hcd: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/dummy_hcd.c | 65 +- 1 file changed, 50 insertions(+), 15 deletions(-) diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc

[PATCH 22/37] usb: gadget: mv_udc_core: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/mv_udc_core.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/usb/gadget/udc/mv_udc_core.c b/drivers/usb/gadget/udc/mv_udc_core.c index d32160d..306a7ff 100644

[PATCH 17/37] usb: gadget: goku_udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/goku_udc.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/usb/gadget/udc/goku_udc.c b/drivers/usb/gadget/udc/goku_udc.c index 9e8d842..46b8d14 100644 --- a/dri

[PATCH 13/37] usb: gadget: fotg210-udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/fotg210-udc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/gadget/udc/fotg210-udc.c b/drivers/usb/gadget/udc/fotg210-udc.c index e547ea7..960c70c 10

[PATCH 24/37] usb: gadget: net2280: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/net2280.c | 50 ++-- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/ne

[PATCH 19/37] usb: gadget: lpc32xx_udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/lpc32xx_udc.c | 32 1 file changed, 32 insertions(+) diff --git a/drivers/usb/gadget/udc/lpc32xx_udc.c b/drivers/usb/gadget/udc/lpc32xx_udc.c inde

[PATCH 20/37] usb: gadget: m66592-udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/m66592-udc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/gadget/udc/m66592-udc.c b/drivers/usb/gadget/udc/m66592-udc.c index 309706f..e404553 10064

[PATCH 25/37] usb: gadget: omap_udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/omap_udc.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/usb/gadget/udc/omap_udc.c b/drivers/usb/gadget/udc/omap_udc.c index e2fcdb8..9b7d394

[PATCH 16/37] usb: gadget: fusb300_udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/fusb300_udc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/gadget/udc/fusb300_udc.c b/drivers/usb/gadget/udc/fusb300_udc.c index 3970f45..948845c 10

[PATCH 10/37] usb: gadget: bcm63xx_udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/bcm63xx_udc.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/udc/bcm63xx_udc.c b/drivers/usb/gadget/udc/bcm63xx_u

[PATCH 18/37] usb: gadget: gr_udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/gr_udc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c index c886887..8aa2593 100644 --- a/drive

[PATCH 14/37] usb: gadget: fsl_qe_udc: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/fsl_qe_udc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c b/drivers/usb/gadget/udc/fsl_qe_udc.c index e0822f1..5fb6f8b 10064

[PATCH 23/37] usb: gadget: net2272: add ep capabilities support

2015-07-08 Thread Robert Baldyga
Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/udc/net2272.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c index 195baf3..34ec1ec 100644 --- a/dr

[PATCH 00/37] usb: gadget: rework ep matching and claiming mechanism

2015-07-08 Thread Robert Baldyga
Hello, This patch series reworks endpoint matching and claiming mechanism in epautoconf. The patch (1) introduces new safer endpoint claiming method, basing on new 'claimed' flag. It was discussed here [1]. I proposed this solution over year ago and it was accepted, but apparently I forgot to sen

[PATCH 01/37] usb: gadget: encapsulate endpoint claiming mechanism

2015-07-08 Thread Robert Baldyga
So far it was necessary for usb functions to set ep->driver_data in endpoint obtained from autoconfig to non-null value, to indicate that endpoint is claimed by function (in autoconfig it was checked if endpoint has set this field to non-null value, and if it has, it was assumed that it is claimed)

[PATCH 02/37] usb: gadget: add endpoint capabilities flags

2015-07-08 Thread Robert Baldyga
Introduce struct usb_ep_caps which contains information about capabilities of usb endpoints - supported transfer types and directions. This structure should be filled by UDC driver for each of its endpoints, and will be used in epautoconf in new ep matching mechanism which will replace ugly guessin

Re: [PATCH v2 1/5] usb: gadget: ffs: call functionfs_unbind() if _ffs_func_bind() fails

2015-07-08 Thread Sergei Shtylyov
Hello. On 7/8/2015 12:05 PM, Robert Baldyga wrote: Function ffs_do_functionfs_bind() calls functionfs_bind() which allocates usb request and increments refcounts. These things needs to be cleaned up by if further steps of initialization fail by calling functionfs_unbind(). Signed-off-by: Rob

[PATCH] usb-storage: Add ignore-device quirk for gm12u320 based usb mini projectors

2015-07-08 Thread Hans de Goede
Grain-media GM12U320 based devices are mini video projectors using USB for both power and video data transport. Their usb-storage interface is a virtual windows driver CD. The gm12u320 kms driver needs these interfaces to talk to the device and export it as framebuffer & kms dri device nodes, so

Re: [PATCH v3 4/9] usb: dwc3: core: Adapt to named interrupts

2015-07-08 Thread Sergei Shtylyov
Hello. On 7/8/2015 1:36 PM, Roger Quadros wrote: From: Felipe Balbi Add support to use interrupt names, Following are the interrupt names Peripheral Interrupt - peripheral HOST Interrupt - host OTG Interrupt - otg [Roger Q] - If any of these are missing we use the first available I

Re: [PATCH v3 9/9] usb: dwc3: core: don't break during suspend/resume while we're dual-role

2015-07-08 Thread Sergei Shtylyov
Hello. On 7/8/2015 1:37 PM, Roger Quadros wrote: We can't rely just on dr_mode to decide if we're in host or gadget mode when we're configured as otg/dual-role. So while dr_mode is OTG, we find out from the otg state machine if we're in host or gadget mode and take the necessary actions during

Re: [PATCH v2 1/5] usb: gadget: ffs: call functionfs_unbind() if _ffs_func_bind() fails

2015-07-08 Thread Michal Nazarewicz
On Wed, Jul 08 2015, Robert Baldyga wrote: > Function ffs_do_functionfs_bind() calls functionfs_bind() which allocates > usb request and increments refcounts. These things needs to be cleaned > up by if further steps of initialization fail by calling functionfs_unbind(). > > Signed-off-by: Robert B

Re: [PATCH v2 2/5] usb: gadget: midi: avoid redundant f_midi_set_alt() call

2015-07-08 Thread Michal Nazarewicz
On Wed, Jul 08 2015, Robert Baldyga wrote: > Function midi registers two interfaces with single set_alt() function > which means that f_midi_set_alt() is called twice when configuration > is set. That means that endpoint initialization and ep request allocation > is done two times. To avoid this pr

  1   2   >