Re: [PATCH 3/3] usb: dwc3: pci: code cleanup

2015-01-13 Thread Huang Rui
On Tue, Jan 13, 2015 at 10:20:34AM -0600, Felipe Balbi wrote: On Tue, Jan 13, 2015 at 02:12:00PM +0800, Huang Rui wrote: On Mon, Jan 12, 2015 at 02:20:14PM +0200, Heikki Krogerus wrote: Removing a few items that are not needed anymore and adding separate function for quirks.

BUG: xhci_queue_new_dequeue_state dereference a NULL pointer

2015-01-13 Thread c-aries
I have an x86 PC, it oops, and I took a screenshot: http://babyaries.org/mirror/picture/2015-01-13-165845_1600x900_scrot.png Then I browsed the xhci source code, compared with the oops machine code: http://babyaries.org/mirror/picture/2015-01-14-113248_1600x900_scrot.png I found that it's

Re: [PATCH] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-13 Thread Robert Baldyga
On 01/13/2015 10:12 PM, Paul Zimmerman wrote: From: Robert Baldyga [mailto:r.bald...@samsung.com] Sent: Tuesday, January 13, 2015 2:58 AM This patch fixes bug described here: https://lkml.org/lkml/2014/12/22/185 Signed-off-by: Robert Baldyga r.bald...@samsung.com ---

Re: [PATCH 05/11] usb: gadget: at91_udc: Remove non-DT handling code

2015-01-13 Thread Felipe Balbi
On Tue, Jan 13, 2015 at 07:05:26PM +0100, Alexandre Belloni wrote: Hi, On 13/01/2015 at 10:36:54 -0600, Felipe Balbi wrote : I've rebased that patch series but it depends on another one (the mfd: syscon: part of memory: add Atmel EBI (External Bus Interface) driver) that is not taken

Re: [PATCH 05/11] usb: gadget: at91_udc: Remove non-DT handling code

2015-01-13 Thread Alexandre Belloni
Hi, On 13/01/2015 at 10:36:54 -0600, Felipe Balbi wrote : I've rebased that patch series but it depends on another one (the mfd: syscon: part of memory: add Atmel EBI (External Bus Interface) driver) that is not taken yet so applying it now will break the build. I still hope to get it

[PATCH] drivers/usb/serial/mos7840.c: remove unused code

2015-01-13 Thread Colin King
From: Colin Ian King colin.k...@canonical.com There is old, unused code that is #defined out by the use of NOTMOS7840 - this is not defined anywhere. If NOTMOS7840 is defined then the code will break on null pointer dereferences on mos7840_port. So the code is currently unused, and broken

Re: [RESEND PATCH] usb: gadget: at91_udc: move prepare clk into process context

2015-01-13 Thread Kamal Mostafa
On Fri, 2014-12-19 at 13:51 +, Luis Henriques wrote: Hi Felipe, On Thu, Nov 20, 2014 at 01:50:49PM -0600, Felipe Balbi wrote: On Wed, Nov 19, 2014 at 04:37:27PM +0100, Nicolas Ferre wrote: From: Ronald Wahl ronald.w...@raritan.com Commit 7628083227b6bc4a7e33d7c381d7a4e558424b6b

[PATCH v2] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-13 Thread Robert Baldyga
This patch fixes bug described here: https://lkml.org/lkml/2014/12/22/185 Signed-off-by: Robert Baldyga r.bald...@samsung.com --- Changelog: v2: - fixed comment from Paul Zimmerman v1: https://lkml.org/lkml/2015/1/13/186 drivers/usb/dwc2/core_intr.c | 6 +++--- 1 file changed, 3

Re: f_hid, f_mass_storage, and f_rdnis via configfs on platform/intel-mid

2015-01-13 Thread Felipe Balbi
On Tue, Jan 13, 2015 at 11:46:11AM -0800, Chris McClimans wrote: Thanks for all the direction and feedback thus far, configfs is the way to go but I would need f_hid, f_mass_storage, and f_rdnis which aren't available in v3.10. Configfs f_hid is relatively recent, then you need to backport

f_hid, f_mass_storage, and f_rdnis via configfs on platform/intel-mid

