[PATCH 6/6] usb: host: ohci-exynos: Use devm_ioremap_resource instead of devm_ioremap

2014-05-10 Thread Vivek Gautam
Using devm_ioremap_resource() API should actually be preferred over devm_ioremap(), since the former request the mem region first and then gives back the ioremap'ed memory pointer. devm_ioremap_resource() calls request_mem_region(), therby preventing other drivers to make any overlapping call to

[PATCH 5/6] usb: host: ehci-tegra: Use devm_ioremap_resource instead of devm_ioremap

2014-05-10 Thread Vivek Gautam
Using devm_ioremap_resource() API should actually be preferred over devm_ioremap(), since the former request the mem region first and then gives back the ioremap'ed memory pointer. devm_ioremap_resource() calls request_mem_region(), therby preventing other drivers to make any overlapping call to

[PATCH 4/6] usb: host: ehci-spear: Use devm_ioremap_resource instead of devm_ioremap

2014-05-10 Thread Vivek Gautam
Using devm_ioremap_resource() API should actually be preferred over devm_ioremap(), since the former request the mem region first and then gives back the ioremap'ed memory pointer. devm_ioremap_resource() calls request_mem_region(), therby preventing other drivers to make any overlapping call to

[PATCH 1/6] usb: host: ehci-exynos: Use devm_ioremap_resource instead of devm_ioremap

2014-05-10 Thread Vivek Gautam
Using devm_ioremap_resource() API should actually be preferred over devm_ioremap(), since the former request the mem region first and then gives back the ioremap'ed memory pointer. devm_ioremap_resource() calls request_mem_region(), therby preventing other drivers to make any overlapping call to

[PATCH 2/6] usb: host: ehci-msm: Use devm_ioremap_resource instead of devm_ioremap

2014-05-10 Thread Vivek Gautam
Using devm_ioremap_resource() API should actually be preferred over devm_ioremap(), since the former request the mem region first and then gives back the ioremap'ed memory pointer. devm_ioremap_resource() calls request_mem_region(), therby preventing other drivers to make any overlapping call to

[PATCH 3/6] usb: host: ehci-mv: Use devm_ioremap_resource instead of devm_ioremap

2014-05-10 Thread Vivek Gautam
Using devm_ioremap_resource() API should actually be preferred over devm_ioremap(), since the former request the mem region first and then gives back the ioremap'ed memory pointer. devm_ioremap_resource() calls request_mem_region(), therby preventing other drivers to make any overlapping call to

[PATCH 0/6] usb: host: Cleanup for ioremap'ing hcd memory

2014-05-10 Thread Vivek Gautam
Based on 'usb-next' branch of Greg's usb tree. devm_ioremap_resource() API is advantageous over devm_ioremap() and should therefore be preferred to request any ioremap'ed address for hcd. Vivek Gautam (6): usb: host: ehci-exynos: Use devm_ioremap_resource instead of devm_ioremap usb:

Re: [PATCH 1/6] usb: host: ehci-exynos: Use devm_ioremap_resource instead of devm_ioremap

2014-05-10 Thread Alexander Shiyan
Sat, 10 May 2014 15:26:58 +0530 от Vivek Gautam gautam.vi...@samsung.com: Using devm_ioremap_resource() API should actually be preferred over devm_ioremap(), since the former request the mem region first and then gives back the ioremap'ed memory pointer. devm_ioremap_resource() calls

Re: Status of PLX USB3380?

2014-05-10 Thread Ricardo Ribalda Delgado
Hello I am evaluating the chip right now with the manufacturer driver. As Amit said there are some problems in the probe/remove, but also there are some static variables on the irq handler that are a mistake and the code is also a bit too scrambled. Since the driver also has to support legacy

Re: [PATCH 1/6] usb: host: ehci-exynos: Use devm_ioremap_resource instead of devm_ioremap

2014-05-10 Thread Vivek Gautam
Hi, On Sat, May 10, 2014 at 3:36 PM, Alexander Shiyan shc_w...@mail.ru wrote: Sat, 10 May 2014 15:26:58 +0530 от Vivek Gautam gautam.vi...@samsung.com: Using devm_ioremap_resource() API should actually be preferred over devm_ioremap(), since the former request the mem region first and then

