[PATCHv2 2/2] usb: dwc3: remove handling of platform data

2016-02-03 Thread Heikki Krogerus
No more users for it. Signed-off-by: Heikki Krogerus --- drivers/usb/dwc3/core.c | 35 -- drivers/usb/dwc3/platform_data.h | 53 2 files changed, 88 deletions(-) delete mode 100644 drivers/usb/dwc3/platform_data.h diff -

[PATCHv2 1/2] usb: dwc3: pci: use build-in properties instead of platform data

2016-02-03 Thread Heikki Krogerus
This should allow the core driver to drop handling of platform data and expect the platform specific details to always come from properties. Signed-off-by: Heikki Krogerus Cc: Huang Rui CC: John Youn --- drivers/usb/dwc3/dwc3-pci.c | 81 +++-- 1 file cha

[PATCHv2 0/2] usb: dwc3: get rid of platform data

2016-02-03 Thread Heikki Krogerus
Hi, Now that we can use the build-in properties as fallback when the primary firmware (DT or ACPI) does not provide the requested property, it should be always safe to add them. I.e, by adding them to a device, nothing will be overwritten. Changes since v1: - s/taps/tapes/ in dwc3-pci.c - Dropped

Re: [PATCHv3 00/11] Fixes and improvements to f_fs and f_midi

2016-02-03 Thread Felipe Ferreri Tonello
Hi Michal, On 26/01/16 14:53, Michal Nazarewicz wrote: > Resending my previous two sets for f_fs and f_midi. This time rebased > on top of Felipe’s next branch. > > Dan Carpenter (1): > usb: gadget: f_midi: missing unlock on error path > > Du, Changbin (1): > usb: f_fs: avoid race condition

[PATCH] usb: retry reset if a device times out

2016-02-03 Thread Oliver Neukum
Some devices I got show an inability to operate right after power on if they are already connected. They are beyond recovery if the descriptors are requested multiple times. So in case of a timeout we rather bail early and reset again. This patch is a rework of a patch that fell through the cracks

[PATCH v2 2/5] usb: dwc2: gadget: fix TX FIFO size and address initialization

2016-02-03 Thread Robert Baldyga
According to DWC2 documentation, DPTxFSize field of DPTXFSIZn register is read only, which means that software cannot change FIFO size. Register description says: "The value of this register is the Largest Device Mode Periodic Tx Data FIFO Depth (parameter OTG_TX_DPERIO_DFIFO_DEPTH_n), as specifie

[PATCH v2 3/5] usb: dwc2: gadget: change variable name to more meaningful

2016-02-03 Thread Robert Baldyga
Since we handle FIFOs and endpoint separately, using variable named 'ep' in context of FIFO is misleading, hence we rename it to 'fifo'. Signed-off-by: Robert Baldyga --- drivers/usb/dwc2/gadget.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc2/gadget

[PATCH v2 4/5] usb: dwc2: gadget: remove dead code from dwc2_hsotg_ep_enable()

2016-02-03 Thread Robert Baldyga
Since FIFO is always freed in dwc2_hsotg_ep_disable(), ep->fifo_index is always 0 in dwc2_hsotg_ep_enable(), hence code inside if() block is never executed. Signed-off-by: Robert Baldyga --- drivers/usb/dwc2/gadget.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git

[PATCH v2 5/5] usb: dwc2: gadget: free TX FIFO after killing requests

2016-02-03 Thread Robert Baldyga
As kill_all_requests() potentially flushes TX FIFO, we should should free FIFO after calling it. Otherwise FIFO could stay unflushed properly. Signed-off-by: Robert Baldyga --- drivers/usb/dwc2/gadget.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc2/

[PATCH v2 1/5] usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers

2016-02-03 Thread Robert Baldyga
In context of FIFO registers we use ep->fifo_index instead of ep->index. Signed-off-by: Robert Baldyga --- drivers/usb/dwc2/gadget.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 422ab7d..0d0f6fe 100644 --- a/

[PATCH v2 0/5] usb: dwc2: gadget: Fix TX FIFO handling

2016-02-03 Thread Robert Baldyga
Hello, This patch series fixes TX FIFO handling in UDC part of DWC2 driver. It gets rid of few bugs, improves compliance with DWC2 documentation and cleanes up driver code. More detailed description is provided in commit messages. Best regards, Robert Baldyga Changelog: v2: - Addressed comments

[PATCH v4 02/43] usb: gadget: f_sourcesink: free requests in sourcesink_disable()