2015-01-13 Thread Chris McClimans
Thanks for all the direction and feedback thus far, configfs is the way to go but I would need f_hid, f_mass_storage, and f_rdnis which aren't available in v3.10. Configfs f_hid is relatively recent, f_rndis + f_mass_storage where merged into v3.11, but similar functions actual entered the kernel

Re: [PATCH v2 2/4] usb: udc: add udc_driver_find_udc

2015-01-13 Thread Peter Chen
On Tue, Jan 13, 2015 at 10:13:32AM -0500, Alan Stern wrote: On Tue, 13 Jan 2015, Peter Chen wrote: This is an internal API, it can be used to find corresponding udc according to usb_gadget_driver. Signed-off-by: Peter Chen peter.c...@freescale.com ---

Re: [PATCH v3 3/3] usb: phy: hold wakeupsource when USB is enumerated in peripheral mode

2015-01-13 Thread Peter Chen
On Tue, Jan 13, 2015 at 10:18:02AM -0600, Felipe Balbi wrote: On Tue, Jan 13, 2015 at 04:02:20PM +0530, Kiran Raparthy wrote: Hi Felipe, On 1 December 2014 at 11:09, Kiran Raparthy kiran.ku...@linaro.org wrote: Hi Felipe, On 25 November 2014 at 20:15, Felipe Balbi ba...@ti.com

[PATCH RESEND(2) 0/2] usb: dwc3: gadget: Bug fixes

2015-01-13 Thread Amit Virdi
This is a re-submission of patches [1/4] and [2/4] from: http://www.spinics.net/lists/linux-usb/msg118841.html Commit log of both these patches has been modified for aided clarity. These patches have been rebased on Balbi's testing/next. Patches [3/4] and [4/4] were accepted as they

[PATCH next] usb: gadget: uvc: to_uvcg_control_header() can be static

2015-01-13 Thread kbuild test robot
drivers/usb/gadget/function/uvc_configfs.c:46:28: sparse: symbol 'to_uvcg_control_header' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:138:25: sparse: symbol 'uvcg_control_header_type' was not declared. Should it be static?

[next:master 2818/3104] drivers/usb/gadget/function/f_uvc.c:816:41: sparse: incorrect type in assignment (different base types)

2015-01-13 Thread kbuild test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 8fb4ab29bd8400e0060662208573d26b9d91656d commit: 46919a23ee87bbc4eeb6d958471174e26836f0e1 [2818/3104] usb: gadget: uvc: configfs support in uvc function reproduce: # apt-get install sparse git checkout

[PATCH RESEND(2) 2/2] usb: dwc3: gadget: Stop TRB preparation after limit is reached

2015-01-13 Thread Amit Virdi
DWC3 gadget sets up a pool of 32 TRBs for each EP during initialization. This means, the max TRBs that can be submitted for an EP is fixed to 32. Since the request queue for an EP is a linked list, any number of requests can be queued to it by the gadget layer. However, the dwc3 driver must not

[PATCH RESEND(2) 1/2] usb: dwc3: gadget: Fix TRB preparation during SG

2015-01-13 Thread Amit Virdi
When scatter gather (SG) is used, multiple TRBs are prepared from one DWC3 request (dwc3_request). So while preparing TRBs, the 'last' flag should be set only when it is the last TRB being prepared from the last dwc3_request entry. The current implementation uses list_is_last to check if the

Re: [PATCH RESEND 0/2] usb: dwc3: gadget: Bug fixes

2015-01-13 Thread Amit Virdi
On 1/13/2015 12:10 PM, Amit VIRDI wrote: This is a re-submission of patches [1/4] and [2/4] from: http://www.spinics.net/lists/linux-usb/msg118841.html Commit log of both these patches has been modified for aided clarity. These patches have been rebased on Balbi's testing/next. Patches

[PATCH v2 0/4] usb: udc: Unify dp control

2015-01-13 Thread Peter Chen
Hi Felipe, This is the follow-up: http://marc.info/?l=linux-usbm=140979297227434w=2. Sorry for late. In the first two patches, we introduce two internal APIs which are used to find corresponding udc according to usb_gadget or usb_gadget_driver, it can simplify the code structure. In the 3rd

[PATCH] usb: phy: mv-usb: fix usb_phy build errors

2015-01-13 Thread Arnd Bergmann
The driver was recently adapted to a core API change, but the change was incomplete, missing out the suspend helper and leaving an extraneous local variable around: usb/phy/phy-mv-usb.c: In function 'mv_otg_update_state': usb/phy/phy-mv-usb.c:341:18: warning: unused variable 'phy'