[PATCH v2 6/6] usb: host: ohci-exynos: Use devm_ioremap_resource instead of devm_ioremap

2014-05-10 Thread Vivek Gautam
Using devm_ioremap_resource() API should actually be preferred over devm_ioremap(), since the former request the mem region first and then gives back the ioremap'ed memory pointer. devm_ioremap_resource() calls request_mem_region(), therby preventing other drivers to make any overlapping call to

[PATCH v2 3/6] usb: host: ehci-mv: Use devm_ioremap_resource instead of devm_ioremap

2014-05-10 Thread Vivek Gautam
Using devm_ioremap_resource() API should actually be preferred over devm_ioremap(), since the former request the mem region first and then gives back the ioremap'ed memory pointer. devm_ioremap_resource() calls request_mem_region(), therby preventing other drivers to make any overlapping call to

[PATCH v2 2/6] usb: host: ehci-msm: Use devm_ioremap_resource instead of devm_ioremap

2014-05-10 Thread Vivek Gautam
Using devm_ioremap_resource() API should actually be preferred over devm_ioremap(), since the former request the mem region first and then gives back the ioremap'ed memory pointer. devm_ioremap_resource() calls request_mem_region(), therby preventing other drivers to make any overlapping call to

[PATCH v2 5/6] usb: host: ehci-tegra: Use devm_ioremap_resource instead of devm_ioremap

2014-05-10 Thread Vivek Gautam
Using devm_ioremap_resource() API should actually be preferred over devm_ioremap(), since the former request the mem region first and then gives back the ioremap'ed memory pointer. devm_ioremap_resource() calls request_mem_region(), therby preventing other drivers to make any overlapping call to

[PATCH v2 4/6] usb: host: ehci-spear: Use devm_ioremap_resource instead of devm_ioremap

2014-05-10 Thread Vivek Gautam
Using devm_ioremap_resource() API should actually be preferred over devm_ioremap(), since the former request the mem region first and then gives back the ioremap'ed memory pointer. devm_ioremap_resource() calls request_mem_region(), therby preventing other drivers to make any overlapping call to

[PATCH v2 1/6] usb: host: ehci-exynos: Use devm_ioremap_resource instead of devm_ioremap

2014-05-10 Thread Vivek Gautam
Using devm_ioremap_resource() API should actually be preferred over devm_ioremap(), since the former request the mem region first and then gives back the ioremap'ed memory pointer. devm_ioremap_resource() calls request_mem_region(), therby preventing other drivers to make any overlapping call to

[PATCH v2 0/6] usb: host: Cleanup for ioremap'ing hcd memory

2014-05-10 Thread Vivek Gautam
Based on 'usb-next' branch of Greg's usb tree. devm_ioremap_resource() API is advantageous over devm_ioremap() and should therefore be preferred to request any ioremap'ed address for hcd. Changes from v1: - Changed the way returned pointer is checked for error value as pointed out in the

[PATCH v2 7/7] ARM: sunxi: dt: add APP4-EVB1 board support

2014-05-10 Thread Maxime Ripard
From: Boris BREZILLON boris.brezil...@free-electrons.com The APP4 EVB1 development boards embeds an A31, together with some NAND, one SD card slot, and one SDIO + UART WiFi and Bluetooth chip, a few I2C buses, USB, and a LCD display. Signed-off-by: Boris BREZILLON

[PATCH v2 6/7] ARM: sun6i: dt: Add support for the USB controllers

2014-05-10 Thread Maxime Ripard
The A31 has two ECHI/OHCI controllers, and one OHCI-only phy-less controller. Signed-off-by: Maxime Ripard maxime.rip...@free-electrons.com Reviewed-by: Hans de Goede hdego...@redhat.com --- arch/arm/boot/dts/sun6i-a31.dtsi | 77 1 file changed, 77

[PATCH v2 4/7] usb: ehci-platform: add optional reset controller retrieval