2016-02-03 Thread Robert Baldyga
USB requests in SourceSink function are allocated in sourcesink_get_alt() function, so we prefer to free them rather in sourcesink_disable() than in source_sink_complete() when request is completed with error. It provides better symetry in resource management and improves code readability. Signed-

[PATCH v4 32/43] usb: gadget: f_obex: conversion to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v4 34/43] usb: gadget: f_subset: conversion to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v4 36/43] usb: gadget: f_uac2: conversion to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v4 39/43] usb: gadget: u_ether: remove usb_ep_enable()/usb_ep_disable()

2016-02-03 Thread Robert Baldyga
As we have automatic endpoint state handling it's no longer needed. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/function/u_ether.c | 28 ++-- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadge

[PATCH v4 37/43] usb: gadget: f_mass_storage: conversion to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/function/f_mass_storage.c | 91 +--- driv

[PATCH v4 38/43] usb: gadget: u_serial: remove usb_ep_enable()/usb_ep_disable()

2016-02-03 Thread Robert Baldyga
As we have automatic endpoint state handling it's no longer needed. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/function/u_serial.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c index

[PATCH v4 43/43] usb: gadget: f_uvc: conversion to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Get rid of get_alt() callback, as now USB_REQ_GET_INTERFACE is handled automat

[PATCH v4 40/43] usb: gadget: uvc: fix typo in UVCG_OPTS_ATTR() macro

2016-02-03 Thread Robert Baldyga
Fixes: 76e0da34c7cec5a7dc94667326a948de2e9c8c8d ("usb-gadget/uvc: use per-attribute show and store methods") s/aname/cname - 'cname' was originally used as an attribute name, because UVCG_OPTS_ATTR() macro doesn't have 'aname' parameter. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v4 42/43] Documentation: update uvc configfs interface description

2016-02-03 Thread Robert Baldyga
Update documentation to reflect changes in UVC configfs interface. Signed-off-by: Robert Baldyga --- Documentation/ABI/testing/configfs-usb-gadget-uvc | 39 --- Documentation/usb/gadget-testing.txt | 18 +++ 2 files changed, 12 insertions(+), 45 deletions

[PATCH v4 41/43] usb: gadget: uvc: simplify descriptors generation

2016-02-03 Thread Robert Baldyga
As we don't need distinction between interface descriptors for different speeds, we can remove some amount of unnecessary code. Additionally we simplify configfs interface of UVC function. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/function/f_uvc.c| 60 ---

[PATCH v4 35/43] usb: gadget: f_uac1: conversion to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v4 33/43] usb: gadget: f_phonet: conversion to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v4 29/43] usb: gadget: f_ncm: conversion to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v4 31/43] usb: gadget: f_serial: conversion to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/function/f_serial.c | 122 +++-- 1 fi

[PATCH v4 30/43] usb: gadget: f_printer: conversion to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v4 28/43] usb: gadget: f_eem: conversion to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v4 26/43] usb: gadget: f_hid: conversion to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Move cdev initialization to hidg_alloc(). Remove boilerplate code. Signed-off

[PATCH v4 25/43] usb: gadget: f_hid: handle requests lifetime properly

2016-02-03 Thread Robert Baldyga
So far USB requests allocated in hidg_set_alt() were not freed. Now we free them in case of hidg_set_alt() failure (when we are not able to allocate and enqueue all the requests) or in hidg_disable() function. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/function/f_hid.c | 22 +++

[PATCH v4 24/43] usb: gadget: f_rndis: conversion to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Change USB request lifetime management - now it's all

[PATCH v4 27/43] usb: gadget: f_acm: conversion to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v4 20/43] usb: gadget: configfs: add new composite API support

2016-02-03 Thread Robert Baldyga
Handle functions using new API properly. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/configfs.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index fb3c9ba..60c6898 100644 --- a/drivers/usb/gadge

[PATCH v4 22/43] usb: gadget: f_sourcesink: convert to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Change set_alt() implementation and implement clear_alt() operation. Get rid of get_alt() callback, as now USB_REQ_GET_INTERFACE is handled automatically by composite framwework. Remove unnecessary boilerplate code.

[PATCH v4 23/43] usb: gadget: f_ecm: conversion to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Get rid of get_alt() which now is handled automatically. Remove boilerplate co

[PATCH v4 18/43] usb: gadget: composite: usb_get_endpoint_address() function

2016-02-03 Thread Robert Baldyga
Introduce function returning address of given endpoint within the function. This value can be useful during preparation of class or vendor specific descriptors in prep_vendor_descs() callback. It can be also necessary to handle some class or vendor specific setup requests. Signed-off-by: Robert Ba

