Re: Linux USB file storage gadget with new UDC

2013-04-05 Thread victor yeo
Hi, the parameter is file=/dev/mmcblk0p1 Perhaps you have already realized this... mmcblk0p1 is the first partition of the mmcblk0 device. Block 0 of the partition is the boot sector, not the MBR. The MBR is block 0 of the mmcblk0 device. So perhaps you really meant to use:

Re: [PATCH v4 00/21] ARM: OMAP2+: Adapt to ehci-omap changes for 3.10

2013-04-05 Thread Benoit Cousson
Hi Roger, On 03/20/2013 04:44 PM, Roger Quadros wrote: Hi Tony, These patches provide the SoC side code required to support the changes in the OMAP USB Host drivers done in [1], [2] [3]. Device tree support is added for Beagleboard only. I've removed Panda device tree support till we

Re: [PATCH v4 00/21] ARM: OMAP2+: Adapt to ehci-omap changes for 3.10

2013-04-05 Thread Benoit Cousson
Hi Roger, On 04/05/2013 10:30 AM, Benoit Cousson wrote: ... ARM: dts: OMAP4: Add HS USB Host IP nodes ARM: dts: OMAP3: Add HS USB Host IP nodes ARM: dts: omap3-beagle: Add USB Host support These 3 DTS patches are good to me, but I cannot applied them on top of the already existing

Re: [PATCH 0/7] usb: musb: add support for host support back

2013-04-05 Thread Felipe Balbi
Hi, On Thu, Apr 04, 2013 at 09:50:06PM +0200, Daniel Mack wrote: Hi all, here are some patches to separate the HCD and gadget part of the musb driver so they can be deselected in Kconfig. They also make the driver keep track of the configured port mode that is set from DT, so the actual

Re: [PATCH 0/7] usb: musb: add support for host support back

2013-04-05 Thread Daniel Mack
Hi, On 05.04.2013 11:58, Felipe Balbi wrote: On Thu, Apr 04, 2013 at 09:50:06PM +0200, Daniel Mack wrote: Hi all, here are some patches to separate the HCD and gadget part of the musb driver so they can be deselected in Kconfig. They also make the driver keep track of the configured port

Re: [RFC][PATCH 1/2] ARM: OMAP4: clock: Add device tree support for AUXCLKs

2013-04-05 Thread Roger Quadros
On 04/04/2013 07:41 PM, Tony Lindgren wrote: * Roger Quadros rog...@ti.com [130404 00:39]: On 04/04/2013 02:42 AM, Tony Lindgren wrote: --- a/arch/arm/mach-omap2/cclock44xx_data.c +++ b/arch/arm/mach-omap2/cclock44xx_data.c @@ -27,6 +27,7 @@ #include linux/clk-private.h #include

Re: USB ehci suspend/resume on beagleboard

2013-04-05 Thread Grazvydas Ignotas
On Thu, Apr 4, 2013 at 2:50 PM, Roger Quadros rog...@ti.com wrote: correcting misleading subject line. was (Re: MUSB regression in linux next at least for pandboard) On 04/04/2013 02:36 PM, Roger Quadros wrote: Hi, On 02/07/2013 04:10 PM, Grazvydas Ignotas wrote: On Thu, Feb 7, 2013 at

Re: USB ehci suspend/resume on beagleboard

2013-04-05 Thread Roger Quadros
On 04/05/2013 02:11 PM, Grazvydas Ignotas wrote: On Thu, Apr 4, 2013 at 2:50 PM, Roger Quadros rog...@ti.com wrote: correcting misleading subject line. was (Re: MUSB regression in linux next at least for pandboard) On 04/04/2013 02:36 PM, Roger Quadros wrote: Hi, On 02/07/2013 04:10 PM,

Re: [PATCH 0/7] usb: musb: add support for host support back

2013-04-05 Thread Daniel Mack
Hi, On 05.04.2013 11:58, Felipe Balbi wrote: On Thu, Apr 04, 2013 at 09:50:06PM +0200, Daniel Mack wrote: Hi all, here are some patches to separate the HCD and gadget part of the musb driver so they can be deselected in Kconfig. They also make the driver keep track of the configured port

Re: [PATCH 1/7] usb: gadget: drop unused USB_GADGET_MUSB_HDRC

2013-04-05 Thread Felipe Balbi
On Thu, Apr 04, 2013 at 09:50:07PM +0200, Daniel Mack wrote: The functionality meant to be represented by this symbol will be re-added later, but for now, USB_GADGET_MUSB_HDRC is in fact unused and can be dropped. Signed-off-by: Daniel Mack zon...@gmail.com this one is good to go for v3.11