2014-05-10 Thread Maxime Ripard
From: Boris BREZILLON boris.brezil...@free-electrons.com On the Allwinner's A31 SoC the reset line connected to the EHCI IP has to be deasserted for the EHCI block to be usable. Add support for an optional reset controller that will be deasserted on power off and asserted on power on.

[PATCH v2 0/7] Add Allwinner A31 USB support

2014-05-10 Thread Maxime Ripard
Hi everyone, This patchset adds support for the USB controllers found in the Allwinner A31. While the design is similar to the earlier Allwinner SoCs that are already supported, a few details here and there change, like the fact that the PHYs now have one clock per phy, while it used to be only

[PATCH v2 2/7] ARM: sun6i: Add the USB clocks to the DTSI.

2014-05-10 Thread Maxime Ripard
The USB clocks of the A31 seems to be parented to the 24MHz oscillator, and handle the clocks for the USB phys and OHCI devices. Signed-off-by: Maxime Ripard maxime.rip...@free-electrons.com Reviewed-by: Hans de Goede hdego...@redhat.com --- arch/arm/boot/dts/sun6i-a31.dtsi | 11 +++ 1

[PATCH v2 3/7] phy: usb: sunxi: Introduce Allwinner A31 USB PHY support

2014-05-10 Thread Maxime Ripard
The USB phy controller in the A31 differs mostly from the older controllers because it has a clock dedicated for each phy, while the older ones were having a single clock for all the phys. Signed-off-by: Maxime Ripard maxime.rip...@free-electrons.com Reviewed-by: Hans de Goede hdego...@redhat.com

[PATCH v2 5/7] usb: ohci-platform: Enable optional use of reset controller

2014-05-10 Thread Maxime Ripard
The OHCI controllers used in the Allwinner A31 are asserted in reset using a global reset controller. Add optional support for such a controller in the OHCI platform driver. Signed-off-by: Maxime Ripard maxime.rip...@free-electrons.com Reviewed-by: Hans de Goede hdego...@redhat.com ---

[PATCH v2 1/7] clk: sunxi: Implement A31 USB clock

2014-05-10 Thread Maxime Ripard
The A31 USB clock slightly differ from its older counterparts, mostly because it has a different gate for each PHY, while the older one had a single gate for all the phy. Signed-off-by: Maxime Ripard maxime.rip...@free-electrons.com Reviewed-by: Hans de Goede hdego...@redhat.com ---

Re: i.MX6 USB OTG support is broken on linux-next

2014-05-10 Thread Shawn Guo
+ Robin and David, On Sat, May 10, 2014 at 07:10:05PM +0800, Peter Chen wrote: On Fri, May 09, 2014 at 09:00:47PM +0800, Shawn Guo wrote: I'm running next-20140508 kernel on imx6q-sabresd board with USB mouse/keyboard connected to OTG port. It works well on 3.15-rc but is broken on

Re: i.MX6 USB OTG support is broken on linux-next

2014-05-10 Thread Peter Chen
On Fri, May 09, 2014 at 09:00:47PM +0800, Shawn Guo wrote: I'm running next-20140508 kernel on imx6q-sabresd board with USB mouse/keyboard connected to OTG port. It works well on 3.15-rc but is broken on recent linux-next kernel with the message like below. ... usb 1-1: device v413c p2107

Re: [PATCH v2 0/6] usb: host: Cleanup for ioremap'ing hcd memory

2014-05-10 Thread Alexander Shiyan
Sat, 10 May 2014 17:30:04 +0530 от Vivek Gautam gautam.vi...@samsung.com: Based on 'usb-next' branch of Greg's usb tree. devm_ioremap_resource() API is advantageous over devm_ioremap() and should therefore be preferred to request any ioremap'ed address for hcd. Changes from v1: -

[PATCH usb-linus] usb: cdc-wdm: export cdc-wdm uapi header

2014-05-10 Thread Bjørn Mork
The include/uapi/linux/usb/cdc-wdm.h header defines cdc-wdm userspace APIs and should be exported by make headers_install. Cc: sta...@vger.kernel.org # 3.10, 3.12, 3.14 Fixes: 3edce1cf813a (USB: cdc-wdm: implement IOCTL_WDM_MAX_COMMAND) Signed-off-by: Bjørn Mork bj...@mork.no --- Seems like I

Re: [PATCH v2 4/7] usb: ehci-platform: add optional reset controller retrieval

2014-05-10 Thread Alan Stern
On Sat, 10 May 2014, Maxime Ripard wrote: From: Boris BREZILLON boris.brezil...@free-electrons.com On the Allwinner's A31 SoC the reset line connected to the EHCI IP has to be deasserted for the EHCI block to be usable. Add support for an optional reset controller that will be deasserted

Weird I/O errors with USB Hard disk

2014-05-10 Thread loody
hi all: I have a USB hard disk and when I play specific file. it will show below message ( I purpose enable usb/storage/transport.c debug message about urb debug) what makes me confused are 1. Does Unhandled sense code mean the SCSI Request Sense command? 2. if #1 is correct, there should be any

Re: Weird I/O errors with USB Hard disk

2014-05-10 Thread James Bottomley
On Sat, 2014-05-10 at 22:38 +0800, loody wrote: hi all: I have a USB hard disk and when I play specific file. it will show below message ( I purpose enable usb/storage/transport.c debug message about urb debug) what makes me confused are 1. Does Unhandled sense code mean the SCSI Request

Re: i.MX6 USB OTG support is broken on linux-next

2014-05-10 Thread Li Jun
On Sat, May 10, 2014 at 09:18:36PM +0800, Shawn Guo wrote: + Robin and David, On Sat, May 10, 2014 at 07:10:05PM +0800, Peter Chen wrote: On Fri, May 09, 2014 at 09:00:47PM +0800, Shawn Guo wrote: I'm running next-20140508 kernel on imx6q-sabresd board with USB mouse/keyboard connected

[PATCH net-next 04/11] net: cdc_ncm: support rx_max/tx_max updates when running

2014-05-10 Thread Bjørn Mork
Finish the rx_max/tx_max setup by flushing buffers and informing usbnet about the changes. This way, the settings can be modified while the netdev is up and running. Signed-off-by: Bjørn Mork bj...@mork.no --- drivers/net/usb/cdc_ncm.c | 31 +-- 1 file changed, 25

[PATCH net-next 11/11] net: cdc_ncm: remove redundant disconnected flag

2014-05-10 Thread Bjørn Mork
Calling netif_carrier_{on,off} is sufficient. There is no need to duplicate the carrier state in a driver specific flag. Signed-off-by: Bjørn Mork bj...@mork.no --- drivers/net/usb/cdc_ncm.c| 19 ++- drivers/net/usb/huawei_cdc_ncm.c | 13 -

[PATCH net-next 08/11] net: cdc_ncm/cdc_mbim: adding NCM protocol statiscics

2014-05-10 Thread Bjørn Mork
To have an idea of the effects of the protocol coalescing it's useful to have some counters showing the different aspects. Due to the assymetrical usbnet interface the netdev rx_bytes counter has been counting real received payload, while the tx_bytes counter has included the NCM/MBIM framing

[PATCH net-next 03/11] net: cdc_ncm: split .bind device initialization

2014-05-10 Thread Bjørn Mork
Now that we have split out the part of the device setup which MUST be done with the data interface in altsetting 0, we can delay the rest of the initialization. This allows us to move some of post-init buffer size config from bind to the appropriate setup function. The purpose of this refactoring

[PATCH net-next 01/11] net: cdc_ncm: split out rx_max/tx_max update of setup

2014-05-10 Thread Bjørn Mork
Split out the part of setup dealing with updating the rx_max and tx_max buffer sizes so that this code can be reused for dynamically updating the limits. Signed-off-by: Bjørn Mork bj...@mork.no --- drivers/net/usb/cdc_ncm.c | 81 +-- 1 file changed, 50

[PATCH net-next 07/11] net: cdc_ncm: set reasonable padding limits