[PATCH v4 19/43] usb: gadget: composite: enable adding USB functions using new API

2016-02-03 Thread Robert Baldyga
Enable adding USB functions which use new API. Check if all necessary function ops are supplied and call prep_descs() to allow function register it's entity descriptors. Notice that bind() function is not called for USB functions using new API, as now bind procedure is handled for them in composite

[PATCH v4 21/43] usb: gadget: f_loopback: convert to new API

2016-02-03 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Change set_alt() implementation and implement clear_alt() operation. Remove unnecessary boilerplate code. Call usb_config_do_bind() in legacy gadget zero, because it uses usb_add_config_only() instead of usb_add_co

[PATCH v4 13/43] usb: gadget: composite: enable eps before calling set_alt() callback

2016-02-03 Thread Robert Baldyga
Change set_alt() behavior for functions using new API. Before we call set_alt() callback, we disable endpoints of previously selected altsetting, and enable endpoints of currently selected altsetting, which reduces amount of boilerplate code in USB functions. We also calculate index of interface i

[PATCH v4 16/43] usb: gadget: composite: add usb_function_get_ep() function

2016-02-03 Thread Robert Baldyga
Introduce function returning endpoint of given index in active altsetting of specified interface. It's intended to be used in set_alt() callback to obtain endpoints of currently selected altsetting. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/composite.c | 33 +++

[PATCH v4 15/43] usb: gadget: composite: handle get_alt() automatically

2016-02-03 Thread Robert Baldyga
As now we store current altsetting number for each interface, we can handle USB_REQ_GET_INTERFACE automatically. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/composite.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/composite.c b/drivers/us

[PATCH v4 17/43] usb: gadget: composite: add usb_get_interface_id() function

2016-02-03 Thread Robert Baldyga
Introduce function returning id of interface at given index in function. The id value is equal bInterfaceNumber field in interface descriptor. This value can be useful during preparation of class or vendor specific descriptors in prep_vendor_descs() callback. It can be also necessary to handle some

[PATCH v4 09/43] usb: gadget: composite: handle function bind

2016-02-03 Thread Robert Baldyga
As now USB function supplies entity descriptors to composite in prep_descs() callback, we can perform bind inside composite framework without involving bind() callback (which now is unused and will be removed after converting all functions in kernel to new API). For now we bind each configuration

[PATCH v4 12/43] usb: gadget: composite: disable eps before calling disable() callback

2016-02-03 Thread Robert Baldyga
Changes meaning of disable() operation for functions using new API. Before calling disable() callback composite automatically disables endpoints of active altsettings of given USB function. This reduces amount of boilerplate code in USB functions. Signed-off-by: Robert Baldyga --- drivers/usb/ga

[PATCH v4 10/43] usb: gadget: composite: handle vendor descs

2016-02-03 Thread Robert Baldyga
After binding all configurations in gadget, call prep_vendor_descs() for each function which uses new API and implements this callback. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/composite.c | 31 +++ include/linux/usb/composite.h | 2 ++ 2 files changed,

[PATCH v4 08/43] usb: gadget: composite: introduce new USB function ops

2016-02-03 Thread Robert Baldyga
Introduce two new USB function operations: 1. prep_descs() prepares and assigns entity (interface and endpoint) descriptors to USB function. It's mandatory, in the new function API, as each USB function should have at least minimalistic set of entity descriptors. The minimum is single inferface wi

[PATCH v4 14/43] usb: gadget: composite: introduce clear_alt() operation

2016-02-03 Thread Robert Baldyga
Introduce clear_alt() callback, which is called when prevoiusly set altsetting is cleared. This can take place in two situations: - when another altsetting is selected, - during function disable. Thanks to symetry to set_alt(), clear_alt() simplifies managing of resources allocated in set_alt(). I

[PATCH v4 11/43] usb: gadget: composite: generate old descs for compatibility

2016-02-03 Thread Robert Baldyga
For now we generate descriptor arrays for each speed as it is done by old API functions, to allow use mixed new and old API based functions in single configurations. This will be removed after complete switch to new API. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/composite.c | 175 +++

[PATCH v4 07/43] usb: gadget: composite: add functions for descriptors handling

2016-02-03 Thread Robert Baldyga
Introduce functions and macros allowing to create and assign descriptors to function easily. Macros build structure hierarchy using pointers to USB descriptors, while functions assigning them to gadget make a deep copy. It allows for easy conversion of USB functions to make them using new descripto