Re: [PATCH 2/7] usb: musb: move function declarations to musb_{host,gadget}.h

2013-04-05 Thread Felipe Balbi
On Thu, Apr 04, 2013 at 09:50:08PM +0200, Daniel Mack wrote: Let the function declarations live in the header file the belong to, header file *they* belong to. Typo there. other than that, patch looks alright. -- balbi signature.asc Description: Digital signature

Re: [PATCH 3/7] usb: musb: factor out hcd initalization

2013-04-05 Thread Felipe Balbi
On Thu, Apr 04, 2013 at 09:50:09PM +0200, Daniel Mack wrote: The musb struct is currently allocated along with the hcd, which makes it difficult to build a driver that only acts as gadget device. Fix this by allocation musb directly, and keep the hcd around as pointer. Fix this by

Re: [PATCH 4/7] usb: musb: add Kconfig options for HOST, GAGDET or DUAL_ROLE modes

2013-04-05 Thread Felipe Balbi
Hi On Thu, Apr 04, 2013 at 09:50:10PM +0200, Daniel Mack wrote: This makes building the actual object files optional to the selected mode, which saves users who know which kind of USB mode support they need some binary size. Unimplemented functions are stubbed out with static inline

Re: [PATCH 5/7] usb: musb: add musb_host_setup() and musb_host_cleanup()