2014-05-10 Thread Bjørn Mork
We pad frames larger than X to maximum size for devices which don't need a ZLP after maximum sized frames. This allows the device to optimize its transfers for one fixed buffer size. X was arbitrarily set at 512 bytes regardless of real buffer maximum, causing extreme overheads due to excessive

[PATCH net-next 10/11] net: cdc_ncm: fix argument alignment

2014-05-10 Thread Bjørn Mork
Reported-by: Joe Perches j...@perches.com Signed-off-by: Bjørn Mork bj...@mork.no --- drivers/net/usb/cdc_ncm.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index 7d315b983e7e..c65145671521 100644 ---

[PATCH net-next 09/11] net: cdc_ncm: use sane defaults for rx/tx buffers

2014-05-10 Thread Bjørn Mork
Lots of devices request much larger buffers than reasonable. This cause real problems for users of hosts with limited resources. Reducing the default buffer size to 16kB for such devices is a reasonable trade-off between allowing them to aggregate traffic and avoiding memory exhaustion on

[PATCH net-next 00/11] cdc_ncm: add buffer tuning and stats using ethtool

2014-05-10 Thread Bjørn Mork
The first 9 patches of this set are unchanged from the RFC I sent more than a week ago. The 2 last patches are leftover minor cleanups, which I found laying around from last years cleaning job. David Laight was the only one commenting on the RFC, and I have interpreted his comment as a wish for

[PATCH net-next 02/11] net: cdc_ncm: factor out one-time device initialization

2014-05-10 Thread Bjørn Mork
Split the parts of setup dealing with device initialization from parts just setting defaults for attributes which might be changed after initialization. Some commands of the device initialization are only allowed when the data interface is in its disabled altsetting, so we must separate them out

[PATCH net-next 05/11] net: cdc_ncm: use ethtool to tune coalescing settings

2014-05-10 Thread Bjørn Mork
Datagram coalescing is an integral part of the NCM and MBIM protocols, intended to reduce the interrupt load primarily on the device end of the USB link. As with all coalescing solutions, there is a trade-off between buffering and interrupts. The current defaults are based on the assumption that

[PATCH net-next 06/11] net: cdc_ncm: use true max dgram count for header estimates

2014-05-10 Thread Bjørn Mork
Many newer NCM and MBIM devices will request a maximum tx datagram count which is much smaller than our hardcoded absolute max. We can reduce the overhead without sacrificing any of the simplicity for these devices, by simply using the true negotiated count in when calculated the maximum NTH and

Re: [PATCH usb-linus] usb: cdc-wdm: export cdc-wdm uapi header

2014-05-10 Thread Greg Kroah-Hartman
On Sat, May 10, 2014 at 04:31:40PM +0200, Bjørn Mork wrote: The include/uapi/linux/usb/cdc-wdm.h header defines cdc-wdm userspace APIs and should be exported by make headers_install. Cc: sta...@vger.kernel.org # 3.10, 3.12, 3.14 Fixes: 3edce1cf813a (USB: cdc-wdm: implement

Re: Weird I/O errors with USB Hard disk