[PATCH v4 06/43] usb: gadget: composite: introduce new descriptors format

2016-02-03 Thread Robert Baldyga
Introduce new structures designed to contain information about descriptors. It splits descriptors in two categories: 1. Entity descs - interface and endpoint descriptors 2. Vendor descs - all other vendor and class specific descriptors Entity descriptors are embedded in hierarchy of structures whi

[PATCH v4 03/43] usb: gadget: f_loopback: free requests in loopback_disable()

2016-02-03 Thread Robert Baldyga
USB requests in Loopback function are allocated in loopback_get_alt() function, so we prefer to free them rather in loopback_disable() than in loopback_complete() when request is completed with error. It provides better symetry in resource management and improves code readability. Signed-off-by: R

[PATCH v4 04/43] usb: gadget: configfs: fix error path

2016-02-03 Thread Robert Baldyga
As usb_gstrings_attach() failure can happen when some USB functions are are already added to some configurations (in previous loop iterations), we should always call purge_configs_funcs() to be sure that failure is be handled properly. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/configf

[PATCH v4 05/43] usb: gadget: composite: fix recursive spinlock locking

2016-02-03 Thread Robert Baldyga
Avoid recursive spinlock locking, which could occur during usb_gadget_deactivate() call. At it's execution path it could call composite_disconnect() function which locks cdev->lock, previously locked in usb_function_deactivate() to protect deactivation counter. To fix this we introduce additional

[PATCH v4 01/43] usb: gadget: f_sourcesink: make ISO altset user-selectable

2016-02-03 Thread Robert Baldyga
So far it was decided during the bind process whether is iso altsetting included to f_sourcesink function or not. This decision was based on availability of isochronous endpoints. Since we can assemble gadget driver using composite framework and configfs from many different functions, availability

[PATCH v4 00/43] usb: gadget: composite: introduce new function API

2016-02-03 Thread Robert Baldyga
Hi Felipe, Here is my new patch series doing a lot of changes in composite framework and modifying USB Function API. Some of concepts changed significantly, for example bind process is done automatically inside composite framework after collecting descriptors from all Functions. Hence bind() opera

Re: [usb-storage] Re: [PATCH 04/14] uas: lock the abort handler

2016-02-03 Thread Oliver Neukum
On Tue, 2016-01-26 at 10:28 -0500, Alan Stern wrote: > On Tue, 26 Jan 2016, Oliver Neukum wrote: > > That is problematic. The ABORT_TMF does need IO for which we need > > to wait. And if we just submit and pretend the abort worked, the tag > > will be reused. > > Perhaps we could drop the spinlock

Wakeup from USB on mx6

2016-02-03 Thread Fabio Estevam
Hi Peter, I am running imx6sl-evk with linux-next 20160203 and I am trying to make it wake up via a USB mouse click. These are the steps I am doing: - Insert the USB mouse in the USB host port: usb 1-1: new low-speed USB device number 7 using ci_hdrc input: Logitech USB Optical Mouse as

Re: Wakeup from USB on mx6

2016-02-03 Thread Fabio Estevam
On Wed, Feb 3, 2016 at 1:21 PM, Fabio Estevam wrote: > Hi Peter, > > I am running imx6sl-evk with linux-next 20160203 and I am trying to > make it wake up via a USB mouse click. > > These are the steps I am doing: > > - Insert the USB mouse in the USB host port: > &

Re: Wakeup from USB on mx6

2016-02-03 Thread Fabio Estevam
On Wed, Feb 3, 2016 at 1:21 PM, Fabio Estevam wrote: > Hi Peter, > > I am running imx6sl-evk with linux-next 20160203 and I am trying to > make it wake up via a USB mouse click. > > These are the steps I am doing: > > - Insert the USB mouse in the USB host port: > &

Re: [PATCH] usb: retry reset if a device times out

2016-02-03 Thread Alan Stern
On Wed, 3 Feb 2016, Oliver Neukum wrote: > Some devices I got show an inability to operate right after > power on if they are already connected. They are beyond recovery > if the descriptors are requested multiple times. So in case of > a timeout we rather bail early and reset again. > > This pat

Re: Wakeup from USB on mx6

2016-02-03 Thread Alan Stern
On Wed, 3 Feb 2016, Fabio Estevam wrote: > On Wed, Feb 3, 2016 at 1:21 PM, Fabio Estevam wrote: > > Hi Peter, > > > > I am running imx6sl-evk with linux-next 20160203 and I am trying to > > make it wake up via a USB mouse click. > > > > These are the ste

