Re: [PATCH 1/3] avr32: fix build failure

2015-09-21 Thread Hans-Christian Egtvedt
Around Sat 19 Sep 2015 22:42:57 +0530 or thereabout, Sudip Mukherjee wrote: > While building avr32 with allmodconfig, the build used to fail with the > message: > error: implicit declaration of function 'pci_iomap' > error: implicit declaration of function 'pci_iounmap' What has changed recently

Re: [PATCH 1/3] avr32: fix build failure

2015-09-21 Thread Sudip Mukherjee
On Mon, Sep 21, 2015 at 08:09:42AM +0200, Hans-Christian Egtvedt wrote: > Around Sat 19 Sep 2015 22:42:57 +0530 or thereabout, Sudip Mukherjee wrote: > > While building avr32 with allmodconfig, the build used to fail with the > > message: > > error: implicit declaration of function 'pci_iomap' > >

Re: [PATCH 1/5] usb: common: of_usb_get_maximum_speed to usb_get_maximum_speed

2015-09-21 Thread Heikki Krogerus
On Fri, Sep 18, 2015 at 02:42:15PM -0500, Felipe Balbi wrote: > On Tue, Aug 25, 2015 at 02:04:31PM +0300, Heikki Krogerus wrote: > > By using the unified device property interface, the function > > can be made available for all platforms and not just the > > ones using DT. > > > > Signed-off-by:

Re: [PATCH 2/2] usb: gadget: f_midi: check for error on usb_ep_queue

2015-09-21 Thread Peter Chen
On Fri, Sep 18, 2015 at 06:12:41PM +0100, e...@felipetonello.com wrote: > From: "Felipe F. Tonello" > > f_midi is not checking weather the is an error on usb_ep_queue %s/weather/whether %s/the/there > request, ignoring potential problems, such as memory leaks. > >

Re: [PATCH 1/2] usb: chipidea: udc: improve error handling on ep_queue

2015-09-21 Thread Peter Chen
On Fri, Sep 18, 2015 at 06:12:40PM +0100, e...@felipetonello.com wrote: > From: "Felipe F. Tonello" > > _ep_queue() didn't check for errors when using add_td_to_list() > which can fail if dma_pool_alloc fails, thus causing a kernel Would you find the root cause why

Re: [PATCH 1/3] avr32: fix build failure

2015-09-21 Thread Sudip Mukherjee
On Mon, Sep 21, 2015 at 09:33:00AM +0200, Hans-Christian Egtvedt wrote: > Around Mon 21 Sep 2015 12:09:01 +0530 or thereabout, Sudip Mukherjee wrote: > > On Mon, Sep 21, 2015 at 08:09:42AM +0200, Hans-Christian Egtvedt wrote: > >> Around Sat 19 Sep 2015 22:42:57 +0530 or thereabout, Sudip

[PATCH] usb: dwc3: gadget: Fix BUG in RT config

2015-09-21 Thread Roger Quadros
Using spin_lock() in hard irq handler is pointless and causes a BUG() in RT (real-time) configuration so get rid of it. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/gadget.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c

[PATCHv2 1/5] usb: common: of_usb_get_maximum_speed to usb_get_maximum_speed

2015-09-21 Thread Heikki Krogerus
By using the unified device property interface, the function can be made available for all platforms and not just the ones using DT. Signed-off-by: Heikki Krogerus --- drivers/usb/chipidea/core.c | 2 +- drivers/usb/common/common.c | 44

[PATCHv2 4/5] usb: dwc3: core: convert to unified device property interface

2015-09-21 Thread Heikki Krogerus
No functional affect on existing platforms, but the driver is now ready to extract the properties also from ACPI tables as well as from DT. Signed-off-by: Heikki Krogerus --- drivers/usb/dwc3/core.c | 50 - 1 file

[PATCHv2 2/5] usb: dwc3: st: prepare the driver for generic usb_get_dr_mode function

2015-09-21 Thread Heikki Krogerus
of_usb_get_dr_mode will be converted into more generic usb_get_dr_mode function that will take struct device instead of struct device_node as it's parameter. To make the conversion possible later, waiting for the platform device for dwc3 to be populated before calling of_usb_get_dr_mode.

[PATCHv2 3/5] usb: common: of_usb_get_dr_mode to usb_get_dr_mode

2015-09-21 Thread Heikki Krogerus
By using the unified device property interface, the function can be made available for all platforms and not just the ones using DT. Signed-off-by: Heikki Krogerus --- drivers/usb/chipidea/core.c | 2 +- drivers/usb/common/common.c | 15 ---

Re: [PATCH 2/2] usb: gadget: f_midi: check for error on usb_ep_queue

2015-09-21 Thread Felipe Tonello
Hi Chen, On Mon, Sep 21, 2015 at 7:30 AM, Peter Chen wrote: > On Fri, Sep 18, 2015 at 06:12:41PM +0100, e...@felipetonello.com wrote: >> From: "Felipe F. Tonello" >> >> f_midi is not checking weather the is an error on usb_ep_queue > >

[PATCHv2 0/5] usb: common and dwc3: converting to unified device property

2015-09-21 Thread Heikki Krogerus
Hi, While converting dwc3 to the unified device property interface, I noticed that there is really nothing preventing of_usb_get_dr_mode and of_usb_get_maximum_speed from being converted as well. Hope that's OK. The only special case was dwc3-st.c, where the dr_mode is requested before the

[PATCHv2 5/5] usb: dwc3: pci: passing forward the ACPI companion

2015-09-21 Thread Heikki Krogerus
Sharing the ACPI companion with dwc3 core so it has access to the properties defined for DWC3 in ACPI tables. Signed-off-by: Heikki Krogerus --- drivers/usb/dwc3/dwc3-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c

Re: USB client crash on Vybrid with USB gadget RNDIS connection

2015-09-21 Thread Peter Chen
On Fri, Sep 18, 2015 at 10:47:17AM +0100, Felipe Tonello wrote: > Hi Peter, > > On Fri, Sep 18, 2015 at 6:39 AM, Peter Chen wrote: > > On Wed, Sep 16, 2015 at 02:48:50PM +0530, maitysancha...@gmail.com wrote: > >> On 15-09-16 15:54:21, Peter Chen wrote: > >> > On Wed,

usb: dwc3: gadget: warning on v4.3-rc1

2015-09-21 Thread Roger Quadros
Hi Felipe, I see the following warning when g_zero is loaded and USB cable is plugged to host on dra7-evm's USB1 port. It happens only once and no longer appears on re-loading gadget or plugging/unplugging cable. root@rockdesk:~# modprobe g_zero [ 28.414895] zero gadget: Gadget Zero, version:

Re: [PATCH 1/3] avr32: fix build failure

2015-09-21 Thread Hans-Christian Egtvedt
Around Mon 21 Sep 2015 12:09:01 +0530 or thereabout, Sudip Mukherjee wrote: > On Mon, Sep 21, 2015 at 08:09:42AM +0200, Hans-Christian Egtvedt wrote: >> Around Sat 19 Sep 2015 22:42:57 +0530 or thereabout, Sudip Mukherjee wrote: >> > While building avr32 with allmodconfig, the build used to fail

Re: USB client crash on Vybrid with USB gadget RNDIS connection

2015-09-21 Thread Peter Chen
On Fri, Sep 18, 2015 at 04:01:50PM +0530, maitysancha...@gmail.com wrote: > On 15-09-18 13:39:11, Peter Chen wrote: > > On Wed, Sep 16, 2015 at 02:48:50PM +0530, maitysancha...@gmail.com wrote: > > > On 15-09-16 15:54:21, Peter Chen wrote: > > > > On Wed, Sep 16, 2015 at 02:18:49PM +0530,

Re: [GIT PULL] USB fixes for v4.3-rc3

2015-09-21 Thread Greg KH
On Mon, Sep 21, 2015 at 02:51:48PM -0500, Felipe Balbi wrote: > Hi Greg, > > Here's another pull request for the current -rc cycle. It's based off of > greg/usb-linus for this cycle because the previous pull request hasn't > reached v4.3-rc2. > > This time I couldn't boot test all patches

Re: USB client crash on Vybrid with USB gadget RNDIS connection

2015-09-21 Thread Peter Chen
On Mon, Sep 21, 2015 at 06:56:34PM +0530, maitysancha...@gmail.com wrote: > On 15-09-21 14:50:18, Peter Chen wrote: > > On Fri, Sep 18, 2015 at 04:01:50PM +0530, maitysancha...@gmail.com wrote: > > > On 15-09-18 13:39:11, Peter Chen wrote: > > > > On Wed, Sep 16, 2015 at 02:48:50PM +0530,

Re: [PATCH v3 0/5] usb: change clock information for chipidea

2015-09-21 Thread Fabio Estevam
On Sun, Sep 20, 2015 at 9:43 PM, Peter Chen wrote: > This patch set changes usb clock information for legacy i.mx platforms. > At these platforms, they needs three clocks to let controller work. > > Hi Fabio, > > Would you please have a test at imx27 and imx25 boards,

Re: [PATCH 3/3] usb: gadget: f_midi: check for error on usb_ep_queue

2015-09-21 Thread Felipe Balbi
Hi, On Mon, Sep 21, 2015 at 10:21:31AM +0100, Felipe Tonello wrote: > Hi Balbi, > > On Fri, Sep 18, 2015 at 6:36 PM, wrote: > > From: "Felipe F. Tonello" > > > > f_midi is not checking whether there is an error on usb_ep_queue > > request,

Re: xHCI reports “ERROR Unknown event condition 20, HC probably busted”

2015-09-21 Thread Steinar H. Gunderson
On Mon, Sep 21, 2015 at 02:01:51PM +0300, Mathias Nyman wrote: > Now this suddenly makes more sense to me. > > Initial problem is very much related to U1 and U2 power saving states. > Either the device can't handle these states or then we set the max exit > latency values incorrectly. There's

Re: [PATCH v2 1/3] usb: of: add an api to get dr_mode by the phy node

2015-09-21 Thread Hans de Goede
Hi, On 21-09-15 09:20, Peter Chen wrote: On Tue, Sep 15, 2015 at 01:58:16PM -0500, Bin Liu wrote: Some USB phy drivers have different handling for the controller in each dr_mode. But the phy driver does not have visibility to the dr_mode of the controller. This adds an api to return the

Re: [RFT PATCH] xhci: handle no ping response error properly

2015-09-21 Thread Steinar H. Gunderson
On Mon, Sep 21, 2015 at 03:41:19PM +0300, Mathias Nyman wrote: > If a host fails to wake up a isochronous SuperSpeed device from U1/U2 > in time for a isoch transfer it will generate a "No ping response error" > Host will then move to the next transfer descriptor. > > Handle this case in the same

[PATCH 27/38] usbnet: remove invalid check

2015-09-21 Thread Andrzej Hajda
skb->len is always non-negative. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda --- drivers/net/usb/lan78xx.c

[PATCH 07/38] usb: host: ehci-msm: fix handling platform_get_irq result

2015-09-21 Thread Andrzej Hajda
The function can return negative values. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda ---

[PATCH v3 1/4] usb: dwc2: remove double call to dwc2_hsotg_of_probe

2015-09-21 Thread Marek Szyprowski
This patch removes doubled call to dwc2_hsotg_of_probe() function. Signed-off-by: Marek Szyprowski --- drivers/usb/dwc2/gadget.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index ddd14a7..410ea6e 100644 ---

Re: [PATCH 2/3] usb: gadget: at91_udc: mention proper dependency

2015-09-21 Thread Sudip Mukherjee
On Sun, Sep 20, 2015 at 11:15:28AM -0500, Felipe Balbi wrote: > On Sat, Sep 19, 2015 at 10:42:58PM +0530, Sudip Mukherjee wrote: > > While building allmodconfig on avr32 the build failed with the error: > > "at91_pmc_base" [drivers/usb/gadget/udc/atmel_usba_udc.ko] undefined! > > > > On checking

Re: [PATCH 00/38] Fixes related to incorrect usage of unsigned types

2015-09-21 Thread David Howells
Andrzej Hajda wrote: > Semantic patch finds comparisons of types: > unsigned < 0 > unsigned >= 0 > The former is always false, the latter is always true. > Such comparisons are useless, so theoretically they could be > safely removed, but their presence quite often

Re: [PATCH 0/9] xhci fixes for usb-linus, including a small usb core fix

2015-09-21 Thread Greg KH
On Mon, Sep 21, 2015 at 11:37:24AM +0300, Mathias Nyman wrote: > On 18.09.2015 19:55, Greg KH wrote: > >On Fri, Sep 18, 2015 at 05:42:04PM +0300, Mathias Nyman wrote: > >>Hi Greg > >> > >>This series contain one usb core fix that makes sure we don't > >>use bmAttribute bits that were reseved 0 in

[PATCH v3 4/4] usb: dwc2: refactor common low-level hw code to platform.c

2015-09-21 Thread Marek Szyprowski
DWC2 module on some platforms needs three additional hardware resources: phy controller, clock and power supply. All of them must be enabled/activated to properly initialize and operate. This was initially handled in s3c-hsotg driver, which has been converted to 'gadget' part of dwc2 driver.

[PATCH v3 3/4] usb: dwc2: fix unbalanced phy control

2015-09-21 Thread Marek Szyprowski
Even when DWC2 is in (internal) suspended state, it should disable PHY in suspend and then enable it in resume. This patch fixes unbalanced PHY control sequence. Signed-off-by: Marek Szyprowski --- drivers/usb/dwc2/platform.c | 2 -- 1 file changed, 2 deletions(-)

[PATCH v3 0/4] Exynos4412-based Trats2 USB gadget (DWC2) fixes

2015-09-21 Thread Marek Szyprowski
Hello, This is an updated DWC2 related part of initial patchset posted here: https://lkml.org/lkml/2015/8/21/306 Only DWC2 related patches have been modified since the initial submission. Changelog: v3: - rebased onto latest 'testing/next' from Felipe Balbi (includes s3c_hsotg -> dwc2 rename)

[PATCH v3 2/4] usb: dwc2: remove non-functional clock gating

2015-09-21 Thread Marek Szyprowski
During typical gadget operation, dwc2 clock was enabled 3 times: from dwc2_gadget_init(), dwc2_hsotg_udc_start() and dwc2_hsotg_pullup(), and then disabled in s3c_hsotg_pullup(), s3c_hsotg_udc_stop() and dwc2_hsotg_remove(). This really makes no sense, so leave clock control code only in

[RFT PATCH] xhci: handle no ping response error properly

2015-09-21 Thread Mathias Nyman
If a host fails to wake up a isochronous SuperSpeed device from U1/U2 in time for a isoch transfer it will generate a "No ping response error" Host will then move to the next transfer descriptor. Handle this case in the same way as missed service errors, tag the current TD as skipped and handle

Re: [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks

2015-09-21 Thread Sudip Mukherjee
On Sun, Sep 20, 2015 at 11:17:36AM -0500, Felipe Balbi wrote: > On Sun, Sep 20, 2015 at 01:42:42PM +0530, Sudip Mukherjee wrote: > > On Sat, Sep 19, 2015 at 09:24:38AM +0530, Sudip Mukherjee wrote: > > > On Fri, Sep 18, 2015 at 01:39:54PM -0500, Felipe Balbi wrote: > > > > On Mon, Sep 14, 2015 at

Re: USB client crash on Vybrid with USB gadget RNDIS connection

2015-09-21 Thread maitysanchayan
On 15-09-21 14:50:18, Peter Chen wrote: > On Fri, Sep 18, 2015 at 04:01:50PM +0530, maitysancha...@gmail.com wrote: > > On 15-09-18 13:39:11, Peter Chen wrote: > > > On Wed, Sep 16, 2015 at 02:48:50PM +0530, maitysancha...@gmail.com wrote: > > > > On 15-09-16 15:54:21, Peter Chen wrote: > > > > >

Re: xHCI reports “ERROR Unknown event condition 20, HC probably busted”

2015-09-21 Thread Mathias Nyman
On 20.09.2015 03:14, Steinar H. Gunderson wrote: On Mon, Aug 31, 2015 at 05:28:10PM +0300, Mathias Nyman wrote: The "ERROR Transfer event TRB DMA ptr not part of curren..." errors are a bit worrying. I was hoping these would no longer occur after the last off by one fix: commit

Re: [PATCH 3/3] page-flags: rectify forward declaration

2015-09-21 Thread Andrew Morton
On Sat, 19 Sep 2015 22:42:59 +0530 Sudip Mukherjee wrote: > compound_head is defined as inline in page-flags.h but in the forward > declaration of compound_head in the same file missed "inline". As a result > we got plenty of build warnings while building for some

Re: MIDI gadget allocating too much from coherent pool

2015-09-21 Thread Peter Chen
On Mon, Sep 21, 2015 at 03:25:28PM +0100, Felipe Tonello wrote: > Hi all, > > I actually found the problem but can't really understand. The ci_irq() > handler (from core.c) is not been called after a ep_queue() from > f_midi_transmit(). > > Is there any reason for that? > > I used mass_storage

Re: [PATCH v3 0/5] usb: change clock information for chipidea

2015-09-21 Thread Peter Chen
On Mon, Sep 21, 2015 at 09:49:11PM -0300, Fabio Estevam wrote: > On Sun, Sep 20, 2015 at 9:43 PM, Peter Chen wrote: > > This patch set changes usb clock information for legacy i.mx platforms. > > At these platforms, they needs three clocks to let controller work. > > > >

Re: [RFT PATCH] xhci: handle no ping response error properly

2015-09-21 Thread Steinar H. Gunderson
On Mon, Sep 21, 2015 at 08:25:22PM +0200, Steinar H. Gunderson wrote: > I ran 4.3-rc2 with your patch applied. The problem still happens: I turned on all tracing. Maybe it will be useful. The easiest way to provoke it was seemingly to run lots of other stuff, and then kill my program with

[PATCH v4] usb: of: add an api to get dr_mode by the phy node

2015-09-21 Thread Bin Liu
Some USB phy drivers have different handling for the controller in each dr_mode. But the phy driver does not have visibility to the dr_mode of the controller. This adds an api to return the dr_mode of the controller which associates the given phy node. Signed-off-by: Bin Liu ---

Re: [PATCH] usb: dwc3: gadget: Fix BUG in RT config

2015-09-21 Thread Felipe Balbi
On Mon, Sep 21, 2015 at 11:37:47AM -0400, Alan Stern wrote: > On Mon, 21 Sep 2015, Felipe Balbi wrote: > > > On Mon, Sep 21, 2015 at 10:50:10AM -0400, Alan Stern wrote: > > > On Mon, 21 Sep 2015, Felipe Balbi wrote: > > > > > > > On Mon, Sep 21, 2015 at 10:31:15AM -0400, Alan Stern wrote: > > >

Re: [PATCH v3] usb: of: add an api to get dr_mode by the phy node

2015-09-21 Thread Bin Liu
Hi, On 09/18/2015 03:27 PM, Bin Liu wrote: Some USB phy drivers have different handling for the controller in each dr_mode. But the phy driver does not have visibility to the dr_mode of the controller. This adds an api to return the dr_mode of the controller which associates the given phy

Re: usb: dwc3: gadget: warning on v4.3-rc1

2015-09-21 Thread Felipe Balbi
On Mon, Sep 21, 2015 at 11:06:27AM +0300, Roger Quadros wrote: > Hi Felipe, > > I see the following warning when g_zero is loaded > and USB cable is plugged to host on dra7-evm's USB1 port. > > It happens only once and no longer appears on re-loading gadget > or plugging/unplugging cable.

[PATCH v2 3/9] xhci: Move xhci_pme_quirk() behind #ifdef CONFIG_PM

2015-09-21 Thread Mathias Nyman
From: Tomer Barletz xhci_pme_quirk() is only used when CONFIG_PM is defined. Compiling a kernel without PM complains about this function [reworded commit message -Mathias] Cc: Signed-off-by: Tomer Barletz Signed-off-by: Mathias

Re: [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks

2015-09-21 Thread Felipe Balbi
On Mon, Sep 21, 2015 at 06:18:04PM +0530, Sudip Mukherjee wrote: > On Sun, Sep 20, 2015 at 11:17:36AM -0500, Felipe Balbi wrote: > > On Sun, Sep 20, 2015 at 01:42:42PM +0530, Sudip Mukherjee wrote: > > > On Sat, Sep 19, 2015 at 09:24:38AM +0530, Sudip Mukherjee wrote: > > > > On Fri, Sep 18, 2015

[PATCH v2 2/9] xhci: give command abortion one more chance before killing xhci

2015-09-21 Thread Mathias Nyman
We want to give the command abortion an additional try to stop the command ring before we completely hose xhci. Cc: Tested-by: Vincent Pelletier Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 9

[PATCH v2 8/9] xhci: change xhci 1.0 only restrictions to support xhci 1.1

2015-09-21 Thread Mathias Nyman
Some changes between xhci 0.96 and xhci 1.0 specifications forced us to check the hci version in code, some of these checks were implemented as hci_version == 1.0, which will not work with new xhci 1.1 controllers. xhci 1.1 behaves similar to xhci 1.0 in these cases, so change these checks to

Re: MIDI gadget allocating too much from coherent pool

2015-09-21 Thread Felipe Balbi
Hi, (it's kinda bad to drop *all* the context from the email) On Mon, Sep 21, 2015 at 03:25:28PM +0100, Felipe Tonello wrote: > Hi all, > > I actually found the problem but can't really understand. The ci_irq() > handler (from core.c) is not been called after a ep_queue() from >

[PATCH v2 0/9] xhci fixes for usb-linus, including a small usb core fix

2015-09-21 Thread Mathias Nyman
Hi Greg This series contain one usb core fix that makes sure we don't use bmAttribute bits that were reseved 0 in usb 3 specification. These bits are taken into use in USB 3.1, and we want to make sure usb 3.1 devices don't mess up calculations. The xhci fixes are mostly minor ones, except for

[PATCH v2 7/9] usb: xhci: exit early in xhci_setup_device() if we're halted or dying

2015-09-21 Thread Mathias Nyman
From: Roger Quadros During quick plug/removal of OTG adapter during dual-role testing it can happen that xhci_alloc_device() is called for the newly detected device after the DRD library has called xhci_stop to remove the HCD. If that is the case, just fail early to prevent the

[PATCH 10/14] RFC: usb/host/fotg210: Add function scan_frame_queue()

2015-09-21 Thread Peter Senna Tschudin
checkpatch complains about too many leading tabs because the if statement starts after 6 tabs: scan_iosoc() -> for() -> while() -> switch() -> if() -> for() -> if() There is also a goto statement going backwards in case of failure. This patch creates a new inline function named

[PATCH 01/14] RFC: usb/host/fotg210: Fix coding style issues

2015-09-21 Thread Peter Senna Tschudin
This patch fix coding style issues reported by checkpatch that do not change semantics of the code. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 1248 +--- drivers/usb/host/fotg210.h | 36 +- 2 files

[PATCH 08/14] RFC: usb/host/fotg210: convert macro to inline function

2015-09-21 Thread Peter Senna Tschudin
This patch convert the macro speed_char in an inline function. The goal of this patch is to make the code easier to read. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 27 --- 1 file changed, 16 insertions(+), 11

[PATCH 00/14] RFC: Consolidation: FUSB200 and FOTG210

2015-09-21 Thread Peter Senna Tschudin
I'm working on the consolidation of two very similar Faraday EHCI drivers: drivers/usb/host/fusbh200-hcd.c and drivers/usb/host/fotg210-hcd.c I'm sending the work unfinished because I have some questions, and I would appreciate feedback about the changes. As this is not complete work, please do

[PATCH 03/14] RFC: usb/host/fotg210: Remove useless else statement

2015-09-21 Thread Peter Senna Tschudin
This patch remove an else statement after a return to make the code easier to understand. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/fotg210-hcd.c

[PATCH 02/14] RFC: usb/host/fotg210: remove KERN_WARNING from pr_info

2015-09-21 Thread Peter Senna Tschudin
This patch remove KERN_WARNING from a call to pr_info(). Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c index

[PATCH 07/14] RFC: usb/host/fotg210: Remove a macro from snprintf

2015-09-21 Thread Peter Senna Tschudin
This patch removes a macro from a call to snprintf() and moves it's content to just before the call to snprintf() assigning a value to a new variable named tmp. The goal of this patch is to make the code easier to understand. Signed-off-by: Peter Senna Tschudin ---

Re: [PATCH] usb: dwc3: gadget: Fix BUG in RT config

2015-09-21 Thread Alan Stern
On Mon, 21 Sep 2015, Felipe Balbi wrote: > On Mon, Sep 21, 2015 at 10:50:10AM -0400, Alan Stern wrote: > > On Mon, 21 Sep 2015, Felipe Balbi wrote: > > > > > On Mon, Sep 21, 2015 at 10:31:15AM -0400, Alan Stern wrote: > > > > On Mon, 21 Sep 2015, Roger Quadros wrote: > > > > > > > > > Using

Re: First kernel patch (optimization)

2015-09-21 Thread Austin S Hemmelgarn
On 2015-09-20 06:41, Alexander Holler wrote: Am 20.09.2015 um 04:21 schrieb Theodore Ts'o: On Sat, Sep 19, 2015 at 07:47:22PM +0200, Alexander Holler wrote: Perhaps not so surprisingly, over a decade later, it is not currently at the top of the priority list of any of the current file system

Re: [PATCH] usb: dwc3: gadget: Fix BUG in RT config

2015-09-21 Thread Felipe Balbi
Hi, On Mon, Sep 21, 2015 at 09:46:30AM -0700, David Cohen wrote: > On September 21, 2015 9:27:43 AM PDT, Alan Stern > wrote: > >On Mon, 21 Sep 2015, Felipe Balbi wrote: > > > >> On Mon, Sep 21, 2015 at 11:37:47AM -0400, Alan Stern wrote: > >> > On Mon, 21 Sep 2015,

Re: First kernel patch (optimization)

2015-09-21 Thread Alexander Holler
Am 21.09.2015 um 17:47 schrieb Austin S Hemmelgarn: The problem I see with this argument is: 1. There's a lot of code in the kernel that wouldn't be merged today in the state it's in, this creates a false sense of what quality is expected for new code (BTRFS in particular comes to mind here).

Re: [PATCHv2 2/5] usb: dwc3: st: prepare the driver for generic usb_get_dr_mode function

2015-09-21 Thread Sergei Shtylyov
Hello. On 9/21/2015 11:14 AM, Heikki Krogerus wrote: of_usb_get_dr_mode will be converted into more generic usb_get_dr_mode function that will take struct device instead of struct device_node as it's parameter. Small nit: s/it's/its/. To make the conversion possible later, waiting for

Re: [PATCH] usb: dwc3: gadget: Fix BUG in RT config

2015-09-21 Thread Alan Stern
On Mon, 21 Sep 2015, Felipe Balbi wrote: > On Mon, Sep 21, 2015 at 11:37:47AM -0400, Alan Stern wrote: > > On Mon, 21 Sep 2015, Felipe Balbi wrote: > > > > > On Mon, Sep 21, 2015 at 10:50:10AM -0400, Alan Stern wrote: > > > > On Mon, 21 Sep 2015, Felipe Balbi wrote: > > > > > > > > > On Mon,

Re: [PATCH] usb: dwc3: gadget: Fix BUG in RT config

2015-09-21 Thread David Cohen
On September 21, 2015 9:27:43 AM PDT, Alan Stern wrote: >On Mon, 21 Sep 2015, Felipe Balbi wrote: > >> On Mon, Sep 21, 2015 at 11:37:47AM -0400, Alan Stern wrote: >> > On Mon, 21 Sep 2015, Felipe Balbi wrote: >> > >> > > On Mon, Sep 21, 2015 at 10:50:10AM -0400, Alan

Re: [PATCH] usb: dwc3: gadget: Fix BUG in RT config

2015-09-21 Thread Felipe Balbi
On Mon, Sep 21, 2015 at 10:31:15AM -0400, Alan Stern wrote: > On Mon, 21 Sep 2015, Roger Quadros wrote: > > > Using spin_lock() in hard irq handler is pointless > > and causes a BUG() in RT (real-time) configuration > > so get rid of it. > > Wait a minute. Who says spin_lock is pointless in an

Re: [PATCH] usb: dwc3: gadget: Fix BUG in RT config

2015-09-21 Thread Alan Stern
On Mon, 21 Sep 2015, Roger Quadros wrote: > Using spin_lock() in hard irq handler is pointless > and causes a BUG() in RT (real-time) configuration > so get rid of it. Wait a minute. Who says spin_lock is pointless in an IRQ handler? And who says it causes a BUG in RT configurations? And if

Re: [PATCH 07/38] usb: host: ehci-msm: fix handling platform_get_irq result

2015-09-21 Thread Alan Stern
On Mon, 21 Sep 2015, Andrzej Hajda wrote: > The function can return negative values. > > The problem has been detected using proposed semantic patch > scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 > > Signed-off-by:

[PATCH v2 5/9] usb: xhci: Clear XHCI_STATE_DYING on start

2015-09-21 Thread Mathias Nyman
From: Roger Quadros For whatever reason if XHCI died in the previous instant then it will never recover on the next xhci_start unless we clear the DYING flag. Cc: Signed-off-by: Roger Quadros Signed-off-by: Mathias Nyman

[PATCH v2 1/9] usb: Use the USB_SS_MULT() macro to get the burst multiplier.

2015-09-21 Thread Mathias Nyman
Bits 1:0 of the bmAttributes are used for the burst multiplier. The rest of the bits used to be reserved (zero), but USB3.1 takes bit 7 into use. Use the existing USB_SS_MULT() macro instead to make sure the mult value and hence max packet calculations are correct for USB3.1 devices. Note that

Re: [PATCH] usb: dwc3: gadget: Fix BUG in RT config

2015-09-21 Thread Alan Stern
On Mon, 21 Sep 2015, Felipe Balbi wrote: > On Mon, Sep 21, 2015 at 10:31:15AM -0400, Alan Stern wrote: > > On Mon, 21 Sep 2015, Roger Quadros wrote: > > > > > Using spin_lock() in hard irq handler is pointless > > > and causes a BUG() in RT (real-time) configuration > > > so get rid of it. > >

[PATCH 06/14] RFC: usb/host/fotg210: replace msleep by usleep_range

2015-09-21 Thread Peter Senna Tschudin
msleep under 20ms can result in sleeping up to 20ms, which may not be intended. Replace msleep(5) by usleep_range(5000, 6000). Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: MIDI gadget allocating too much from coherent pool

2015-09-21 Thread Felipe Tonello
Hi all, I actually found the problem but can't really understand. The ci_irq() handler (from core.c) is not been called after a ep_queue() from f_midi_transmit(). Is there any reason for that? I used mass_storage gadget, made file transfers and others, and the interrupt handler was been called

[PATCH v2 4/9] usb: xhci: lock mutex on xhci_stop

2015-09-21 Thread Mathias Nyman
From: Roger Quadros Else it races with xhci_setup_device Cc: Signed-off-by: Roger Quadros Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH v2 9/9] xhci: init command timeout timer earlier to avoid deleting it uninitialized

2015-09-21 Thread Mathias Nyman
Don't check if timer is running with a timer_pending() before deleting it with del_timer_sync(), this defies the whole point of the sync part and can cause a possible race. Instead we just want to make sure the timer is initialized early enough before we have a chance to delete it. Cc:

[PATCH v2 6/9] usb: xhci: stop everything on the first call to xhci_stop

2015-09-21 Thread Mathias Nyman
From: Roger Quadros xhci_stop will be called twice, once for the shared hcd and again for the primary hcd. We stop the XHCI controller in any case so clean up everything on the first call else we can timeout waiting for pending requests to complete. Cc:

[PATCH 04/14] RFC: usb/host/fotg210: Remove NULL checks dma_pool_destroy

2015-09-21 Thread Peter Senna Tschudin
This patch remove NULL checks before calls to dma_pool_destroy() as the function now can handle NULL pointers. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git

RE: [PATCH v1 27/32] usb: dwc2: gadget: kill ep0 requests before reinitializing core

2015-09-21 Thread Kaukab, Yousaf
> -Original Message- > From: John Youn [mailto:john.y...@synopsys.com] > Sent: Friday, September 18, 2015 5:03 AM > To: Kaukab, Yousaf; linux-usb@vger.kernel.org; ba...@ti.com; > john.y...@synopsys.com > Cc: Herrero, Gregory; he...@sntech.de; diand...@chromium.org; > r.bald...@samsung.com;

Re: [PATCH] usb: dwc3: gadget: Fix BUG in RT config

2015-09-21 Thread Felipe Balbi
On Mon, Sep 21, 2015 at 10:50:10AM -0400, Alan Stern wrote: > On Mon, 21 Sep 2015, Felipe Balbi wrote: > > > On Mon, Sep 21, 2015 at 10:31:15AM -0400, Alan Stern wrote: > > > On Mon, 21 Sep 2015, Roger Quadros wrote: > > > > > > > Using spin_lock() in hard irq handler is pointless > > > > and

[PATCH 09/14] RFC: usb/host/fotg210: Add function: output_buf_tds_dir()

2015-09-21 Thread Peter Senna Tschudin
checkpatch complains about too many leading tabs because the switch statement starts after 6 tabs. fill_periodic_buffer() -> for() -> do -> switch() -> if() -> list_for_each_entry() and finally the last switch(). This patch moves the list_for_each_entry() and the last switch() to a new inline

[PATCH 14/14] RFC: usb/host/faraday-hcd: Import FUSBH200 parameters

2015-09-21 Thread Peter Senna Tschudin
This patch adds FUSBH200 parameters to faraday-hcd.h. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/faraday-hcd.h | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/faraday-hcd.h

[PATCH 13/14] RFC: usb/host/faraday-hcd: Move #defines outside struct

2015-09-21 Thread Peter Senna Tschudin
For making the code more readable and to facilitate supporting multiple hardware versions, move #defines to outside the struct declaration. This patch also renames fhcd2xx_regs to fotg210_regs as this struct is specific to fotg210. Signed-off-by: Peter Senna Tschudin ---

[PATCH 05/14] RFC: usb/host/fotg210: change kmalloc by kmalloc_array

2015-09-21 Thread Peter Senna Tschudin
This patch change: kmalloc(DBG_SCHED_LIMIT * sizeof(*seen), GFP_ATOMIC) by: kmalloc_array(DBG_SCHED_LIMIT, sizeof(*seen), GFP_ATOMIC) as kmalloc_array() should be used for allocating arrays. Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 2 +-

Re: [PATCH v2 0/6] USB: io_ti: Cleanup download_fw and related functions

2015-09-21 Thread Peter Berger
On Sat, 2015-09-19 at 13:32 -0700, Johan Hovold wrote: > On Wed, Sep 16, 2015 at 03:12:57AM -0500, Peter E. Berger wrote: > > From: "Peter E. Berger" > > > > While working on a previous patchset for this driver [1] we were > > hampered by the facts that download_fw() is very

Re: [PATCH] usb: dwc3: gadget: Fix BUG in RT config

2015-09-21 Thread Alan Stern
On Mon, 21 Sep 2015, Felipe Balbi wrote: > On Mon, Sep 21, 2015 at 03:01:42PM -0400, Steven Rostedt wrote: > > On Mon, 21 Sep 2015 12:04:16 -0500 > > Felipe Balbi wrote: > > > > > > > no, no. you're missing the point here. The problem is that when RT > > > is applied, spinlocks

Re: [PATCH] usb: dwc3: gadget: Fix BUG in RT config

2015-09-21 Thread Steven Rostedt
On Mon, 21 Sep 2015 15:48:53 -0400 (EDT) Alan Stern wrote: > It should say something more along the lines of: > > Top-half handlers for threaded interrupts are not supposed to > acquire any locks. None are needed because the top half is >

[PATCH 1/2] usb: gadget: loopback: Fix show methods for attributes

2015-09-21 Thread Krzysztof Opasiak
Most of USB functions place new line after attribute value. Let's follow this convention also in loopback function as it improves readability. Signed-off-by: Krzysztof Opasiak --- drivers/usb/gadget/function/f_loopback.c |4 ++-- 1 file changed, 2 insertions(+), 2

[GIT PULL] USB fixes for v4.3-rc3

2015-09-21 Thread Felipe Balbi
Hi Greg, Here's another pull request for the current -rc cycle. It's based off of greg/usb-linus for this cycle because the previous pull request hasn't reached v4.3-rc2. This time I couldn't boot test all patches (specially the one fix on dwc3) because of being at linaro connect right now, but

[PATCH 2/2] usb: gadget: SourceSink: Fix show methods for attributes

2015-09-21 Thread Krzysztof Opasiak
Most of USB functions place new line after attribute value. Let's follow this convention also in source sink function as it improves readability. Signed-off-by: Krzysztof Opasiak --- drivers/usb/gadget/function/f_sourcesink.c | 12 ++-- 1 file changed, 6

Re: [RFT PATCH] xhci: handle no ping response error properly

2015-09-21 Thread Steinar H. Gunderson
On Mon, Sep 21, 2015 at 03:41:19PM +0300, Mathias Nyman wrote: > If a host fails to wake up a isochronous SuperSpeed device from U1/U2 > in time for a isoch transfer it will generate a "No ping response error" > Host will then move to the next transfer descriptor. > > Handle this case in the same

Re: PROBLEM: lsusb -v freezes kernel on Acer ES1-111M

2015-09-21 Thread Roland Weber
Hi Alan, > Assuming things work out as expected, try this: In core/hub.c, remove > the calls to usb_enable_autosuspend(hdev) in hub_probe() and leave > CONFIG_PM enabled. This one does not freeze! cheers, Roland [0.00] Initializing cgroup subsys cpuset [0.00] Initializing

Re: [PATCH 02/14] RFC: usb/host/fotg210: remove KERN_WARNING from pr_info

2015-09-21 Thread Sergei Shtylyov
Hello. On 09/21/2015 06:01 PM, Peter Senna Tschudin wrote: This patch remove KERN_WARNING from a call to pr_info(). Not pr_warn()? Signed-off-by: Peter Senna Tschudin --- drivers/usb/host/fotg210-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH v3 1/5] doc: dt-binding: ci-hdrc-usb2: split vendor specific properties

2015-09-21 Thread Rob Herring
On 09/20/2015 07:43 PM, Peter Chen wrote: > Each vendor may have its specific properties, they are not belonged > to common optional properties, split them from common's. > > Signed-off-by: Peter Chen Acked-by: Rob Herring > --- >

Re: First kernel patch (optimization)

2015-09-21 Thread Alexander Holler
Am 21.09.2015 um 17:47 schrieb Austin S Hemmelgarn: On 2015-09-20 06:41, Alexander Holler wrote: Am 20.09.2015 um 04:21 schrieb Theodore Ts'o: On Sat, Sep 19, 2015 at 07:47:22PM +0200, Alexander Holler wrote: Again, I don't think that encryption is an alternative. Besides that there is

Re: [PATCH v2 1/9] usb: Use the USB_SS_MULT() macro to get the burst multiplier.

2015-09-21 Thread Sergei Shtylyov
Hello. On 09/21/2015 05:46 PM, Mathias Nyman wrote: Bits 1:0 of the bmAttributes are used for the burst multiplier. The rest of the bits used to be reserved (zero), but USB3.1 takes bit 7 into use. Use the existing USB_SS_MULT() macro instead to make sure the mult value and hence max packet

Re: [PATCH 05/14] RFC: usb/host/fotg210: change kmalloc by kmalloc_array

2015-09-21 Thread Sergei Shtylyov
On 09/21/2015 06:01 PM, Peter Senna Tschudin wrote: This patch change: "Replaces" maybe? kmalloc(DBG_SCHED_LIMIT * sizeof(*seen), GFP_ATOMIC) by: kmalloc_array(DBG_SCHED_LIMIT, sizeof(*seen), GFP_ATOMIC) as kmalloc_array() should be used for allocating arrays. Signed-off-by: Peter

Re: PROBLEM: lsusb -v freezes kernel on Acer ES1-111M

2015-09-21 Thread Alan Stern
On Sun, 20 Sep 2015, Roland Weber wrote: > Hi Alan, hi all, > > in my previous mail, I wrote: > > With "make menuconfig", I haven't been able to switch off the > > setting, because CONFIG_PM_SLEEP and something else forces it on > > For the records, there are no menu entries for CONFIG_PM_SLEEP

  1   2   >