2014-05-10 Thread loody
hi James: 2014-05-10 23:10 GMT+08:00 James Bottomley james.bottom...@hansenpartnership.com: On Sat, 2014-05-10 at 22:38 +0800, loody wrote: hi all: I have a USB hard disk and when I play specific file. it will show below message ( I purpose enable usb/storage/transport.c debug message about

Re: Weird I/O errors with USB Hard disk

2014-05-10 Thread James Bottomley
On Sun, 2014-05-11 at 00:43 +0800, loody wrote: hi James: 2014-05-10 23:10 GMT+08:00 James Bottomley james.bottom...@hansenpartnership.com: On Sat, 2014-05-10 at 22:38 +0800, loody wrote: hi all: I have a USB hard disk and when I play specific file. it will show below message ( I

Re: [PATCH 5/6] usb: host: ehci-tegra: Use devm_ioremap_resource instead of devm_ioremap

2014-05-10 Thread Sergei Shtylyov
Hello. On 05/10/2014 01:57 PM, Vivek Gautam wrote: Using devm_ioremap_resource() API should actually be preferred over devm_ioremap(), since the former request the mem region first and then gives back the ioremap'ed memory pointer. devm_ioremap_resource() calls request_mem_region(), therby

[PATCH net-next 2/4] net: cdc_mbim: reject IP packets on DSS VLANs

2014-05-10 Thread Bjørn Mork
DSS VLANs are pseudo network interfaces representing arbitrary data streams, and specifically not IP. Preventing spurious IP packets can sometimes be a hassle. The kernel will for example send an IPv6 Router Solicit when the interface is brought up unless the user has been careful enough to

[PATCH net-next 1/4] net: cdc_mbim: optionally use VLAN ID 4094 for IP session 0

2014-05-10 Thread Bjørn Mork
The cdc_mbim driver maps 802.1q VLANs to MBIM IP and DSS sessions. MBIM IP session 0 is handled as an exception and is mapped to untagged frames. This patch adds optional support for remapping MBIM IP session 0 to 802.1q VLAN ID 4094 instead. The default behaviour is not changed. The new

[PATCH net-next 4/4] net: cdc_ncm/cdc_mbim: rework probing of NCM/MBIM functions

2014-05-10 Thread Bjørn Mork
The NCM class match in the cdc_mbim driver is confusing and cause unexpected behaviour. The USB core guarantees that a USB interface is in altsetting 0 when probing starts. This means that devices implementing a NCM 1.0 backwards compatible MBIM function (a NCM/MBIM function) always hit the NCM

[PATCH net-next 3/4] net: cdc_mbim: add driver documentation

2014-05-10 Thread Bjørn Mork
An initial attempt on describing some of the odd APIs provided by this driver. Cc: Greg Suarez gsua...@smithmicro.com Signed-off-by: Bjørn Mork bj...@mork.no --- Documentation/networking/cdc_mbim.txt | 339 ++ 1 file changed, 339 insertions(+) create mode 100644

[PATCH net-next 0/4] cdc_mbim: cleanups and new features

2014-05-10 Thread Bjørn Mork
This series depends on commit 6b5eeb7f874b (net: cdc_mbim: handle unaccelerated VLAN tagged frames), which is currently in net but not yet in net-next. Patch 4 might have a minor context collision with the cdc_ncm: add buffer tuning and stats using ethtool series I just posted for review. Please

[PATCH] [resend] net: get rid of SET_ETHTOOL_OPS

2014-05-10 Thread Wilfried Klaebe
net: get rid of SET_ETHTOOL_OPS Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone. This does that. Mostly done via coccinelle script: @@ struct ethtool_ops *ops; struct net_device *dev; @@ - SET_ETHTOOL_OPS(dev, ops); + dev-ethtool_ops = ops; Compile tested only, but I'd

RE: i.MX6 USB OTG support is broken on linux-next

2014-05-10 Thread Peter Chen
On Sat, May 10, 2014 at 07:10:05PM +0800, Peter Chen wrote: On Fri, May 09, 2014 at 09:00:47PM +0800, Shawn Guo wrote: I'm running next-20140508 kernel on imx6q-sabresd board with USB mouse/keyboard connected to OTG port. It works well on 3.15-rc but is broken on recent

Re: i.MX6 USB OTG support is broken on linux-next

2014-05-10 Thread Shawn Guo
On Sat, May 10, 2014 at 09:57:39PM +0800, Li Jun wrote: As Peter suggested, do not enable OTG_FSM in defconfig since there are very few HNPSRP capable device in market. With OTG_FSM enabled, even USB_OTG_WHITELIST is not selected, the OTG port still can't work the same as before if you

Re: i.MX6 USB OTG support is broken on linux-next

2014-05-10 Thread Shawn Guo
On Sun, May 11, 2014 at 08:40:25AM +0800, Chen Peter-B29397 wrote: As I explained before: OTG devices and Embedded Hosts both have Targeted Host functionality, and each Targeted Host has its TPL (Targeted Peripheral List), only the devices are at TPL are supported by Targeted Host. So