Re: Wakeup from USB on mx6

2016-02-03 Thread Fabio Estevam
Hi Alan, On Wed, Feb 3, 2016 at 2:29 PM, Alan Stern wrote: > It seems likely that this script does exactly the same thing that you > did before by hand. Why does one work but not the other? The script enables all of these entries: $ find /sys -name wakeup | grep usb /sys/devices/soc0/soc/2000

Re: [usb-storage] Re: [PATCH 04/14] uas: lock the abort handler

2016-02-03 Thread Alan Stern
On Wed, 3 Feb 2016, Oliver Neukum wrote: > On Tue, 2016-01-26 at 10:28 -0500, Alan Stern wrote: > > On Tue, 26 Jan 2016, Oliver Neukum wrote: > > > > That is problematic. The ABORT_TMF does need IO for which we need > > > to wait. And if we just submit and pretend the abort worked, the tag > > >

Re: Wakeup from USB on mx6

2016-02-03 Thread Alan Stern
On Wed, 3 Feb 2016, Fabio Estevam wrote: > Hi Alan, > > On Wed, Feb 3, 2016 at 2:29 PM, Alan Stern wrote: > > > It seems likely that this script does exactly the same thing that you > > did before by hand. Why does one work but not the other? > > The script enables all of these entries: > >

Re: Wakeup from USB on mx6

2016-02-03 Thread Fabio Estevam
On Wed, Feb 3, 2016 at 2:58 PM, Alan Stern wrote: > On Wed, 3 Feb 2016, Fabio Estevam wrote: > >> Hi Alan, >> >> On Wed, Feb 3, 2016 at 2:29 PM, Alan Stern wrote: >> >> > It seems likely that this script does exactly the same thing that you >> > did before by hand. Why does one work but not the

Re: USB Raw HID

2016-02-03 Thread Greg KH
On Wed, Feb 03, 2016 at 07:30:56AM +, Suresh Gupta wrote: > > > > -Original Message- > > From: Greg KH [mailto:gre...@linuxfoundation.org] > > Sent: Tuesday, February 02, 2016 10:19 PM > > To: Suresh Gupta ; suresh gupta > > > > Cc: linux-usb@vger.kernel.org > > Subject: Re: USB Raw

[PATCH for-usb-linus] xhci: harden xhci_find_next_ext_cap against device removal

2016-02-03 Thread Joe Lawrence
xhci_find_next_ext_cap doesn't check for PCI hotplug removal and may use the PCI master abort bit pattern (~0) to calculate a new PCI address offset to read/write. The has lead to reproducable crashes when testing surprise removal during device initialization on a Stratus platform, at least after

Re: [PATCH] usb: phy-am335x: clarify USB_COMMON dependency

2016-02-03 Thread Felipe Balbi
hi, Bin Liu writes: > On Wed, Jan 20, 2016 at 11:56:34AM +0100, Arnd Bergmann wrote: >> The phy-am335x driver accidentally selects 'USB_COMMON', which is >> not correct as that symbol should indicate whether USB host or >> target mode is enabled, but it might not: >> >> warning: (AM335X_PHY_USB

Re: [PATCH 1/2] usb: phy: mxs: declare variable with initialized value

2016-02-03 Thread Felipe Balbi
Hi, Li Jun writes: > Initialize vbus_value to be 0 since it's possible not to assign > any value before judgement. > > Signed-off-by: Li Jun > --- > drivers/usb/phy/phy-mxs-usb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/us

RE: [PATCH v3] usb: dwc3: gadget: set the OTG flag in dwc3 gadget driver.

2016-02-03 Thread Felipe Balbi
Hi, (please, never top-post) "Tang, Jianqiang" writes: > Hi Balbi, > Any update/response about this patch? > > Please tell me if patch v3 is ok for you, if not, I can modify and > upload again base on your comments. Thanks! Still going through my queue. -- balbi signature.asc Desc

Re: [PATCH 0/7] USB changes for rare warnings

2016-02-03 Thread Felipe Balbi
Hi Arnd, Arnd Bergmann writes: > Hi Felipe, > > This set of patches addresses warnings I got in randconfig builds, > in the USB drivers. The first three patches are for the pxa25x > UDC driver and are a larger scale cleanup triggered by finding > the initial bug. The other four are relatively si

Re: [PATCH v2 0/2] usb: dwc2: Fix regressions on bcm2835

2016-02-03 Thread Felipe Balbi
Hi, John Youn writes: > On 1/26/2016 8:14 AM, Doug Anderson wrote: >> Hi, >> >> On Thu, Jan 21, 2016 at 3:28 PM, Heiko Stuebner wrote: >>> Am Montag, 11. Januar 2016, 16:32:00 schrieb John Youn: This series fixes a couple regressions reported on Raspberry Pi. >>> >>> same regressions (Isa

Re: [PATCH 1/3] usb: phy: generic: use forward declarations instead of #includes

2016-02-03 Thread Felipe Balbi
Bjorn Helgaas writes: > In include/linux/usb/usb_phy_generic.h, use a forward declaration for > struct gpio_desc instead of including linux/gpio/consumer.h. > > Of the files that include usb_phy_generic.h, only > drivers/usb/phy/phy-generic.c uses the gpiod_*() interfaces from > linux/gpio/consume

Re: [PATCH v6 0/22] usb: dwc2: host: Fix and speed up all the stuff, especially with splits

2016-02-03 Thread Doug Anderson
John, On Tue, Feb 2, 2016 at 3:57 PM, John Youn wrote: > On 1/28/2016 6:20 PM, Douglas Anderson wrote: >> This is a bit of catchall series for all the bug fix and performance >> patches I've been working on over the last few months. Note that for >> dwc2 we need to do LOTS in software and need s

[PATCH] MAINTAINERS: fix my email address

2016-02-03 Thread Felipe Balbi
As I'm not working for Texas Instruments anymore, ba...@ti.com isn't a valid address. I'll be using ba...@kernel.org at least for the time being. Signed-off-by: Felipe Balbi --- MAINTAINERS | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS i

Re: [PATCH 1/3] usb: phy: generic: use forward declarations instead of #includes

2016-02-03 Thread Bjorn Helgaas
[-cc Mark] On Wed, Feb 03, 2016 at 08:18:02PM +0200, Felipe Balbi wrote: > Bjorn Helgaas writes: > > In include/linux/usb/usb_phy_generic.h, use a forward declaration for > > struct gpio_desc instead of including linux/gpio/consumer.h. > > > > Of the files that include usb_phy_generic.h, only > >

Re: [PATCH 0/7] USB changes for rare warnings

2016-02-03 Thread Robert Jarzmik
Felipe Balbi writes: > Hi Arnd, > >> arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h | 198 - >> arch/arm/mach-pxa/include/mach/pxa25x-udc.h | 163 > > for arch/arm I need Acked-by from relevant folks. You already have mine for arch/arm/mach-pxa/include/mach/pxa25x-udc.h I th

Re: [PATCH v6 17/22] usb: dwc2: host: Manage frame nums better in scheduler

2016-02-03 Thread Doug Anderson
Hi, On Thu, Jan 28, 2016 at 6:20 PM, Douglas Anderson wrote: > static void dwc2_qh_init(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, > struct dwc2_hcd_urb *urb) > { > @@ -569,11 +655,6 @@ static void dwc2_qh_init(struct dwc2_hsotg *hsotg, > struct dwc2_qh *qh, >

Re: [PATCH 0/7] USB changes for rare warnings

2016-02-03 Thread Arnd Bergmann
On Wednesday 03 February 2016 20:15:47 Robert Jarzmik wrote: > Felipe Balbi writes: > > > Hi Arnd, > > > >> arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h | 198 - > >> arch/arm/mach-pxa/include/mach/pxa25x-udc.h | 163 > > > > for arch/arm I need Acked-by from relevant folk

Re: [PATCH] usb: retry reset if a device times out

2016-02-03 Thread Oliver Neukum
On Wed, 2016-02-03 at 11:24 -0500, Alan Stern wrote: > On Wed, 3 Feb 2016, Oliver Neukum wrote: > > > Some devices I got show an inability to operate right after > > power on if they are already connected. They are beyond recovery > > if the descriptors are requested multiple times. So in case of

Re: [PATCH] usb: phy-am335x: clarify USB_COMMON dependency

2016-02-03 Thread Arnd Bergmann
On Wednesday 03 February 2016 19:54:02 Felipe Balbi wrote: > > hi, > > Bin Liu writes: > > On Wed, Jan 20, 2016 at 11:56:34AM +0100, Arnd Bergmann wrote: > >> The phy-am335x driver accidentally selects 'USB_COMMON', which is > >> not correct as that symbol should indicate whether USB host or > >

Re: [PATCH v2] Add support for usbfs zerocopy.

2016-02-03 Thread Greg Kroah-Hartman
On Mon, Jan 25, 2016 at 09:03:57AM +0100, Steinar H. Gunderson wrote: > On Sun, Jan 24, 2016 at 01:12:08PM -0800, Greg Kroah-Hartman wrote: > > Something is really wrong with your email client, it is saying this is > > sent on Nov 26, the same exact time as your previous patch, yet you sent > > thi

Re: [PATCH RESEND 2/3] usb: core: rename mutex usb_bus_list_lock to usb_bus_idr_lock

2016-02-03 Thread Greg Kroah-Hartman
On Mon, Jan 25, 2016 at 08:31:21PM +0100, Heiner Kallweit wrote: > Now that usb_bus_list has been removed and switched to idr > rename the related mutex accordingly. > > Signed-off-by: Heiner Kallweit > --- > drivers/usb/core/devices.c | 6 +++--- > drivers/usb/core/hcd.c | 30 +

Re: [PATCH v6 03/12] usb: dbc: probe and setup xhci debug capability

2016-02-03 Thread Greg Kroah-Hartman
On Tue, Jan 26, 2016 at 06:27:47PM +0800, Lu Baolu wrote: > > > On 01/26/2016 03:36 PM, Greg Kroah-Hartman wrote: > > On Tue, Jan 26, 2016 at 12:14:16PM +0800, Lu Baolu wrote: > >> xHCI debug capability (DbC) is an optional functionality provided > >> by an xHCI host controller. Software learns t

Re: [PATCH v7 00/10] usb: early: add support for early printk through USB3 debug port

2016-02-03 Thread Greg Kroah-Hartman
On Tue, Feb 02, 2016 at 10:34:34PM +0800, Lu Baolu wrote: > > > On 01/26/2016 08:58 PM, Lu Baolu wrote: > > Hi, > > > > This patch series adds support for early printk through USB3 debug port. > > USB3 debug port is described in xHCI specification as an optional extended > > capability. > > > > P

Re: [PATCH] MAINTAINERS: fix my email address

2016-02-03 Thread Greg KH
On Wed, Feb 03, 2016 at 08:31:24PM +0200, Felipe Balbi wrote: > As I'm not working for Texas Instruments anymore, > ba...@ti.com isn't a valid address. I'll be using > ba...@kernel.org at least for the time being. > > Signed-off-by: Felipe Balbi Acked-by: Greg Kroah-Hartman -- To unsubscribe fr

Re: [PATCH for-usb-linus] xhci: harden xhci_find_next_ext_cap against device removal

2016-02-03 Thread Greg Kroah-Hartman
On Wed, Feb 03, 2016 at 12:51:12PM -0500, Joe Lawrence wrote: > xhci_find_next_ext_cap doesn't check for PCI hotplug removal and may use > the PCI master abort bit pattern (~0) to calculate a new PCI address > offset to read/write. The has lead to reproducable crashes when testing > surprise remov

Re: [PATCH] usb: phy-am335x: clarify USB_COMMON dependency

2016-02-03 Thread Felipe Balbi
Hi, Arnd Bergmann writes: >> > On Wed, Jan 20, 2016 at 11:56:34AM +0100, Arnd Bergmann wrote: >> >> The phy-am335x driver accidentally selects 'USB_COMMON', which is >> >> not correct as that symbol should indicate whether USB host or >> >> target mode is enabled, but it might not: >> >> >> >>

[PATCH v4] Add support for usbfs zerocopy.

2016-02-03 Thread Steinar H. Gunderson
Add a new interface for userspace to preallocate memory that can be used with usbfs. This gives two primary benefits: - Zerocopy; data no longer needs to be copied between the userspace and the kernel, but can instead be read directly by the driver from userspace's buffers. This works for a

Re: [PATCH v2] Add support for usbfs zerocopy.

2016-02-03 Thread Steinar H. Gunderson
On Wed, Feb 03, 2016 at 01:23:17PM -0800, Greg Kroah-Hartman wrote: > Attachments don't work, you know better than that :( Since I've now been bitten by this several times: Is there any sort of best practice for integrating git with MUAs? What I'm doing right now is cut-and-paste from mutt to get

Re: [PATCH v2] Add support for usbfs zerocopy.

2016-02-03 Thread Felipe Balbi
"Steinar H. Gunderson" writes: > On Wed, Feb 03, 2016 at 01:23:17PM -0800, Greg Kroah-Hartman wrote: >> Attachments don't work, you know better than that :( > > Since I've now been bitten by this several times: Is there any sort of best > practice for integrating git with MUAs? What I'm doing rig

Re: [PATCH RESEND 2/3] usb: core: rename mutex usb_bus_list_lock to usb_bus_idr_lock

2016-02-03 Thread Heiner Kallweit
Am 03.02.2016 um 22:28 schrieb Greg Kroah-Hartman: > On Mon, Jan 25, 2016 at 08:31:21PM +0100, Heiner Kallweit wrote: >> Now that usb_bus_list has been removed and switched to idr >> rename the related mutex accordingly. >> >> Signed-off-by: Heiner Kallweit >> --- >> drivers/usb/core/devices.c |

[PATCH RESEND2 3/3] usb: r8a66597: add locking to r8a66597_check_detect_child

2016-02-03 Thread Heiner Kallweit
Use mutex usb_bus_idr_lock to protect idr_find. Signed-off-by: Heiner Kallweit --- drivers/usb/host/r8a66597-hcd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index 1ef8873..bfa7fa3 100644 --- a/drivers/usb/host/r8a66597

[PATCH RESEND2 2/3] usb: core: rename mutex usb_bus_list_lock to usb_bus_idr_lock

2016-02-03 Thread Heiner Kallweit
Now that usb_bus_list has been removed and switched to idr rename the related mutex accordingly. Signed-off-by: Heiner Kallweit --- drivers/usb/core/devices.c | 6 +++--- drivers/usb/core/hcd.c | 30 +++--- drivers/usb/core/hub.c | 4 ++-- drivers/usb/mon/mon_ma

Multiple Digi Edgeport devices on CentOS 7

2016-02-03 Thread Howard Lum (holum)
When I connect a single Digi Edgeport device to CentOS 7, I get /dev/ttyUSB0-7 and I can access all eight ports in order. When I connect a second Edgeport device, the ports are mixed up and not all are accessible. How can I fix this? Howard -- To unsubscribe from this list: send the line "unsubs

Re: [PATCH 19/19] usb: dwc3: Enable SuperSpeedPlus

2016-02-03 Thread John Youn
On 2/2/2016 6:01 AM, Sergei Shtylyov wrote: > Hello. > > On 2/2/2016 4:42 AM, John Youn wrote: > >> Enable SuperSpeedPlus by programming the DCFG.speed and after >> enumerating, set gadget->speed appropriately. >> >> Signed-off-by: John Youn >> --- >> drivers/usb/dwc3/gadget.c | 14 +++

Re: [PATCH v2] Add support for usbfs zerocopy.

2016-02-03 Thread Steinar H. Gunderson
On Thu, Feb 04, 2016 at 12:15:50AM +0200, Felipe Balbi wrote: >> Since I've now been bitten by this several times: Is there any sort of best >> practice for integrating git with MUAs? What I'm doing right now is >> cut-and-paste from mutt to get the to/cc/in-reply-to headers right, and >> that's su

[PATCH] usb: rework CONFIG_USB_COMMON logic

2016-02-03 Thread Arnd Bergmann
The phy-am335x driver selects 'USB_COMMON', but all other drivers use 'depends on' for that symbol, and it depends on USB || USB_GADGET itself, which causes a Kconfig warning: warning: (AM335X_PHY_USB) selects USB_COMMON which has unmet direct dependencies (USB_SUPPORT && (USB || USB_GADGET)) As

Re: [PATCH v7 00/10] usb: early: add support for early printk through USB3 debug port

2016-02-03 Thread Lu Baolu
On 02/04/2016 05:43 AM, Greg Kroah-Hartman wrote: > On Tue, Feb 02, 2016 at 10:34:34PM +0800, Lu Baolu wrote: >> >> On 01/26/2016 08:58 PM, Lu Baolu wrote: >>> Hi, >>> >>> This patch series adds support for early printk through USB3 debug port. >>> USB3 debug port is described in xHCI specificati

Re: [PATCH v7 00/10] usb: early: add support for early printk through USB3 debug port

2016-02-03 Thread Lu Baolu
Hi Mathias, Greg is asking for your ack for these patches. Can you please help to take a look? Thanks, Baolu On 02/04/2016 05:43 AM, Greg Kroah-Hartman wrote: > On Tue, Feb 02, 2016 at 10:34:34PM +0800, Lu Baolu wrote: >> >> On 01/26/2016 08:58 PM, Lu Baolu wrote: >>> Hi, >>> >>> This patch seri

  1   2   >