2013-04-05 Thread Felipe Balbi
Hi, On Thu, Apr 04, 2013 at 09:50:11PM +0200, Daniel Mack wrote: diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index d564580..d298be7 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -2649,6 +2649,27 @@ void musb_host_free(struct musb

Re: [PATCH 5/7] usb: musb: add musb_host_setup() and musb_host_cleanup()

2013-04-05 Thread Daniel Mack
On 05.04.2013 15:07, Felipe Balbi wrote: Hi, On Thu, Apr 04, 2013 at 09:50:11PM +0200, Daniel Mack wrote: diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index d564580..d298be7 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -2649,6

Re: [PATCH 6/7] usb: musb: re-introduce musb-port_mode

2013-04-05 Thread Felipe Balbi
Hi, On Thu, Apr 04, 2013 at 09:50:12PM +0200, Daniel Mack wrote: Initialize the host and gagdet subsystems of the musb driver only when the appropriate mode is selected from platform data, or device-tree information, respectively. Refuse to start the gadget part if the port is in host-only

Re: Linux USB file storage gadget with new UDC

2013-04-05 Thread Alan Stern
On Fri, 5 Apr 2013, victor yeo wrote: Now i insmod g_file_storage gadget with file=/mnt/sd/backing_file, the SCSI_READ_10 command is still not working properly. What makes you think that? See the gadget log below. The g_file_storage gadget receives SCSI command: Unknown xa1 from the Linux

Re: [PATCH 2/8] ehci-platform: add init() method to platform data

2013-04-05 Thread Alan Stern
On Fri, 5 Apr 2013, Sergei Shtylyov wrote: Sometimes there is a need to initialize some non-standard registers mapped to the EHCI region before accessing the standard EHCI registers. Add the init() method to the 'ehci-platform' platform data for this purpose. init isn't such a good name for

Re: usb-storage causes hibernation to freeze before snapshotting image

2013-04-05 Thread Alan Stern
On Fri, 5 Apr 2013, Paul Menzel wrote: Dear Linux USB folks, using Debian Wheezy/testing with Linux 3.2.39-2 and uswsusp 1.0+20110509-3, I see the following problem similar to the one described in some Ubuntu forum from 2009 [1] or a question from 2012 to Ask Ubuntu [2]. Running

[PATCH v2 00/11] usb: musb: add back support for host mode

2013-04-05 Thread Daniel Mack
Hi all, here are some patches to separate the HCD and gadget part of the musb driver so they can be deselected in Kconfig. They also make the driver keep track of the configured port mode that is set from DT, so the actual runtime configuration can be selected dynamically. One thing that is

[PATCH v2 01/11] usb: gadget: drop unused USB_GADGET_MUSB_HDRC

2013-04-05 Thread Daniel Mack
The functionality meant to be represented by this symbol will be re-added later, but for now, USB_GADGET_MUSB_HDRC is in fact unused and can be dropped. Signed-off-by: Daniel Mack zon...@gmail.com --- drivers/usb/gadget/Kconfig | 8 1 file changed, 8 deletions(-) diff --git

[PATCH v2 02/11] usb: musb: move function declarations to musb_{host,gadget}.h

2013-04-05 Thread Daniel Mack
Let the function declarations live in the header files they belong to, which makes it easier to stub them out later. Signed-off-by: Daniel Mack zon...@gmail.com --- drivers/usb/musb/musb_core.h | 17 - drivers/usb/musb/musb_gadget.h | 17 +++--

[PATCH v2 03/11] usb: musb: factor some host-specific functions

2013-04-05 Thread Daniel Mack
In particular, this introduces musb_host_resume_root_hub()and musb_host_poke_root_hub() which will be stubbed out later. Signed-off-by: Daniel Mack zon...@gmail.com --- drivers/usb/musb/musb_core.c | 18 +++--- drivers/usb/musb/musb_host.c | 15 ++-

[PATCH v2 05/11] usb: musb: move musb_start to musb_virthub.c

2013-04-05 Thread Daniel Mack
This function has its only user in musb_virthub.c, so let's move it there and make it static. Signed-off-by: Daniel Mack zon...@gmail.com --- drivers/usb/musb/musb_core.c| 45 - drivers/usb/musb/musb_core.h| 1 - drivers/usb/musb/musb_virthub.c |

[PATCH v2 07/11] usb: musb: add Kconfig options for HOST, GAGDET or DUAL_ROLE modes

2013-04-05 Thread Daniel Mack
This makes building the actual object files optional to the selected mode, which saves users who know which kind of USB mode support they need some binary size. Unimplemented functions are stubbed out with static inline functions. Signed-off-by: Daniel Mack zon...@gmail.com ---

[PATCH v2 08/11] usb: musb: add musb_host_setup() and musb_host_cleanup()

2013-04-05 Thread Daniel Mack
This patch re-introduces the bits that are necessary to use the musb controller in host mode. Signed-off-by: Daniel Mack zon...@gmail.com --- drivers/usb/musb/musb_core.c | 5 + drivers/usb/musb/musb_host.c | 21 + drivers/usb/musb/musb_host.h | 8 3 files

[PATCH v2 06/11] usb: musb: factor out hcd initalization

2013-04-05 Thread Daniel Mack
The musb struct is currently allocated along with the hcd, which makes it difficult to build a driver that only acts as gadget device. Fix this by allocating musb directly, and keep the hcd around as a pointer in the musb struct. struct hc_driver musb_hc_driver can now also be static to

[PATCH v2 09/11] usb: musb: re-introduce musb-port_mode

2013-04-05 Thread Daniel Mack
Define MUSB_PORT_MODE_{HOST,GADGET,DUAL_ROLE} and store the platform-specified value in struct musb. Note that MUSB_PORT_MODE_HOST has to be set to 1 in order to match existing device tree bindings which are already documented but in fact unusued. Signed-off-by: Daniel Mack zon...@gmail.com ---

[PATCH v2 11/11] usb: musb: eliminate musb_to_hcd

2013-04-05 Thread Daniel Mack
With the hcd is now a direct member of struct musb, we can now simply eliminate the musb_to_hcd() macro. There aren't that many users left anyway, as some where already fixed up when parts were factored out to musb_host.c Signed-off-by: Daniel Mack zon...@gmail.com ---

[PATCH v2 10/11] usb: musb: use musb-port_mode

2013-04-05 Thread Daniel Mack
Initialize the host and gagdet subsystems of the musb driver only when the appropriate mode is selected from platform data, or device-tree information, respectively. Signed-off-by: Daniel Mack zon...@gmail.com --- drivers/usb/musb/musb_core.c| 22 +-

Re: [PATCH v4 00/21] ARM: OMAP2+: Adapt to ehci-omap changes for 3.10

2013-04-05 Thread Tony Lindgren
* Benoit Cousson b-cous...@ti.com [130405 03:00]: On 04/05/2013 10:30 AM, Benoit Cousson wrote: ... ARM: dts: OMAP4: Add HS USB Host IP nodes ARM: dts: OMAP3: Add HS USB Host IP nodes ARM: dts: omap3-beagle: Add USB Host support These 3 DTS patches are good to me, but I

Re: [PATCH] xhci: fix list access before init

2013-04-05 Thread Aguirre Rodriguez, Sergio A
On Fri, Apr 05, 2013 at 06:51:21AM +0400, Vladimir Murzin wrote: On Thu, Apr 04, 2013 at 12:29:25PM -0700, Sarah Sharp wrote: Someone else is already working on a patch to fix part of this: http://marc.info/?l=linux-usbm=136509667003716w=2 Please coordinate with them. Also, two

Re: [RFC][PATCH 1/2] ARM: OMAP4: clock: Add device tree support for AUXCLKs

2013-04-05 Thread Tony Lindgren
* Roger Quadros rog...@ti.com [130405 03:44]: On 04/04/2013 07:41 PM, Tony Lindgren wrote: * Roger Quadros rog...@ti.com [130404 00:39]: On 04/04/2013 02:42 AM, Tony Lindgren wrote: For v3.10, let's just make sure that USB works with DT as then after v3.10 we can make omap4 DT only and

Re: [PATCH 4/8] rcar-phy: remove EHCI internal buffer setup

2013-04-05 Thread Sergei Shtylyov
Hello. On 05-04-2013 4:43, Simon Horman wrote: Now that the EHCI internal buffer setup is done by the platform code, we can remove such code from this driver as it never really belonged here. We also no longer need the 2nd memory region now (2nd EHCI controller is simply missing in e.g.

Re: [PATCH 5/8] rcar-phy: correct base address

2013-04-05 Thread Sergei Shtylyov
Hello. On 05-04-2013 4:43, Simon Horman wrote: The memory region that is used by the driver overlaps EHCI and OHCI register regions for absolutely no reason now -- fix it by adding offset of 0x800 to the base address, changing the register #define's accordingly. This has extra positive effect

Re: [PATCH 7/8] ARM: shmobile: Marzen: pass platform data to USB PHY device

2013-04-05 Thread Sergei Shtylyov
Hello. On 05-04-2013 4:44, Simon Horman wrote: Since we're now going to setup the USBPCTRL0 register using the USB PHY device's platform data, we now need a way to pass those platform data from the board file to the device which is situated in setup-r8a7779.c -- and what I'm suggesting is

Re: Active URB submitted twice in pegasus driver

2013-04-05 Thread Petko Manolov
On Wed, 27 Mar 2013, Petko Manolov wrote: On Tue, 26 Mar 2013, Sarah Sharp wrote: ctrl_callback is still reading the URB status, and using it in the switch statement. It's also using the urb-context as well, to dig out a pointer (pegasus_t) that the pegasus_set_multicast already has access

Re: [RFC][PATCH 1/2] ARM: OMAP4: clock: Add device tree support for AUXCLKs

2013-04-05 Thread Grygorii Strashko
On 04/04/2013 07:41 PM, Tony Lindgren wrote: * Roger Quadros rog...@ti.com [130404 00:39]: On 04/04/2013 02:42 AM, Tony Lindgren wrote: --- a/arch/arm/mach-omap2/cclock44xx_data.c +++ b/arch/arm/mach-omap2/cclock44xx_data.c @@ -27,6 +27,7 @@ #include linux/clk-private.h #include

[PATCH v2] xhci - clarify compliance mode debug messages

2013-04-05 Thread Tony Camuso
There are no functional changes in this patch. However, because the compliance mode timer can be deleted in more than one function, it seemed expedient to include the function name in the debug strings. Also limited the use of capitals to the first word in the compliance mode debug messages,

Re: [PATCH 0/2] usb: chipidea: fixes for v3.9-rc5

2013-04-05 Thread Greg KH
On Thu, Apr 04, 2013 at 01:13:45PM +0300, Alexander Shishkin wrote: Hi, This series contains two fixes, both of which are also applicable to -stable. Michael Grzeschik (2): usb: chipidea: udc: fix memory access of shared memory on armv5 machines usb: chipidea: udc: fix memory

Re: [PATCH 2/8] ehci-platform: add init() method to platform data

2013-04-05 Thread Sergei Shtylyov
Hello. On 04/05/2013 06:43 PM, Alan Stern wrote: Sometimes there is a need to initialize some non-standard registers mapped to the EHCI region before accessing the standard EHCI registers. Add the init() method to the 'ehci-platform' platform data for this purpose. init isn't such a good

Re: [PATCH 2/8] ehci-platform: add init() method to platform data

2013-04-05 Thread Sergei Shtylyov
On 04/06/2013 12:40 AM, Sergei Shtylyov wrote: And instead of passing hcd-regs, wouldn't it be better to pass hcd? I really don't know. Other users of this interface might need to initialize something other than a non-standard register. Hm, maybe... if passing 'struct usb_hcd *'

Re: [PATCH 2/8] ehci-platform: add init() method to platform data

2013-04-05 Thread Alan Stern
On Sat, 6 Apr 2013, Sergei Shtylyov wrote: On 04/06/2013 12:40 AM, Sergei Shtylyov wrote: And instead of passing hcd-regs, wouldn't it be better to pass hcd? I really don't know. Other users of this interface might need to initialize something other than a non-standard

Re: [PATCH 2/8] ehci-platform: add init() method to platform data

2013-04-05 Thread Sergei Shtylyov
On 04/06/2013 12:56 AM, Alan Stern wrote: And instead of passing hcd-regs, wouldn't it be better to pass hcd? I really don't know. Other users of this interface might need to initialize something other than a non-standard register. Hm, maybe... if passing 'struct usb_hcd *' would

Re: [PATCH 2/8] ehci-platform: add init() method to platform data

2013-04-05 Thread Alan Stern
On Sat, 6 Apr 2013, Sergei Shtylyov wrote: On 04/06/2013 12:56 AM, Alan Stern wrote: And instead of passing hcd-regs, wouldn't it be better to pass hcd? I really don't know. Other users of this interface might need to initialize something other than a non-standard register.

Re: [PATCH 13/15] staging: usbip: userspace: libsrc: cleanup parsing

2013-04-05 Thread Greg KH
On Thu, Apr 04, 2013 at 04:03:14PM +0200, Stefan Reif wrote: From: Kurt Kanzenbach ly80t...@cip.cs.fau.de Since the names.c/names.h are taken from another project, some functions which names.c provides aren't used by usbipd. This patch fixes: - removed useless comments - unified

[RFC PATCH 38/41] staging: dwc2: load parameters from the devicetree

2013-04-05 Thread Matthijs Kooijman
Each of the parameters in the dwc2_core_params struct can now be changed using devicetree parameters. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- Documentation/devicetree/bindings/staging/dwc2.txt | 36 drivers/staging/dwc2/platform.c| 68

[RFC PATCH 17/41] staging: dwc2: properly mask the GRXFSIZ register

2013-04-05 Thread Matthijs Kooijman
Bits 16-31 are reserved, so the old code just reads the whole register to get bits 0-15, assuming the reserved bits would be 0 (which seems true on current hardware, but who knows...). This commit properly masks out the reserved bits when reading and doesn't touch the reserved bits while writing.

[RFC PATCH 20/41] staging: dwc2: make dwc2_core_params documentation more complete

2013-04-05 Thread Matthijs Kooijman
Some of the defaults were missing or unclear. In particular, I suspect the defaults were documented assuming there were still module parameters and taking the default module parameters into account. Now, the defaults are the values that will get chosen when the params passed to dwc2_hcd_init are

[RFC PATCH 03/41] staging: dwc2: fix naming of register constants

2013-04-05 Thread Matthijs Kooijman
A generic set of FIFOSIZE_* constants was used for both the GNPTXFSIZ and HPTXFSIZ registers, even where a specific set of constants was a available for the GNPTXFSIZ register. This change adds specific constants for the HPTXFSIZ register as well, changes the code to use those specific constants

[RFC PATCH 04/41] staging: dwc2: fix off-by-one in check for max_packet_count parameter

2013-04-05 Thread Matthijs Kooijman
Previously, the max_packet_count could be set to 1 x, where x is the number of bits available (width + 4 in the code). Since 1 x requires x + 1 bits to represent, this will not work. The real maximum value is (1 x) - 1. This value is already used the default when the set value is invalid, but

[RFC PATCH 01/41] staging: dwc2: when dma is disabled, clear dev-dma_mask

2013-04-05 Thread Matthijs Kooijman
Instead of just setting the dma_mask to the empty mask, the pointer to the mask is cleared altogether. This is needed because usb_create_shared_hcd sets hcd-self.uses_dma based on dev-dma_mask != NULL, not by looking at the actual mask itself. This change thus makes hcd-self.uses_dma have the

[RFC PATCH 21/41] staging: dwc2: add const to handling of dwc2_core_params

2013-04-05 Thread Matthijs Kooijman
From: Stephen Warren swar...@wwwdotorg.org Signed-off-by: Stephen Warren swar...@wwwdotorg.org [matth...@stdin.nl: Split patch from bigger patch and added commit message] Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 2 +- drivers/staging/dwc2/hcd.c | 2 +-

[RFC PATCH 10/41] staging: dwc2: only read the snpsid register once

2013-04-05 Thread Matthijs Kooijman
This (read-only) register was read twice, storing it for later use the second time. Now it is only read once, storing it right away. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/hcd.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git

[RFC PATCH 36/41] staging: dwc2: Make dwc2_set_uninitialized more specific

2013-04-05 Thread Matthijs Kooijman
Before, it was a function that would set all members of a given struct containing only int members to -1. Now, it is renamed to dwc_set_all_params and it works only on the dwc2_core_params struct. This makes sure that all of the slightly dubious casting and assumptions happen inside the function

[RFC PATCH 09/41] staging: dwc2: unshift non-bool register value constants

2013-04-05 Thread Matthijs Kooijman
Various register fields wider than one bit have constants defined for their value. Previously, these registers would define the values as they appear in the register, so shifted to the right to the position the value appears in the register. This commit changes those constants to their natural

[RFC PATCH 34/41] staging: dwc2: cleanup includes in pci.c

2013-04-05 Thread Matthijs Kooijman
Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/pci.c | 7 --- 1 file changed, 7 deletions(-) This is just the minimal list of includes that made the compile work. diff --git a/drivers/staging/dwc2/pci.c b/drivers/staging/dwc2/pci.c index acf2008..a1d2ede 100644

[RFC PATCH 05/41] staging: dwc2: replace some magic numbers by constants

2013-04-05 Thread Matthijs Kooijman
Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c index 9162bed..9a34ac7 100644 --- a/drivers/staging/dwc2/core.c +++

[RFC PATCH 14/41] staging: dwc2: simplify debug output in dwc_hc_init

2013-04-05 Thread Matthijs Kooijman
Before, the value of the hcchar register was shifted and masked and then the debug output extracted the individual values out of the complete hcchar register again. This commit makes the debug prints directly use the original values instead. Signed-off-by: Matthijs Kooijman matth...@stdin.nl ---

[RFC PATCH 35/41] staging: dwc2: set the driver name to dwc2

2013-04-05 Thread Matthijs Kooijman
Previously, it was dwc_otg, but this does not correspond to the directory name and might cause confusion with the old out-of-tree dwc_otg driver of which many versions circulate. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/hcd.c | 2 +- drivers/staging/dwc2/pci.c

[RFC PATCH 27/41] staging: dwc2: add dwc2_disable_common_interrupts function

2013-04-05 Thread Matthijs Kooijman
This function disables all common interrupts, i.e., those that are handled by the common interrupt handler. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 14 ++ drivers/staging/dwc2/core.h | 6 ++ drivers/staging/dwc2/core_intr.c

[RFC PATCH 23/41] staging: dwc2: do not use IRQF_DISABLED

2013-04-05 Thread Matthijs Kooijman
This flag is a deprecated NOOP, interrupt handlers are always run with interupts disabled. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) See include/linux/interrupt.h and 6932bf37 (genirq: Remove

[RFC PATCH 02/41] staging: dwc2: disable dma when no dma_mask was setup

2013-04-05 Thread Matthijs Kooijman
If the platform driver failed to setup a dma_mask, but the hardware advertises support for DMA, before DMA would be enabled in dwc2, but disabled in the usb core, making all connectivity break. With this commit, the dwc2 driver will emit a warning and fall back to slave mode in this case.

[RFC PATCH 06/41] staging: dwc2: remove unneeded check

2013-04-05 Thread Matthijs Kooijman
The value in params-enable_dynamic_fifo can only be true if the corresponding bit in hwcfg2 is set, this is already checked by dwc2_set_param_enable_dynamic_fifo. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 3 +-- 1 file changed, 1 insertion(+), 2

[RFC PATCH 41/41] WIP: enable dwc2 for raspberry pi

2013-04-05 Thread Matthijs Kooijman
--- arch/arm/Kconfig | 1 + arch/arm/boot/dts/bcm2835.dtsi | 6 ++ arch/arm/configs/bcm2835_defconfig | 20 ++-- 3 files changed, 21 insertions(+), 6 deletions(-) This patch is just FYI. diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index

[RFC PATCH 13/41] staging: dwc2: add missing shift

2013-04-05 Thread Matthijs Kooijman
This line extracted the available queue space without properly shifting it. Since the code only cared wether it was zero or not, it worked as expected without the shift, but adding shift makes the code cleaner. While we're here, store the result in a helper variable that was already declared to

[RFC PATCH 12/41] staging: dwc2: simplify register shift expressions

2013-04-05 Thread Matthijs Kooijman
This commit changes expressions from (val shift) (mask shift) to (val mask) shift. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 20 ++--- drivers/staging/dwc2/hcd.c | 62 +++--

[RFC PATCH 32/41] staging: dwc2: register common irq handler in dwc2_core_init

2013-04-05 Thread Matthijs Kooijman
Before, this was initialized in pci.c, after the dwc2_hcd_init was called and the interrupts were enabled. This opened up a small time window where common interrupts could be triggered, but there was no handler for them, causing them to keep triggering infinitely and locking up the machine. On my

[RFC PATCH 40/41] MIPS: ralink: setup dma_mask for the rt305x dwc2 usb controller

2013-04-05 Thread Matthijs Kooijman
--- arch/mips/ralink/rt305x-usb.c | 5 + 1 file changed, 5 insertions(+) This patch is just FYI. diff --git a/arch/mips/ralink/rt305x-usb.c b/arch/mips/ralink/rt305x-usb.c index 793fc82..7d87740 100644 --- a/arch/mips/ralink/rt305x-usb.c +++ b/arch/mips/ralink/rt305x-usb.c @@ -108,6 +108,7

[RFC PATCH 37/41] staging: dwc2: add platform device bindings

2013-04-05 Thread Matthijs Kooijman
This adds a dwc_platform.ko module that can be loaded by using compatible = snps,dwc2 in a device tree. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- Documentation/devicetree/bindings/staging/dwc2.txt | 15 +++ drivers/staging/dwc2/Kconfig | 6 +-

[RFC PATCH 15/41] staging: dwc2: re-use hptxfsiz variable

2013-04-05 Thread Matthijs Kooijman
For some reason, the value of the HPTXFSIZ register was built in the ptxfsiz variable, while there was also a hptxfsiz variable availble. Better just use that. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[RFC PATCH 11/41] staging: dwc2: remove some device-mode related debug code

2013-04-05 Thread Matthijs Kooijman
This code appears to be partially incorrect. Since this is only debug code and only applies to device mode, it seems better to remove this code for now than to invest time fixing it. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 19 --- 1

[RFC PATCH 26/41] staging: dwc2: disable I2CINT in dwc2_disable_host_interrupts

2013-04-05 Thread Matthijs Kooijman
This interrupt is currently not enabled anywhere, but there is some (dummy) handling for it in the host interrupt handler. This marks it as a host mode interrupt, so it makes sense to disable it when disabling the other host mode interrupts. Signed-off-by: Matthijs Kooijman matth...@stdin.nl ---

[RFC PATCH 19/41] staging: dwc2: validate the value for phy_utmi_width

2013-04-05 Thread Matthijs Kooijman
The HWCFG4 register stores the supported utmi width values (8, 16 or both). This commit reads that value and validates the configured value against that. If no (valid) value is given, the parameter defaulted to 8 bits previously. However, the documentation for dwc2_core_params_struct suggests

[RFC PATCH 39/41] MIPS: ralink: use the dwc2 driver for the rt305x USB controller

2013-04-05 Thread Matthijs Kooijman
--- arch/mips/ralink/dts/rt3050.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) This patch is just FYI. diff --git a/arch/mips/ralink/dts/rt3050.dtsi b/arch/mips/ralink/dts/rt3050.dtsi index 5aede8d..2b7ab42 100644 --- a/arch/mips/ralink/dts/rt3050.dtsi +++

[RFC PATCH 24/41] staging: dwc2: do not handle PRTINT in dwc2_handle_common_intr

2013-04-05 Thread Matthijs Kooijman
For host mode, this interrupt is already handled by the hcd interrupt handler. The common interrupt handler additionally did a noop handling (it only cleared the flag and nothing else) when in device mode. Since the driver currently supports only host mode, this shouldn't result in any behaviour

[RFC PATCH 33/41] staging: dwc2: convert to devm_ioremap_resource()

2013-04-05 Thread Matthijs Kooijman
Convert use of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages so the explicit error code can be removed from the failure code path. Signed-off-by: Matthijs Kooijman

[RFC PATCH 16/41] staging: dwc2: remove redundant register reads

2013-04-05 Thread Matthijs Kooijman
For calculating FIFO offsets, the sizes of preceding fifos need to be known. For filling the GDFIFOCFG register, these fifo sizes were read from hardware registers. However, these values were written to these registers just a few lines before, so we can just use the values written instead.

[RFC PATCH 31/41] staging: dwc2: don't pass IRQ_LEVEL to devm_request_irq

2013-04-05 Thread Matthijs Kooijman
It seems this flag is intended to pass to irq_set_status_flags, not request_irq, and is not available on all architectures. Its value corresponds to IRQF_PROBE_SHARED, which shouldn't be needed for this driver, so removing this flag should be safe. Signed-off-by: Matthijs Kooijman

[RFC PATCH 25/41] staging: dwc2: move some interrupt enabling around

2013-04-05 Thread Matthijs Kooijman
Before, the DISCONNINT interrupt was enabled in dwc2_enable_host_interrupts, but handled in dwc2_handle_common_intr, while the RXFLVL interrupt was enabled in dwc2_enable_commont_interrupts and handled in dwc_handle_hcd_intr. This moves the enabling of these interrupts around to match the spot

[RFC PATCH 29/41] staging: dwc2: use functions to disable interrupts

2013-04-05 Thread Matthijs Kooijman
This piece of code manually disabled interrupts, while there are perfectly good functions to do this. Technically, the old code really disabled _all_ interrupts, while the new code only disables a specific list of interrupts, but that list of interrupts includes all interrupts that are ever

[RFC PATCH 08/41] staging: dwc2: add helper variable to simplify code

2013-04-05 Thread Matthijs Kooijman
Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/hcd_intr.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/dwc2/hcd_intr.c b/drivers/staging/dwc2/hcd_intr.c index 12b5a89..281c2f4 100644 --- a/drivers/staging/dwc2/hcd_intr.c

[RFC PATCH 28/41] staging: dwc2: introduce GINTMSK_HOST macro

2013-04-05 Thread Matthijs Kooijman
This simply defines a list of interrupts handled by the the host interrupt handler. Signed-off-by: Matthijs Kooijman matth...@stdin.nl --- drivers/staging/dwc2/core.c | 4 +--- drivers/staging/dwc2/core.h | 4 2 files changed, 5 insertions(+), 3 deletions(-) diff --git

[RFC PATCH 30/41] staging: dwc2: properly separate common and host interrupt enabling

2013-04-05 Thread Matthijs Kooijman
Before, enabling common interrupts would implicitly disable all other interrupts and enabling host interrupts would disable all interrupts and then enable both common and host interrupts. Now, these two are properly separated: each enable function only enables its own interrupts and leaves all

[RFC PATCH 22/41] staging: dwc2: use irq_return_t for interrupt handlers

2013-04-05 Thread Matthijs Kooijman
From: Stephen Warren swar...@wwwdotorg.org The top-level hcd interrupt handlers already used irq_return_t, but the functions to which it delegates the actual work and the common irq handler returned plain ints. In addition, they used the IRQ_RETVAL in the wrong way (but because of the values of

Re: [GIT PULL] USB: changes for v3.10

2013-04-05 Thread Greg KH
On Sat, Apr 06, 2013 at 12:41:02AM +0300, Felipe Balbi wrote: Hi, On Sat, Apr 06, 2013 at 12:21:52AM +0300, Felipe Balbi wrote: Hi Greg, Here's a giant pull request for v3.10. All patches have been on linux-next for quite a while and have gone through build and boot testing. I

Re: [PATCH 0/8] Reorganize R8A7779/Marzen USB code

2013-04-05 Thread Sergei Shtylyov
Hello. On 04/05/2013 08:40 PM, Sergei Shtylyov wrote: Here's the set of 4 patches against the Simon Horman's 'renesas.git' repo, 'renesas-next-20130404v2' tag and the 2 Ether patches I've reposted yesterday. It was created to fix the shortcomings in the R8A7779/Marzen USB platform code

RE: [RFC PATCH 00/41] staging: dwc2: Miscellaneous cleanups and fixes

2013-04-05 Thread Paul Zimmerman
Aargh, resending as plain text. Hi Matthijs, Thanks for the work, this looks like a valuable set of patches. But you really need to split this into a more manageable series of patches. It's really difficult to review when you have so many different things all munged together like this. It's

[PATCH -next] usb: gadget: multi: fix error return code in rndis_do_config()

2013-04-05 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/usb/gadget/multi.c | 4 +++- 1 file changed, 3

[PATCH -next] usb: gadget: f_obex: fix error return code in obex_bind()

2013-04-05 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/usb/gadget/f_obex.c | 1 + 1 file changed, 1 insertion(+)

[PATCH -next] usb: gadget: cdc2: fix error return code in cdc_do_config()

2013-04-05 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/usb/gadget/cdc2.c | 4 +++- 1 file changed, 3

Re: [GIT PULL] USB: changes for v3.10

2013-04-05 Thread Felipe Balbi
Hi, On Fri, Apr 05, 2013 at 03:19:22PM -0700, Greg KH wrote: On Sat, Apr 06, 2013 at 12:41:02AM +0300, Felipe Balbi wrote: Hi, On Sat, Apr 06, 2013 at 12:21:52AM +0300, Felipe Balbi wrote: Hi Greg, Here's a giant pull request for v3.10. All patches have been on linux-next

Re: [PATCH -next] usb: gadget: multi: fix error return code in rndis_do_config()

2013-04-05 Thread Felipe Balbi
On Sat, Apr 06, 2013 at 12:39:34PM +0800, Wei Yongjun wrote: From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn