Re: [PATCH V2] usbnet: fix race condition caused spinlock bad magic issue

2013-11-12 Thread Oliver Neukum
On Wed, 2013-11-13 at 09:11 +0800, wangbiao wrote: Hi, > 2, for the same reason,dev->wait should be judged again before use it, > as between the judge point(if(dev->wait)) and use point(wakeup(dev->wait)), > the dev->wait may be set NULL by another cpu. > > for issue 1, declare unlink_wakeup in

Re: [PATCH v3 2/4] usb: usbtest: support usb2 extension descriptor test

2013-11-12 Thread Huang Rui
Hi Sarah, On Tue, Nov 12, 2013 at 09:43:20AM -0800, Sarah Sharp wrote: > On Mon, Oct 28, 2013 at 11:31:33PM +0800, Huang Rui wrote: > > In Test 9 of usbtest module, it is used for performing chapter 9 tests N > > times. > > > > USB2.0 Extension descriptor is one of the generic device-level capbil

[PATCH] net: cdc_ncm: cleanup a type issue in cdc_ncm_setup()

2013-11-12 Thread Dan Carpenter
This is harmless but cdc_ncm_setup() returns negative error codes truncated to u8 values. There is only one caller and treats all non-zero returns as errors but doesn't store the the return code. So the code works correctly but it's messy and upsets the static checkers. Signed-off-by: Dan Carpen

[PATCH v5 16/17] ARM: at91: move pit timer to common clk framework

2013-11-12 Thread Boris BREZILLON
Use device tree to get the source clock of the PIT (Periodic Interval Timer). If the clock is not found in device tree (or dt is not enabled) we'll try to get it using clk_lookup definitions. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/at91sam926x_time.c | 14

[PATCH v5 17/17] ARM: at91: add new compatible strings for pmc driver

2013-11-12 Thread Boris BREZILLON
This patch adds new compatible string for PMC node to prepare the transition to common clk. These compatible string come from pmc driver in clk subsystem and are needed to provide new device tree compatibility with old at91 clks (device tree using common clks will use the new compatible strings).

[PATCH v5 15/17] dt: binding: add at91 clks dt bindings documentation

2013-11-12 Thread Boris BREZILLON
This patch adds new at91 clks dt bindings documentation. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- .../devicetree/bindings/clock/at91-clock.txt | 339 1 file changed, 339 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/at91-

[PATCH v5 14/17] clk: at91: add PMC smd clock

2013-11-12 Thread Boris BREZILLON
This patch adds at91 smd (Soft Modem) clock implementation using common clk framework. Not used by any driver right now. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/Kconfig |5 ++ drivers/clk/at91/Makefile |1 + drivers/clk/at91/clk-smd.c | 173 +

[PATCH v5 13/17] clk: at91: add PMC usb clock

2013-11-12 Thread Boris BREZILLON
This patch adds new at91 usb clock implementation using common clk framework. This clock is used to clock usb ports (ohci, ehci and udc). Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/Kconfig | 11 ++ drivers/clk/at91/Makefile |1 + drivers/clk/at91/clk-us

[PATCH v5 12/17] clk: at91: add PMC utmi clock

2013-11-12 Thread Boris BREZILLON
This adds new at91 utmi clock implementation using common clk framework. This clock is a pll with a fixed factor (x40). It is used as a source for usb clock. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/Kconfig |7 ++ drivers/clk/at91/Makefile |1 +

[PATCH v5 11/17] clk: at91: add PMC programmable clocks

2013-11-12 Thread Boris BREZILLON
This patch adds new at91 programmable clocks implementation using common clk framework. A programmable clock is a clock which can be exported on a given pin to clock external devices. Each programmable clock is given an id (from 0 to 8). The number of available programmable clocks depends on the So

[PATCH v5 10/17] clk: at91: add peripheral clk macros for peripheral clk dt bindings

2013-11-12 Thread Boris BREZILLON
This patch adds the peripheral divisors macros (for sam9x5 compatible IPs) which will be used by peripheral clk dt definitions. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- include/dt-bindings/clk/at91.h |6 ++ 1 file changed, 6 insertions(+) diff --git a/include/dt-bindi

Re: [PATCH] usb: chipidea: udc: first start device on pullup

2013-11-12 Thread Peter Chen
On Tue, Nov 12, 2013 at 03:39:30PM +0100, Michael Grzeschik wrote: > On Tue, Nov 12, 2013 at 08:12:04PM +0800, Peter Chen wrote: > > On Tue, Nov 12, 2013 at 7:50 PM, Michael Grzeschik > > wrote: > > > Don't start hw_device_state on udc_start. The gadget framework has > > > the prepared pullup call

Re: [RFC PATCH 00/15] rework port power control

2013-11-12 Thread Dan Williams
On Tue, Nov 12, 2013 at 3:10 PM, Sarah Sharp wrote: > On Mon, Oct 28, 2013 at 06:49:37PM -0700, Dan Williams wrote: >> On Sat, Oct 26, 2013 at 7:40 AM, Alan Stern >> wrote: >> > On Fri, 25 Oct 2013, Dan Williams wrote: >> >> > This patch set makes a large number of significant changes to importa

Re: [PATCH] usb: xhci: Add 2nd memory barrier to giveback_first_trb()

2013-11-12 Thread Greg KH
On Tue, Nov 12, 2013 at 01:58:05PM -, David Laight wrote: > > There needs to be a wmb() barrier between the write to the cycle bit > in the first TRB and the write to the doorbell register. > > Since it isn't needed in the other places the doobell is rung > (because the ring contents haven't

[PATCH V2] usbnet: fix race condition caused spinlock bad magic issue

2013-11-12 Thread wangbiao
From: wang, biao Date: Mon, 11 Nov 2013 10:23:40 +0800 Subject: [PATCH] usbnet: fix race condition caused spinlock bad magic issue 1, there is race between usbnet_terminate_urbs and usbnet_bh, when unlink_wakeup used in usbnet_bh, it may be already freed and used by other function as unlink_wakeu

RE: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-12 Thread Paul Zimmerman
> From: David Cohen [mailto:david.a.co...@linux.intel.com] > Sent: Tuesday, November 12, 2013 3:44 PM > > On 11/12/2013 03:09 PM, Paul Zimmerman wrote: > > >> From: linux-usb-ow...@vger.kernel.org > >> [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Alan Stern > >> Sent: Tuesday, November

Re: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-12 Thread David Cohen
Hi Paul, On 11/12/2013 03:09 PM, Paul Zimmerman wrote: From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Alan Stern Sent: Tuesday, November 12, 2013 7:51 AM On Mon, 11 Nov 2013, David Cohen wrote: Hi Alan, Michal, On 11/11/2013 01:09 PM, Michal Naza

Re: xhci ring expansion

2013-11-12 Thread Sarah Sharp
On Thu, Oct 31, 2013 at 04:16:14PM -, David Laight wrote: > Code was recently added to the xhci driver to dynamically add extra ring > segments if there is insufficient space for all the fragments of the > URB being sent. > > ISTM that it would be better to just queue the URB (on the ring) > a

RE: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-12 Thread Paul Zimmerman
> From: linux-usb-ow...@vger.kernel.org > [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Alan Stern > Sent: Tuesday, November 12, 2013 7:51 AM > > On Mon, 11 Nov 2013, David Cohen wrote: > > > Hi Alan, Michal, > > > > On 11/11/2013 01:09 PM, Michal Nazarewicz wrote: > > > On Mon, Nov 11 2

Re: [RFC PATCH 00/15] rework port power control

2013-11-12 Thread Sarah Sharp
On Mon, Oct 28, 2013 at 06:49:37PM -0700, Dan Williams wrote: > On Sat, Oct 26, 2013 at 7:40 AM, Alan Stern wrote: > > On Fri, 25 Oct 2013, Dan Williams wrote: > >> > This patch set makes a large number of significant changes to important > >> > and subtle aspects of the USB stack. It would be a

[PATCH v5 09/17] clk: at91: add PMC peripheral clocks

2013-11-12 Thread Boris BREZILLON
This patch adds new at91 peripheral clock implementation using common clk framework. Almost all peripherals provided by at91 SoCs need a clock to work properly. This clock is enabled/disabled using PCER/PCDR resgisters. Each peripheral is given an id (see atmel's datasheets) which is used to defi

[PATCH v5 08/17] clk: at91: add PMC system clocks

2013-11-12 Thread Boris BREZILLON
This patch adds new at91 system clock implementation using common clk framework. Some peripherals need to enable a "system" clock in order to work properly. Each system clock is given an id based on the bit position in SCER/SCDR registers. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre

[PATCH v5 05/17] clk: at91: add PMC main clock

2013-11-12 Thread Boris BREZILLON
This patch adds new at91 main oscillator clock implementation using common clk framework. If rate is not provided during clock registration it is calculated using the slow clock (main clk parent in this case) rate and MCFR register. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- dr

[PATCH v5 07/17] clk: at91: add PMC master clock

2013-11-12 Thread Boris BREZILLON
This patch adds new at91 master clock implementation using common clk framework. The master clock layout describe the MCKR register layout. There are 2 master clock layouts: - at91rm9200 - at91sam9x5 Master clocks are given characteristics: - min/max clock output rate These characteristics are c

[PATCH v5 06/17] clk: at91: add PMC pll clocks

2013-11-12 Thread Boris BREZILLON
This patch adds new at91 pll clock implementation using common clk framework. The pll clock layout describe the PLLX register layout. There are four pll clock layouts: - at91rm9200 - at91sam9g20 - at91sam9g45 - sama5d3 PLL clocks are given characteristics: - min/max clock source rate - ranges of

Re: [RFC PATCH 04/15] PM / Runtime: Allow drivers to intercept pm qos flag changes

2013-11-12 Thread Sarah Sharp
On Thu, Oct 24, 2013 at 05:42:13PM -0700, Dan Williams wrote: > Hi Rafael, sorry about the email mix up. > > On Thu, Oct 24, 2013 at 4:08 PM, Rafael J. Wysocki wrote: > >> > + > >> > +What: /sys/devices/.../power/pm_qos_no_notify_flags > >> > +Date: October 2013 > >> > +Contact:

[PATCH v5 04/17] clk: at91: add PMC macro file for dt definitions

2013-11-12 Thread Boris BREZILLON
This patch adds a new macro file for PMC macros. This macro file includes the definitions of SR (status register) bit offsets and will be use to reference PMC irqs. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- include/dt-bindings/clk/at91.h | 22 ++ 1 file c

[PATCH v5 03/17] clk: at91: add PMC base support

2013-11-12 Thread Boris BREZILLON
This patch adds at91 PMC (Power Management Controller) base support. All at91 clocks managed by the PMC unit will use this framework. This framework provides the following fonctionalities: - define a new struct at91_pmc to hide PMC internals (lock, PMC memory mapping, irq domain, ...) - read/wr

[PATCH v5 01/17] ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h

2013-11-12 Thread Boris BREZILLON
This patch moves at91_pmc.h header from machine specific directory (arch/arm/mach-at91/include/mach/at91_pmc.h) to clk include directory (include/linux/clk/at91_pmc.h). We need this to avoid reference to machine specific headers in clk drivers. Signed-off-by: Boris BREZILLON Acked-by: Felipe Balb

[PATCH v5 00/17] ARM: at91: move to common clk framework

2013-11-12 Thread Boris BREZILLON
Hello, This patch series is the 5th version of the at91 clk implementations using the Common Clk Framework. Most of the clock provided by the PMC (Power Management Controller) are implemented : - main clock (main oscillator) - pll clocks - master clock - programmable clocks - utmi clock - periphe

[PATCH v6 5/5] usb: dwc3: implement gadget's quirk ep_out_align_size

2013-11-12 Thread David Cohen
DWC3 requires epout to have buffer size aligned to MaxPacketSize value. This patch implements necessary quirk for it. Signed-off-by: David Cohen --- drivers/usb/dwc3/core.h | 6 ++ drivers/usb/dwc3/gadget.c | 23 +++ 2 files changed, 29 insertions(+) diff --git a/driv

[PATCH v5 02/17] ARM: at91: add Kconfig options for common clk support

2013-11-12 Thread Boris BREZILLON
This patch adds the following Kconfig options to prepare the transition to common clk framework: - AT91_USE_OLD_CLK: this option is selected by every SoC which does not support new at91 clks based on common clk framework (SoC which does not define the clock tree in its device tree). This opt

Re: [PATCH v6 0/5] add gadget quirk to adapt f_fs for DWC3

2013-11-12 Thread David Cohen
On 11/12/2013 01:04 PM, David Cohen wrote: Hi, These patches are a proposal to add gadget quirks in an immediate objective to adapt f_fs when using DWC3 controller. But the quirk solution is generic and can be used by other controllers to adapt gadget functions to their non-standard restrictions

[PATCH v6 3/5] usb: gadget: f_fs: remove loop from I/O function

2013-11-12 Thread David Cohen
From: Michal Nazarewicz When endpoint changes (due to it being disabled or alt setting changed), mimic the action as if the change happened after the request has been queued, instead of retrying with the new endpoint. Signed-off-by: Michal Nazarewicz Cc: David Cohen --- drivers/usb/gadget/f_f

[PATCH v6 4/5] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-12 Thread David Cohen
From: Michal Nazarewicz Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires to be aligned to maxpacketsize of an out endpoint. ffs_epfile_io() needs to pad epout buffer to match above condition if quirk is found. Signed-off-by: Michal Nazarewicz Acked-by: David Cohen ---

[PATCH v6 1/5] usb: gadget: move bitflags to the end of usb_gadget struct

2013-11-12 Thread David Cohen
This patch moves all bitflags to the end of usb_gadget struct in order to improve readability. Signed-off-by: David Cohen Acked-by: Michal Nazarewicz --- include/linux/usb/gadget.h | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/include/linux/usb/gadget.

[PATCH v6 2/5] usb: gadget: add quirk_ep_out_aligned_size field to struct usb_gadget

2013-11-12 Thread David Cohen
Due to USB controllers may have different restrictions, usb gadget layer needs to provide a generic way to inform gadget functions to complain with non-standard requirements. This patch adds 'quirk_ep_out_aligned_size' field to struct usb_gadget to inform when controller's epout requires buffer si

[PATCH v6 0/5] add gadget quirk to adapt f_fs for DWC3

2013-11-12 Thread David Cohen
Hi, These patches are a proposal to add gadget quirks in an immediate objective to adapt f_fs when using DWC3 controller. But the quirk solution is generic and can be used by other controllers to adapt gadget functions to their non-standard restrictions. This change is necessary to make Android's

Re: huawei_cdc_ncm driver

2013-11-12 Thread Bjørn Mork
"Thomas Schäfer" wrote: >So problem seems to be somewhere but not in you driver. Let's hope so. I always worry when making changes, no matter how insignificant they are. I often feel like my bug to line ratio is a two digit number... Thanks for checking. Bjørn -- To unsubscribe from this

Re: [RFC] Revert "sierra_net: keep status interrupt URB active"

2013-11-12 Thread Bjørn Mork
Dan Williams wrote: >> Actually, is "[PATCH] usbnet: fix status interrupt urb handling" the >> real fix for this problem? >> >> John, any chance you could revert my RFC patch and try Felix's patch >in >> that mail? > >It fixes the problem for me without requiring the revert or my RFC >patch...

Re: [PATCH] usb: xhci: Link TRB must not occur with a USB payload burst.

2013-11-12 Thread Alan Stern
On Tue, 12 Nov 2013, Sarah Sharp wrote: > > It comes down to a question of how often you want the controller to > > issue an interrupt. If a ring segment is 4 KB (one page), then it can > > hold 256 TRBs. With scatter-gather transfers, each SG element > > typically refers to something like a 2-p

Re: [PATCH v4 01/15] usb: phy: msm: Move mach dependent code to platform data

2013-11-12 Thread Ivan T. Ivanov
Hi Christopher, On Tue, 2013-11-12 at 13:27 -0500, Christopher Covington wrote: > Hi Ivan, > > On 11/12/2013 09:51 AM, Ivan T. Ivanov wrote: > > From: "Ivan T. Ivanov" > > > > This patch fix compilation error when driver is compiled > > in multi-platform builds. > > > > drivers/built-in.o: In

[PATCH 12/12] usb: host: Remove superfluous name casts

2013-11-12 Thread Geert Uytterhoeven
device_driver.name is "const char *" Signed-off-by: Geert Uytterhoeven Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org --- drivers/usb/host/imx21-hcd.c|2 +- drivers/usb/host/isp116x-hcd.c |2 +- drivers/usb/host/isp1362-hcd.c |2 +- drivers/usb/host/r8a66597-hcd.c |2

[PATCH 11/12] usb: gadget: Remove superfluous name casts

2013-11-12 Thread Geert Uytterhoeven
device_driver.name is "const char *" Signed-off-by: Geert Uytterhoeven Cc: Felipe Balbi Cc: linux-usb@vger.kernel.org --- drivers/usb/gadget/fsl_qe_udc.c |2 +- drivers/usb/gadget/fsl_udc_core.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/f

[PATCH 09/12] usb: core: Remove superfluous name casts

2013-11-12 Thread Geert Uytterhoeven
device_driver.name is "const char *" Signed-off-by: Geert Uytterhoeven Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org --- drivers/usb/core/driver.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 47aade

RE: [PATCH] usb: xhci: Link TRB must not occur with a USB payload burst.

2013-11-12 Thread Alan Stern
On Tue, 12 Nov 2013, David Laight wrote: > > > If all the fragments are larger than the MBP (assume 16k) then > > > that would be relatively easy. However that is very dependant > > > on the source of the data. It might be true for disk data, but > > > is unlikely to be true for ethernet data. > >

Re: [PATCHv5.1 4/5] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-12 Thread David Cohen
On 11/12/2013 04:59 AM, Michal Nazarewicz wrote: > On Tue, Nov 12 2013, David Cohen wrote: >> You need to update req->length otherwise it's going to crash DWC3. >> I'd rather to keep your previous version. > > That's unfortunate. Do you want me to resend it or will you just send > a v6 of your wh

Re: [PATCH v4 01/15] usb: phy: msm: Move mach dependent code to platform data

2013-11-12 Thread Christopher Covington
Hi Ivan, On 11/12/2013 09:51 AM, Ivan T. Ivanov wrote: > From: "Ivan T. Ivanov" > > This patch fix compilation error when driver is compiled > in multi-platform builds. > > drivers/built-in.o: In function `msm_otg_link_clk_reset': > ./drivers/usb/phy/phy-msm-usb.c:314: undefined reference to `c

Re: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-12 Thread David Cohen
IIUC, req->length should still be set to len, not to data_len. >> >> I misunderstood the first time I read it: >> In order to avoid DWC3 to stall, we need to update req->length (this is >> the most important fix). kmalloc() is updated too to prevent USB >> controller to overflow buffer boundar

Re: [PATCH v4 2/4] usb: usbtest: support usb2 extension descriptor test

2013-11-12 Thread Sarah Sharp
On Tue, Nov 12, 2013 at 09:59:13AM -0800, Sarah Sharp wrote: > On Wed, Oct 30, 2013 at 11:27:38AM +0800, Huang Rui wrote: > > In Test 9 of usbtest module, it is used for performing chapter 9 tests N > > times. > > > > USB2.0 Extension descriptor is one of the generic device-level capbility > > des

Re: [PATCH v4 2/4] usb: usbtest: support usb2 extension descriptor test

2013-11-12 Thread Sarah Sharp
On Wed, Oct 30, 2013 at 11:27:38AM +0800, Huang Rui wrote: > In Test 9 of usbtest module, it is used for performing chapter 9 tests N > times. > > USB2.0 Extension descriptor is one of the generic device-level capbility > descriptors which added in section 9.6.2.1 of USB 3.0 spec. > > This patch

Re: [PATCH v3 2/4] usb: usbtest: support usb2 extension descriptor test

2013-11-12 Thread Sarah Sharp
On Mon, Oct 28, 2013 at 11:31:33PM +0800, Huang Rui wrote: > In Test 9 of usbtest module, it is used for performing chapter 9 tests N > times. > > USB2.0 Extension descriptor is one of the generic device-level capbility > descriptors which added in section 9.6.2.1 of USB 3.0 spec. > > This patch

Re: [PATCH] usbnet: fix status interrupt urb handling

2013-11-12 Thread Dan Williams
On Tue, 2013-11-12 at 16:34 +0100, Felix Fietkau wrote: > Since commit 7b0c5f21f348a66de495868b8df0284e8dfd6bbf > "sierra_net: keep status interrupt URB active", sierra_net triggers > status interrupt polling before the net_device is opened (in order to > properly receive the sync message response)

RE: [PATCH] usb: xhci: Link TRB must not occur with a USB payload burst.

2013-11-12 Thread David Laight
> > That's one way to do it. Or you could allow a Link TRB at an > > intermediate MBP boundary. > > I like this idea instead. The xHCI driver should be modified to be able > to handle link TRBs in the middle of the segments (the cancellation code > would have to be touched as well). We would ke

Re: [RFC] Revert "sierra_net: keep status interrupt URB active"

2013-11-12 Thread Dan Williams
On Tue, 2013-11-12 at 10:25 -0600, Dan Williams wrote: > On Fri, 2013-11-08 at 15:29 -0600, Dan Williams wrote: > > On Fri, 2013-11-08 at 21:44 +0100, Bjørn Mork wrote: > > > Dan Williams writes: > > > > On Mon, 2013-11-04 at 14:27 -0600, Dan Williams wrote: > > > >> On Fri, 2013-11-01 at 13:53 +0

RE: [PATCH] usb: xhci: Link TRB must not occur with a USB payload burst.

2013-11-12 Thread David Laight
> On Fri, Nov 08, 2013 at 11:07:41AM -, David Laight wrote: > > > While this change improves things a lot (it runs for 20 minutes rather > > > than > > > a few seconds), there is still something else wrong. > > > > Almost certainly caused by an unrelated local change. > > Ok, good, I was conc

Re: [Pull Request] xhci: Bug fixes, now with more tags!

2013-11-12 Thread Sarah Sharp
On Mon, Nov 11, 2013 at 11:27:13AM +0100, Vincent Thiele wrote: > This Bug is still not completely solved (Ubuntu 13.10 newest kernel 3.11) Have you tried compiling 3.12 instead? I don't have any control over when Ubuntu picks up bug fixes for their kernel. > Syslog: > Nov 2 18:44:29 Arbeits-PC

Re: huawei_cdc_ncm driver

2013-11-12 Thread Thomas Schäfer
> If that still does not change anything, then I'd really appreciate it if > you could run through (assuming the v3.11 driver was OK): > > git bisect start 9fea037de5f3 v3.11 -- drivers/net/usb/cdc_ncm.c > That failed too. (switching was ok, compiling was ok, booting, recognizing the devic

Re: [PATCH] usb: xhci: Link TRB must not occur with a USB payload burst.

2013-11-12 Thread Sarah Sharp
On Fri, Nov 08, 2013 at 11:07:41AM -, David Laight wrote: > > While this change improves things a lot (it runs for 20 minutes rather than > > a few seconds), there is still something else wrong. > > Almost certainly caused by an unrelated local change. Ok, good, I was concerned there was anot

Re: [PATCH] usb: xhci: Link TRB must not occur with a USB payload burst.

2013-11-12 Thread Sarah Sharp
On Mon, Nov 11, 2013 at 03:34:53PM -0500, Alan Stern wrote: > On Mon, 11 Nov 2013, David Laight wrote: > > > > Suppose, for example, the MBP is 1024. If you have a TD with length > > > 1500, and if it had only one fragment, the last (and only) fragment's > > > length would not less than the MBP a

Re: [RFC 3/3] ohci: rewrite ohci_dump() for dynamic debug

2013-11-12 Thread Alan Stern
On Tue, 12 Nov 2013 oli...@neukum.org wrote: > From: Oliver Neukum > > As this function is called from interrupt care must > be taken that as little as possible overhead is used > if dynamic debbuging is not enabled. Firstly, the function is called in interrupt context only when an Unrecoverab

RE: [PATCH] usb: xhci: Link TRB must not occur with a USB payload burst.

2013-11-12 Thread David Laight
> > If all the fragments are larger than the MBP (assume 16k) then > > that would be relatively easy. However that is very dependant > > on the source of the data. It might be true for disk data, but > > is unlikely to be true for ethernet data. > > I don't quite understand your point. Are you sa

Re: [RFC 2/3] ohci: compile all debug stuff always

2013-11-12 Thread Alan Stern
On Tue, 12 Nov 2013 oli...@neukum.org wrote: > From: Oliver Neukum > > There's no reason to leave out the debugfs files > under normal conditions. > > Signed-off-by: Oliver Neukum > --- > drivers/usb/host/ohci-dbg.c | 10 +- > 1 file changed, 1 insertion(+), 9 deletions(-) This patch

Re: [RFC 1/3] ohci: convert printk to dev_dbg

2013-11-12 Thread Alan Stern
On Tue, 12 Nov 2013 oli...@neukum.org wrote: > From: Oliver Neukum > > This converts the DEBUG level printk to dynamic debugging I would prefer to get rid of the urb_print() function entirely. As far as I know, nobody has used it in years. Alan Stern -- To unsubscribe from this list: send t

Re: [RFC] Revert "sierra_net: keep status interrupt URB active"

2013-11-12 Thread Dan Williams
On Fri, 2013-11-08 at 15:29 -0600, Dan Williams wrote: > On Fri, 2013-11-08 at 21:44 +0100, Bjørn Mork wrote: > > Dan Williams writes: > > > On Mon, 2013-11-04 at 14:27 -0600, Dan Williams wrote: > > >> On Fri, 2013-11-01 at 13:53 +0100, Bjørn Mork wrote: > > >> > This reverts commit 7b0c5f21f348a

RE: [PATCH] usb: xhci: Link TRB must not occur with a USB payload burst.

2013-11-12 Thread Alan Stern
On Tue, 12 Nov 2013, David Laight wrote: > > You're right. I do wish the spec had been written more clearly. > > I've read a lot of hardware specs in my time ... > > > > Reading it all again makes me think that a LINK trb is only > > > allowed on the burst boundary (which might be 16k bytes). >

Re: [PATCH] usb: phy: remove dead code

2013-11-12 Thread Michal Nazarewicz
Commit [4d175f34: usb: phy: nop: Defer clock prepare until PHY init] removed a goto reaching behind a “return ret” at the end of the function thus removing the only possible way that statement could be reached, and so rendering it a dead code. This commit cleans it up by removing said dead code.

[RFC 2/3] ohci: compile all debug stuff always

2013-11-12 Thread oliver
From: Oliver Neukum There's no reason to leave out the debugfs files under normal conditions. Signed-off-by: Oliver Neukum --- drivers/usb/host/ohci-dbg.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c ind

[RFC 3/3] ohci: rewrite ohci_dump() for dynamic debug

2013-11-12 Thread oliver
From: Oliver Neukum As this function is called from interrupt care must be taken that as little as possible overhead is used if dynamic debbuging is not enabled. Signed-off-by: Oliver Neukum --- drivers/usb/host/ohci-dbg.c | 91 - 1 file changed, 90

[RFC 1/3] ohci: convert printk to dev_dbg

2013-11-12 Thread oliver
From: Oliver Neukum This converts the DEBUG level printk to dynamic debugging Signed-off-by: Oliver Neukum --- drivers/usb/host/ohci-dbg.c | 104 ++-- drivers/usb/host/ohci-hcd.c | 4 -- drivers/usb/host/ohci-q.c | 2 - 3 files changed, 51 insertio

Re: [PATCHv2 2/2] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-12 Thread Alan Stern
On Mon, 11 Nov 2013, David Cohen wrote: > Hi Alan, Michal, > > On 11/11/2013 01:09 PM, Michal Nazarewicz wrote: > > On Mon, Nov 11 2013, Alan Stern wrote: > >> On Mon, 11 Nov 2013, Michal Nazarewicz wrote: > >> > >>> Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires > >>> t

[PATCH 2/2] usb: musb: musb_cppi41: handle pre-mature TX complete interrupt

2013-11-12 Thread Sebastian Andrzej Siewior
The TX-complete interrupt of the CPPI41 on AM335x fires too early. Adding a loop and counting how long it takes until the MUSB_TXCSR_TXPKTRDY bit is cleared I see FS: |musb-hdrc musb-hdrc.0.auto: configure ep1/80 packet_sz=64, mode=0, dma_addr=0xadc54002, len=1514 is_tx=1 |cppi41_dma_callback() 74

[PATCH 1/2] usb: musb: musb_cppi41: factor most of cppi41_dma_callback() into cppi41_trans_done()

2013-11-12 Thread Sebastian Andrzej Siewior
This patch moves most of the logic in cppi41_dma_callback() into cppi41_trans_done() where it can be called from another function. Instead of computing "transferred" (the number of bytes transferred in the last transaction) in cppi41_trans_done() the member "cppi41_channel->prog_len" is now set to

[PATCH] usbnet: fix status interrupt urb handling

2013-11-12 Thread Felix Fietkau
Since commit 7b0c5f21f348a66de495868b8df0284e8dfd6bbf "sierra_net: keep status interrupt URB active", sierra_net triggers status interrupt polling before the net_device is opened (in order to properly receive the sync message response). To be able to receive further interrupts, the interrupt urb n

Re: [PATCH] usb: phy: remove dead code

2013-11-12 Thread Felipe Balbi
On Sun, Nov 10, 2013 at 07:37:37PM +0100, Michal Nazarewicz wrote: > From: Michal Nazarewicz no SoB, cannot apply. I already had this patch in my tree but didn't send it. I'm fine with using yours but I need SoB and commit log. -- balbi signature.asc Description: Digital signature

[PATCH] usb: phy: generic: re-factor the way we find out about our resources

2013-11-12 Thread Felipe Balbi
instead of having each user of generic phy find out about its own resources and pass it to the core layer, have th core layer itself figure that out. It's as simple as moving a piece of code around. Signed-off-by: Felipe Balbi --- drivers/usb/phy/phy-am335x.c | 3 +-- drivers/usb/phy/phy-gener

[PATCH v4 07/15] usb: phy: msm: Remove unused pclk_src_name

2013-11-12 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" There are no references to 'pclk_src_name' in plaform code, so it is unused. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 26 +- include/linux/usb/msm_hsusb.h |5 - 2 files changed, 1 insertion(+), 30 deletions(-) d

[PATCH v4 03/15] usb: phy: msm: Migrate to Managed Device Resource allocation

2013-11-12 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Move memory, regulators, clocks and irq allocation to devm_* variants. Properly check for valid clk handles. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 192 - 1 file changed, 74 insertions(+), 118 deletions(

[PATCH v4 06/15] usb: phy: msm: Replace custom enum usb_mode_type with enum usb_dr_mode

2013-11-12 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Use enum usb_dr_mode and drop default usb_dr_mode from platform data. USB DT bindings states: dr_mode: "...In case this attribute isn't passed via DT, USB DRD controllers should default to OTG...", so remove redundand field. Signed-off-by: Ivan T. Ivanov --- arch/arm/ma

[PATCH v4 08/15] usb: phy: msm: Remove HSUSB prefix from regulator names

2013-11-12 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Prefix did not bring any useful information. Currently none of the MSM platforms define these regulators, so it is safe to rename them. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --

[PATCH v4 02/15] usb: phy: msm: Move global regulators variables to driver state

2013-11-12 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 82 - include/linux/usb/msm_hsusb.h |3 ++ 2 files changed, 42 insertions(+), 43 deletions(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-

[PATCH v4 00/15] usb: phy: msm: Fixes, cleanups and DT support

2013-11-12 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Hi, Patches have been tested on top of Stephen's clock controller patches[1] and recent fixes for chipidea msm glue layer driver posted here[2]. Hardware platform AP8074 DragonBoard. Only gadget mode utilized for now. CV Test Suite engine "Chapter 9 tests" are passing e

[PATCH v4 04/15] usb: phy: msm: Remove unnecessarily check for valid regulators.

2013-11-12 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Whether regulators are available or not is checked at driver probe. If they are not available driver will refuse to load, so no need to check them again. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 10 -- 1 file changed, 10 deletions(-) d

[PATCH v4 10/15] usb: phy: msm: Add device tree support and binding information

2013-11-12 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Allows MSM OTG controller to be specified via device tree. Signed-off-by: Ivan T. Ivanov Cc: devicet...@vger.kernel.org --- .../devicetree/bindings/usb/msm-hsusb.txt | 57 +- drivers/usb/phy/phy-msm-usb.c | 79 +++

[PATCH v4 11/15] usb: phy: msm: Use reset framework for LINK and PHY resets

2013-11-12 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Signed-off-by: Ivan T. Ivanov Cc: devicet...@vger.kernel.org --- .../devicetree/bindings/usb/msm-hsusb.txt |9 ++ drivers/usb/phy/phy-msm-usb.c | 30 ++-- include/linux/usb/msm_hsusb.h |3 ++

[PATCH v4 14/15] usb: phy: msm: Handle disconnect events

2013-11-12 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Put the transceiver in non-driving mode. Otherwise host may not detect soft-disconnection. Signed-off-by: Ivan T. Ivanov Cc: Pavankumar Kondeti --- drivers/usb/phy/phy-msm-usb.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/usb/phy/ph

[PATCH v4 01/15] usb: phy: msm: Move mach dependent code to platform data

2013-11-12 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" This patch fix compilation error when driver is compiled in multi-platform builds. drivers/built-in.o: In function `msm_otg_link_clk_reset': ./drivers/usb/phy/phy-msm-usb.c:314: undefined reference to `clk_reset' ./drivers/usb/phy/phy-msm-usb.c:318: undefined reference to

[PATCH v4 05/15] usb: phy: msm: Fix checkpatch.pl warnings

2013-11-12 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" This fixes following: WARNING: quoted string split across lines WARNING: Prefer seq_puts to seq_printf Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 39 ++- 1 file changed, 14 insertions(+), 25 deletions(-) diff

[PATCH v4 09/15] usb: phy: msm: Properly check result from platform_get_irq()

2013-11-12 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Function return negative code on error. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index 258bca2..fa8e672d 100644 ---

[PATCH v4 12/15] usb: phy: msm: Add support for secondary PHY control

2013-11-12 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Allow support to use 2nd HSPHY with USB2 Core. Some platforms may have configuration to allow USB controller work with any of the two HSPHYs present. By default driver configures USB core to use primary HSPHY. Add support to allow user select 2nd HSPHY using DT parameter.

[PATCH v4 15/15] usb: phy: msm: Vote for corner of VDD CX instead of voltage of VDD CX

2013-11-12 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" New platform uses RBCPR hardware feature, with that voting for absolute voltage of VDD CX is not required. Hence vote for corner of VDD CX which uses nominal corner voltage on VDD CX. Signed-off-by: Ivan T. Ivanov Cc: Mayank Rana Cc: devicet...@vger.kernel.org --- .../d

[PATCH v4 13/15] usb: phy: msm: Correct USB PHY Reset sequence for newer platform

2013-11-12 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" On few legacy platforms, USB PHY is having dedicated reset clk. It is used to reset USB PHY after putting USB PHY into low power mode and for calibration of USB PHY. Putting USB PHY into low power mode is causing ulpi read/write timeout as expected. USB PHY reset clk is not

Re: [PATCH] usb: chipidea: udc: first start device on pullup

2013-11-12 Thread Michael Grzeschik
On Tue, Nov 12, 2013 at 08:12:04PM +0800, Peter Chen wrote: > On Tue, Nov 12, 2013 at 7:50 PM, Michael Grzeschik > wrote: > > Don't start hw_device_state on udc_start. The gadget framework has > > the prepared pullup callback for this. This is necessary if we use gadgets > > which need to be enabl

[PATCH] usb: xhci: Add 2nd memory barrier to giveback_first_trb()

2013-11-12 Thread David Laight
There needs to be a wmb() barrier between the write to the cycle bit in the first TRB and the write to the doorbell register. Since it isn't needed in the other places the doobell is rung (because the ring contents haven't been changed) add it to giveback_first_trb() rather than somewhere later.

Re: [PATCHv5.1 4/5] check quirk to pad epout buf size when not aligned to maxpacketsize

2013-11-12 Thread Michal Nazarewicz
On Tue, Nov 12 2013, David Cohen wrote: > You need to update req->length otherwise it's going to crash DWC3. > I'd rather to keep your previous version. That's unfortunate. Do you want me to resend it or will you just send a v6 of your whole series? -- Best regards,

Re: [PATCH v5 2/5] usb: gadget: add quirk_ep_out_aligned_size field to struct usb_gadget

2013-11-12 Thread Michal Nazarewicz
On Tue, Nov 12 2013, David Cohen wrote: > On 11/11/2013 03:55 PM, Michal Nazarewicz wrote: >> Come to think of it, perhaps even better helper would be: >> >> static inline size_t usb_ep_align_maybe( >> struct usb_gadget *gadget, struct usb_ep *ep, size_t len) { >> return gadget->quir_ep_o

Re: [PATCH] usb: chipidea: udc: first start device on pullup

2013-11-12 Thread Peter Chen
On Tue, Nov 12, 2013 at 7:50 PM, Michael Grzeschik wrote: > Don't start hw_device_state on udc_start. The gadget framework has > the prepared pullup callback for this. This is necessary if we use gadgets > which need to be enabled after an userspace application got prepared, or > other delayed con

[PATCH] usb: chipidea: udc: first start device on pullup

2013-11-12 Thread Michael Grzeschik
Don't start hw_device_state on udc_start. The gadget framework has the prepared pullup callback for this. This is necessary if we use gadgets which need to be enabled after an userspace application got prepared, or other delayed conditiions have passed. Signed-off-by: Michael Grzeschik --- Hi Pe

Re: huawei_cdc_ncm driver

2013-11-12 Thread Thomas Schäfer
Hi, > I do not have any Huawei NCM device, so I cannot really test the new > huawei_cdc_ncm. > A simple test would be just reverting commit 9fea037de5f3 ("net: > cdc_ncm: remove non-standard NCM device IDs"), to make the cdc_ncm > driver (with all the recent changes) handle this device again.

RE: [PATCH] usb: xhci: Link TRB must not occur with a USB payload burst.

2013-11-12 Thread David Laight
> You're right. I do wish the spec had been written more clearly. I've read a lot of hardware specs in my time ... > > Reading it all again makes me think that a LINK trb is only > > allowed on the burst boundary (which might be 16k bytes). > > The only real way to implement that is to ensure th

  1   2   >