Re: [PATCH v3 0/4] scsi: ufs ums-* esp_scsi: fix module reference counting

2015-01-13 Thread Akinobu Mita
2015-01-12 18:36 GMT+09:00 Christoph Hellwig h...@lst.de: On Sun, Jan 11, 2015 at 10:50:02PM +0900, Akinobu Mita wrote: While accessing a scsi_device, the use count of the underlying LLDD module is incremented. The module reference is retrieved through .module field of struct

[PATCH] tools: ffs-aio-example: use endpoint addresses from descriptors

2015-01-13 Thread Robert Baldyga
This makes examples more platform independent and more compatible with USB standard, as endpoint addresses in given interface may differ between hardware platforms or even between configurations in single USB device. Signed-off-by: Robert Baldyga r.bald...@samsung.com ---

[PATCH v2 3/4] usb: udc: add usb_udc_vbus_handler

2015-01-13 Thread Peter Chen
This commit updates udc core vbus status, and try to connect or disconnect gadget. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/gadget/udc/udc-core.c | 34 +- include/linux/usb/gadget.h| 4 2 files changed, 37 insertions(+), 1

[PATCH v2 2/4] usb: udc: add udc_driver_find_udc

2015-01-13 Thread Peter Chen
This is an internal API, it can be used to find corresponding udc according to usb_gadget_driver. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/gadget/udc/udc-core.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git

[PATCH v2 4/4] usb: udc: add usb_udc_activation_handler

2015-01-13 Thread Peter Chen
During this API, the deactivation count will be update, and it will try to connect or disconnect gadget. It can be used to enable functions for gadget. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/gadget/udc/udc-core.c | 28 +++-

[PATCH v2 1/4] usb: udc: add usb_gadget_find_udc

2015-01-13 Thread Peter Chen
This is an internal API, and is used to find corresponding udc according to gadget. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/gadget/udc/udc-core.c | 51 +++ 1 file changed, 25 insertions(+), 26 deletions(-) diff --git

Re: [PATCH v7 3/5] usb: dwc2: add generic PHY framework support for dwc2 usb controler platform driver.

2015-01-13 Thread Robert Jarzmik
Paul Zimmerman paul.zimmer...@synopsys.com writes: The patch below fixes it. And it seems like the right thing to me, since GPIOs should be optional for a generic phy, I would think. But my device tree foo is very weak, so I'm not sure. CCing Robert, who touched the generic phy code last.

RE: [PATCH v2 1/4] usb: udc: add usb_gadget_find_udc

2015-01-13 Thread Peter Chen
@@ -348,23 +356,14 @@ static void usb_gadget_remove_driver(struct usb_udc *udc) */ void usb_del_gadget_udc(struct usb_gadget *gadget) { - struct usb_udc *udc = NULL; - - mutex_lock(udc_lock); - list_for_each_entry(udc, udc_list, list) - if

Re: [PATCH v2 1/4] usb: udc: add usb_gadget_find_udc

2015-01-13 Thread Alexander Shishkin
Peter Chen peter.c...@freescale.com writes: @@ -348,23 +356,14 @@ static void usb_gadget_remove_driver(struct usb_udc *udc) */ void usb_del_gadget_udc(struct usb_gadget *gadget) { - struct usb_udc *udc = NULL; - - mutex_lock(udc_lock); - list_for_each_entry(udc,

Re: dwc2: problems with IN requests completion in linux-next

2015-01-13 Thread Robert Baldyga
On 01/13/2015 11:18 AM, Robert Baldyga wrote: On 01/12/2015 10:35 PM, Paul Zimmerman wrote: From: Robert Baldyga [mailto:r.bald...@samsung.com] Sent: Monday, December 22, 2014 6:13 AM I have recently noticed problem with DWC2 driver in latest linux-next. I use it in gadget only mode at

[PATCH] usb/gadget/net2280: Dont use 0 as NULL pointer

2015-01-13 Thread Ricardo Ribalda Delgado
Fix sparse warning Fixes: cb442ee1592d2681 (usb: gadget: udc: net2280: Re-enable dynamic debug messages) Reported-by: kbuild test robot fengguang...@intel.com Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/usb/gadget/udc/net2280.c | 2 +- 1 file changed, 1

Re: dwc2: problems with IN requests completion in linux-next

2015-01-13 Thread Robert Baldyga
On 01/12/2015 10:35 PM, Paul Zimmerman wrote: From: Robert Baldyga [mailto:r.bald...@samsung.com] Sent: Monday, December 22, 2014 6:13 AM I have recently noticed problem with DWC2 driver in latest linux-next. I use it in gadget only mode at Samsung platform (Odroid U3) but I believe the bug

Re: [PATCH v3 3/3] usb: phy: hold wakeupsource when USB is enumerated in peripheral mode

2015-01-13 Thread Kiran Raparthy
Hi Felipe, On 1 December 2014 at 11:09, Kiran Raparthy kiran.ku...@linaro.org wrote: Hi Felipe, On 25 November 2014 at 20:15, Felipe Balbi ba...@ti.com wrote: On Tue, Nov 25, 2014 at 07:06:18AM +, Peter Chen wrote: usb: phy: hold wakeupsource when USB is enumerated in peripheral mode

[PATCH] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-13 Thread Robert Baldyga
This patch fixes bug described here: https://lkml.org/lkml/2014/12/22/185 Signed-off-by: Robert Baldyga r.bald...@samsung.com --- drivers/usb/dwc2/core_intr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c index

[PATCH net-next] r8152: replace tasklet with NAPI

2015-01-13 Thread Hayes Wang
Replace tasklet with NAPI. Add rx_queue to queue the remaining rx packets if the number of the rx packets is more than the request from poll(). Signed-off-by: Hayes Wang hayesw...@realtek.com --- drivers/net/usb/r8152.c | 120 ++-- 1 file changed, 85

Re: [PATCH next] usb: gadget: uvc: to_uvcg_control_header() can be static

2015-01-13 Thread Andrzej Pietrasiewicz
W dniu 13.01.2015 o 09:55, kbuild test robot pisze: drivers/usb/gadget/function/uvc_configfs.c:46:28: sparse: symbol 'to_uvcg_control_header' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:138:25: sparse: symbol 'uvcg_control_header_type' was not declared.

Is g_multi with g_hid possible?

2015-01-13 Thread Chris McClimans
Is it possible to appear as a USB gadget hid (kb + mouse), mass_storage, and ethernet at the same time? My goal is to try and create a device that when attached during boot to a PC would be able to send keys as a hid keyboard to select booting from a USB mass storage. Booting from the mass

Re: [PATCH v7 3/5] usb: dwc2: add generic PHY framework support for dwc2 usb controler platform driver.

2015-01-13 Thread Felipe Balbi
On Tue, Jan 13, 2015 at 10:35:52AM +0100, Robert Jarzmik wrote: Paul Zimmerman paul.zimmer...@synopsys.com writes: The patch below fixes it. And it seems like the right thing to me, since GPIOs should be optional for a generic phy, I would think. But my device tree foo is very weak, so I'm

Re: [PATCH 1/4] usb: gadget: u_uac1: fix build issue

2015-01-13 Thread Felipe Balbi
Hi, On Tue, Jan 13, 2015 at 06:51:40AM +, Peter Chen wrote: See below error message: CC [M] drivers/gpu/drm/nouveau/core/subdev/vm/nv50.o CC [M] drivers/staging/lustre/lnet/selftest/module.o drivers/usb/gadget/function/f_uac1.c: In function ‘f_audio_free_inst’:

Re: Is g_multi with g_hid possible?

2015-01-13 Thread Felipe Balbi
Hi, On Tue, Jan 13, 2015 at 07:05:37AM -0800, Chris McClimans wrote: Is it possible to appear as a USB gadget hid (kb + mouse), mass_storage, and ethernet at the same time? yes, that's called a composite device. My goal is to try and create a device that when attached during boot to a PC

Re: [PATCH v2 2/4] usb: udc: add udc_driver_find_udc

2015-01-13 Thread Alan Stern
On Tue, 13 Jan 2015, Peter Chen wrote: This is an internal API, it can be used to find corresponding udc according to usb_gadget_driver. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/gadget/udc/udc-core.c | 33 +++-- 1 file changed, 23

Re: [PATCH v3 3/3] usb: phy: hold wakeupsource when USB is enumerated in peripheral mode

2015-01-13 Thread Felipe Balbi
On Tue, Jan 13, 2015 at 04:02:20PM +0530, Kiran Raparthy wrote: Hi Felipe, On 1 December 2014 at 11:09, Kiran Raparthy kiran.ku...@linaro.org wrote: Hi Felipe, On 25 November 2014 at 20:15, Felipe Balbi ba...@ti.com wrote: On Tue, Nov 25, 2014 at 07:06:18AM +, Peter Chen wrote:

Re: [PATCH 3/3] usb: dwc3: pci: code cleanup

2015-01-13 Thread Felipe Balbi
On Tue, Jan 13, 2015 at 02:12:00PM +0800, Huang Rui wrote: On Mon, Jan 12, 2015 at 02:20:14PM +0200, Heikki Krogerus wrote: Removing a few items that are not needed anymore and adding separate function for quirks. Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com Cc: Huang

Re: Is g_multi with g_hid possible?

2015-01-13 Thread Andrzej Pietrasiewicz
W dniu 13.01.2015 o 16:10, Felipe Balbi pisze: Hi, On Tue, Jan 13, 2015 at 07:05:37AM -0800, Chris McClimans wrote: Is it possible to appear as a USB gadget hid (kb + mouse), mass_storage, and ethernet at the same time? yes, that's called a composite device. My goal is to try and create a

Re: [PATCH 2/4] usb: dwc3: gadget: Stop TRB preparation after limit is reached

2015-01-13 Thread Felipe Balbi
Hi, On Tue, Jan 13, 2015 at 10:18:20AM +0530, Amit Virdi wrote: On 1/13/2015 12:04 AM, Felipe Balbi wrote: Hi, On Tue, Jan 06, 2015 at 11:44:23AM +0530, Amit Virdi wrote: I can certainly provide the dwc3 specific kernel bootup logs, full regdump and any loglevel you want me to, if that

Re: Is g_multi with g_hid possible?

2015-01-13 Thread Felipe Balbi
On Tue, Jan 13, 2015 at 05:26:34PM +0100, Andrzej Pietrasiewicz wrote: W dniu 13.01.2015 o 16:10, Felipe Balbi pisze: Hi, On Tue, Jan 13, 2015 at 07:05:37AM -0800, Chris McClimans wrote: Is it possible to appear as a USB gadget hid (kb + mouse), mass_storage, and ethernet at the same time?

Re: [PATCH v5] usb: gadget: f_fs: add no_disconnect mode

2015-01-13 Thread Felipe Balbi
Hi, On Thu, Dec 18, 2014 at 09:55:10AM +0100, Robert Baldyga wrote: Since we can compose gadgets from many functions, there is the problem related to gadget breakage while FunctionFS daemon being closed. FFS function is userspace code so there is no way to know when it will close files (it

Re: [PATCH 05/11] usb: gadget: at91_udc: Remove non-DT handling code

2015-01-13 Thread Felipe Balbi
Hi, On Mon, Jan 12, 2015 at 11:53:30PM +0100, Alexandre Belloni wrote: Hi Felipe, I've rebased that patch series but it depends on another one (the mfd: syscon: part of memory: add Atmel EBI (External Bus Interface) driver) that is not taken yet so applying it now will break the build. I

Re: [RFC PATCH] usb: gadget: composite: Provide list of registered functions

2015-01-13 Thread Felipe Balbi
Hi, On Thu, Nov 06, 2014 at 10:08:55AM +0100, Krzysztof Opasiak wrote: From: Felipe Balbi [mailto:ba...@ti.com] Sent: Wednesday, November 05, 2014 8:43 PM To: Krzysztof Opasiak Cc: ba...@ti.com; gre...@linuxfoundation.org; bige...@breakpoint.cc; linux-usb@vger.kernel.org;

RE: [PATCH] usb: dwc2: call dwc2_is_controller_alive() under spinlock

2015-01-13 Thread Paul Zimmerman
From: Robert Baldyga [mailto:r.bald...@samsung.com] Sent: Tuesday, January 13, 2015 2:58 AM This patch fixes bug described here: https://lkml.org/lkml/2014/12/22/185 Signed-off-by: Robert Baldyga r.bald...@samsung.com --- drivers/usb/dwc2/core_intr.c | 4 ++-- 1 file changed, 2