[PATCH v2 01/14] USB: use ->reset_resume for port power recovery

2013-11-22 Thread Dan Williams
The reset_resume implementation is in place to recover lost power sessions. Testing has already shown that simply waiting for USB_PORT_STAT_C_CONNECTION is not sufficient for recovering a powered down port. Replace recovery actions in usb_port_runtime_resume() with a deferral to recovery via usb_

[PATCH v2 00/14] fixup and rework port power control

2013-11-22 Thread Dan Williams
Summary: 1/ Half the size of v1 [1], drop peer port power control for now 2/ Make port power control more robust by reusing the existing "reset-resume" implementation for connection recovery. First off, this set diverges significantly from the initial RFC [1]. It frontloads the fixes to the to

[PATCH v2 02/14] USB: synchronize port poweroff and khubd

2013-11-22 Thread Dan Williams
When khubd has evaluated a poweroff bit it needs to guarantee that the powered on state stays stable for the duration of its evaluation. So, hold a pm_runtime reference and synchronize the state of port while evaluating the port status/change registers. Signed-off-by: Dan Williams --- drivers/u

[PATCH v2 06/14] USB: centralize usb port power policy

2013-11-22 Thread Dan Williams
Move all port power policy evaluation to usb_port_runtime_suspend(). Makes it clearer what blocks port power off and is preparation for follow on changes that 1/ make a usb_port a proper (device model) parent of a usb_device 2/ advertise to userspace what constraints are keeping a port powere

[PATCH 1/1] usb: chipidea: imx: avoid unnecessary probe defer every time

2013-11-22 Thread Peter Chen
The ci_hdrc_imx's probe needs usbmisc_imx to be loadded beforehand, so it is better we load usbmisc_imx first. Signed-off-by: Peter Chen --- drivers/usb/chipidea/Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/chipidea/Makefile b/drivers/usb/chipide

[PATCH v2 03/14] USB: kill ->power_is_on flag and usb_hub_set_port_power() wrapper

2013-11-22 Thread Dan Williams
This was gating hub_activate() from setting change bits, but it has been replaced by hub->poweroff_bits. ->power_is_on was difficult to read because in some contexts it was the current power_policy and in other contexts it indicated the power state (hub_power_on()). In contrast hub->poweroff_bits

[PATCH v2 07/14] USB: make usb_ports proper parents of their child usb_devices

2013-11-22 Thread Dan Williams
There are a number of places where pm_runtime manipulations are open coded due to the fact that a usb_port is a device-model nephew of it's "child" usb_device. These can be cleaned up by making a usb_port the device_model parent of its child. With that relationship we rely on the normal pm runtim

[PATCH v2 08/14] USB: show port power state

2013-11-22 Thread Dan Williams
Let userspace discover what is keeping a port powered. Here are the states and the actions userspace can take to enable port power off. PORT= 'active': attached child device is actively using the port echo auto > $PORT//power/control 'pm_qos_no_power_off': child inactive, pm qos flag ke

[PATCH v2 09/14] PM / Runtime: hold device active during device_wakeup_{enable|disable}

2013-11-22 Thread Dan Williams
usbcore blocks powering off hub ports while a downstream source is wakeup enabled. Once wakeup is disabled usbcore can try again to turn off the parent port. Add a pm_runtime reference manipulation to retry a port power down on disable, or pin the port active on enable. Cc: Rafael J. Wysocki Si

[PATCH v2 05/14] USB: allow hubs to runtime suspend after all ports are powered off

2013-11-22 Thread Dan Williams
Ports are kept powered on while they have a wakeup enabled child. If all ports are off it means that wakeup has been disabled on all child devices. As a consequence we can suspend the hub once all ports are powered off. Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 24 +++

[PATCH v2 14/14] USB: Documentation for USB port power off mechanisms

2013-11-22 Thread Dan Williams
From: Lan Tianyu Describe the mechanisms for controlling port power policy and discovering the port power state. Signed-off-by: Lan Tianyu [sarah: wordsmithing] Signed-off-by: Sarah Sharp [djbw: updates for device model, hotplug, and rework changes] Signed-off-by: Dan Williams --- Documentat

[PATCH v2 10/14] USB: notify pm_runtime on change to ->persist_enabled

2013-11-22 Thread Dan Williams
When this setting is changed it may require the parent port to keep power on, or allow it to turn power off. In any event we want pm_runtime to re-evaluate. Signed-off-by: Dan Williams --- drivers/usb/core/sysfs.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/driver

[PATCH v2 04/14] USB: kill unnecessary C_PORT_CONNECTION and broken C_PORT_ENABLE manipulations

2013-11-22 Thread Dan Williams
C_PORT_CONNECTION changes are now handled and cleared while a port is powered off. It is also specified to be cleared by both usb2 [1] and usb3 [2] hubs when the port is in the logical power-off state. C_PORT_ENABLE is cleared by usb2 [3] hubs in the logical power-off state, and the bit is reserv

[PATCH v2 12/14] USB: convert khubd to a workqueue

2013-11-22 Thread Dan Williams
Simply a cleanup as khubd open codes several facilities that are provided by workqueue. Note that the body of hub_events() is kept as a loop to minimize thrash and help the readability of the patch. This does reorder the actions in hub_quiesce(). Since the ->disconnected flag is removed we wait

[PATCH v2 11/14] USB: add connect_type == hotplug as a port poweroff constraint

2013-11-22 Thread Dan Williams
Now that userspace can discover the constraints keeping a port powered, require it to explicitly disable hotplug capability before powering off a port. This makes the 'connect_type' attribute writable, and must be set to 'hardwired' before a port is a candidate for poweroff. Signed-off-by: Dan Wi

[PATCH v2 13/14] USB: ratelimit port power transitions

2013-11-22 Thread Dan Williams
Prevent a recovery result of: "hub 3-0:1.0: Cannot enable port 1. Maybe the USB cable is bad?" Once a populated port has been resumed, do not allow it to be suspended again until it has gone through a recovery cycle (reset_resume). It has been observed that bouncing power without an interveni

[resend PATCH 0/2] xhci "new scheme" enumeration

2013-11-22 Thread Dan Williams
Same as before [1], just rebased for collisions on top of xhci.git/for-usb-next [1]: http://marc.info/?l=linux-usb&m=138446498904406&w=2 --- Dan Williams (2): usb: xhci: change enumeration scheme to 'new scheme' by default xhci: clarify logging in xhci_setup_device drivers/usb/cor

[resend PATCH 1/2] usb: xhci: change enumeration scheme to 'new scheme' by default

2013-11-22 Thread Dan Williams
Change the default enumeration scheme for xhci attached non-SuperSpeed devices from: Reset SetAddress [xhci address-device BSR = 0] GetDescriptor(8) GetDescriptor(18) ...to: Reset [xhci address-device BSR = 1] GetDescriptor(64) Reset SetAddress [xhci address-device BSR

[resend PATCH 2/2] xhci: clarify logging in xhci_setup_device

2013-11-22 Thread Dan Williams
Specify whether we are only performing the context setup portion of the 'address device' command, or the full operation issuing 'SetAddress' on the wire. Signed-off-by: Dan Williams --- drivers/usb/host/xhci.c | 22 -- 1 files changed, 12 insertions(+), 10 deletions(-) dif

[PATCH v5 0/3] usb: ehci+chipidea: fix imx28 "ENGR119653 USB: ARM to USB register error issue"

2013-11-22 Thread Marc Kleine-Budde
Hello, this series implements the suggested workaround for freescale's imx28 Errata, "ENGR119653 USB: ARM to USB register error issue". changes since v4: - fix signature of imx28_ehci_writel(), don't use volatile, make use of __iomem - avoid new #ifdef by using if (IS_ENABLED()) Marc -- To uns

[PATCH v5 2/3] usb: chipidea: add freescale imx28 special write register method

2013-11-22 Thread Marc Kleine-Budde
From: Peter Chen According to Freescale imx28 Errata, "ENGR119653 USB: ARM to USB register error issue", All USB register write operations must use the ARM SWP instruction. So, we implement special hw_write and hw_test_and_clear for imx28. Discussion for it at below: http://marc.info/?l=linux-us

[PATCH v5 1/3] usb: ehci: add freescale imx28 special write register method

2013-11-22 Thread Marc Kleine-Budde
From: Peter Chen According to Freescale imx28 Errata, "ENGR119653 USB: ARM to USB register error issue", All USB register write operations must use the ARM SWP instruction. So, we implement a special ehci_write for imx28. Discussion for it at below: http://marc.info/?l=linux-usb&m=13799639552929

[PATCH v5 3/3] usb: chipidea: imx: set CI_HDRC_IMX28_WRITE_FIX for imx28

2013-11-22 Thread Marc Kleine-Budde
From: Peter Chen Due to imx28 needs ARM swp instruction for writing, we set CI_HDRC_IMX28_WRITE_FIX for imx28. Signed-off-by: Peter Chen Signed-off-by: Marc Kleine-Budde --- drivers/usb/chipidea/ci_hdrc_imx.c | 32 ++-- 1 file changed, 26 insertions(+), 6 deletions

Re: [PATCH] usb: chipidea: fix nobody cared IRQ when booting with host role

2013-11-22 Thread Marc Kleine-Budde
On 11/22/2013 09:12 AM, Peter Chen wrote: >> I've moved the comment in ci_hdrc_probe() in front of the if. Peter can >> you >> please add a meaningfull description to the patch, as I don't fully >> understand >> how it really fixes the problem. Can you add stable on Cc for the final >> patch? >> >>

Re: [PATCH v2 06/14] USB: centralize usb port power policy

2013-11-22 Thread Oliver Neukum
On Fri, 2013-11-22 at 01:07 -0800, Dan Williams wrote: > Move all port power policy evaluation to usb_port_runtime_suspend(). > Makes it clearer what blocks port power off and is preparation for > follow on changes that > 1/ make a usb_port a proper (device model) parent >of a usb_device > 2/ a

Re: [PATCH v2 11/14] USB: add connect_type == hotplug as a port poweroff constraint

2013-11-22 Thread Oliver Neukum
On Fri, 2013-11-22 at 01:08 -0800, Dan Williams wrote: > Now that userspace can discover the constraints keeping a port powered, > require > it to explicitly disable hotplug capability before powering off a port. This > makes the 'connect_type' attribute writable, and must be set to 'hardwired' >

Re: [PATCH v2 14/14] USB: Documentation for USB port power off mechanisms

2013-11-22 Thread Oliver Neukum
On Fri, 2013-11-22 at 01:08 -0800, Dan Williams wrote: > From: Lan Tianyu > > Describe the mechanisms for controlling port power policy and > discovering the port power state. > + power/pm_qos_no_power_off: > + This writable flag is a global enable / disable for port > +

Need help to support USB3.0 HID Keyboard device

2013-11-22 Thread Bhavik Kothari
Hi, I have been working on USB3.0 device driver and wanted to support USB3.0 HID (keyboard). To support HID Keyboard device, I have made below Interface descriptor: Interface Descriptor with alternate settings 0: bLength = 0x9; bDescriptorType = 0x4 (USB_DT_INTERFACE); bInterfac

Re: Read transaction not work for EHCI host controller

2013-11-22 Thread ys6 land
Hi, gerg There are a lot of userspace programs (such as ser2net) that will open the device node in non-blocking mode, so I can't modify each program to make it open the device node in blocking mode. That's the reason why I want to modify the kernel source code related to the line setting function.

Re: [RFC PATCH] PM / Runtime: Allow to inactivate devices during system suspend

2013-11-22 Thread Rafael J. Wysocki
On Friday, November 22, 2013 09:19:32 AM Ulf Hansson wrote: > On 21 November 2013 16:54, Alan Stern wrote: > > On Thu, 21 Nov 2013, Ulf Hansson wrote: > > > >> >> As Rafael mentioned, there is bus/pm_domain code that comes into play > >> >> here, so I'm not sure it's always a bug. > >> >> > >> >>

Re: [PATCH 1/1] usb: chipidea: imx: avoid unnecessary probe defer every time

2013-11-22 Thread Marek Vasut
Hello Peter, > The ci_hdrc_imx's probe needs usbmisc_imx to be loadded beforehand, > so it is better we load usbmisc_imx first. > > Signed-off-by: Peter Chen > --- > drivers/usb/chipidea/Makefile |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/usb/chipide

[PATCH] PM / Sleep: Add pm_generic functions to re-use runtime PM callbacks

2013-11-22 Thread Ulf Hansson
To put devices into low power state during sleep, it sometimes makes sense at subsystem-level to re-use device's runtime PM callbacks. The PM core will at device_suspend_late disable runtime PM, after that we can safely operate on these callbacks. At suspend_late the device will be put into low po

RE: [PATCH 1/1] usb: chipidea: imx: avoid unnecessary probe defer every time

2013-11-22 Thread Peter Chen
> > endif > > > > ifneq ($(CONFIG_OF),) > > - obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc_imx.o usbmisc_imx.o > > + obj-$(CONFIG_USB_CHIPIDEA) += usbmisc_imx.o ci_hdrc_imx.o > > endif > > How is this supposed to work please? Can you explain me the trick here > please? > The probe w

Help needed to force USB host mode on AM335x CPU

2013-11-22 Thread Mark Jackson
We have a custom AM335x board where the USB0_ID pin has been left floating. By default, this puts the USB controller into peripheral mode, but we need to force it into host mode. This can be achieved in s/w by setting some bits in the relevant USB mode register (see TRM 16.5.2.35). This mode reg

Re: [PATCH 1/1] usb: chipidea: imx: avoid unnecessary probe defer every time

2013-11-22 Thread Marek Vasut
Hi Peter, > > > endif > > > > > > ifneq ($(CONFIG_OF),) > > > > > > - obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc_imx.o usbmisc_imx.o > > > + obj-$(CONFIG_USB_CHIPIDEA) += usbmisc_imx.o ci_hdrc_imx.o > > > > > > endif > > > > How is this supposed to work please? Can you explain me the

Re: [PATCH 2/4 V2] ARM: mx28: Add USB PHY overcurrent pinmux

2013-11-22 Thread Michael Grzeschik
Hi Marek, Peter, On Sat, Aug 25, 2012 at 01:51:38AM +0200, Marek Vasut wrote: > Add the pinmux settings for USB PHY overcurrent pins. > > Signed-off-by: Marek Vasut > Cc: Chris Ball > Cc: Fabio Estevam > Cc: Mark Brown > Cc: Shawn Guo > --- > arch/arm/boot/dts/imx28.dtsi | 30

Re: [PATCH v2 09/14] PM / Runtime: hold device active during device_wakeup_{enable|disable}

2013-11-22 Thread Rafael J. Wysocki
On 11/22/2013 10:08 AM, Dan Williams wrote: usbcore blocks powering off hub ports while a downstream source is wakeup enabled. Once wakeup is disabled usbcore can try again to turn off the parent port. Add a pm_runtime reference manipulation to retry a port power down on disable, or pin the por

[PATCH] Allow MUSB DSPS to use "force host" mode

2013-11-22 Thread Mark Jackson
The IDDIG input pin is normally used to determine the USB mode (i.e. HOST or DEVICE). On some systems (e.g. AM335x) leaving this pin floating allows the USB mode to be set via software. This patch adds support for this via the device tree. Signed-off-by: Mark Jackson --- .../devicetree/binding

Re: [PATCH] Allow MUSB DSPS to use "force host" mode

2013-11-22 Thread Sebastian Andrzej Siewior
On 11/22/2013 04:55 PM, Mark Jackson wrote: > The IDDIG input pin is normally used to determine the USB mode > (i.e. HOST or DEVICE). > > On some systems (e.g. AM335x) leaving this pin floating allows > the USB mode to be set via software. So you have a board where musb is used only as host or on

Re: [PATCH] Allow MUSB DSPS to use "force host" mode

2013-11-22 Thread Michael Grzeschik
Hallo, On Fri, Nov 22, 2013 at 03:55:59PM +, Mark Jackson wrote: > The IDDIG input pin is normally used to determine the USB mode > (i.e. HOST or DEVICE). > > On some systems (e.g. AM335x) leaving this pin floating allows > the USB mode to be set via software. > > This patch adds support for

Re: [PATCH] Allow MUSB DSPS to use "force host" mode

2013-11-22 Thread Mark Jackson
On 22/11/13 16:38, Michael Grzeschik wrote: > Hallo, > > On Fri, Nov 22, 2013 at 03:55:59PM +, Mark Jackson wrote: >> The IDDIG input pin is normally used to determine the USB mode >> (i.e. HOST or DEVICE). >> >> On some systems (e.g. AM335x) leaving this pin floating allows >> the USB mode to

Re: [PATCH] Allow MUSB DSPS to use "force host" mode

2013-11-22 Thread Mark Jackson
On 22/11/13 16:33, Sebastian Andrzej Siewior wrote: > On 11/22/2013 04:55 PM, Mark Jackson wrote: >> The IDDIG input pin is normally used to determine the USB mode >> (i.e. HOST or DEVICE). >> >> On some systems (e.g. AM335x) leaving this pin floating allows >> the USB mode to be set via software.

Re: Need help to support USB3.0 HID Keyboard device

2013-11-22 Thread Greg KH
On Fri, Nov 22, 2013 at 04:47:10PM +0530, Bhavik Kothari wrote: > Hi, > > I have been working on USB3.0 device driver and wanted to support > USB3.0 HID (keyboard). > > To support HID Keyboard device, I have made below Interface descriptor: > > Interface Descriptor with alternate settings 0: >

Re: [PATCH 1/1] usb: chipidea: imx: avoid unnecessary probe defer every time

2013-11-22 Thread gre...@linuxfoundation.org
On Fri, Nov 22, 2013 at 04:34:14PM +0100, Marek Vasut wrote: > Hi Peter, > > > > > endif > > > > > > > > ifneq ($(CONFIG_OF),) > > > > > > > > - obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc_imx.o usbmisc_imx.o > > > > + obj-$(CONFIG_USB_CHIPIDEA) += usbmisc_imx.o ci_hdrc_imx.o

Re: [PATCH] Allow MUSB DSPS to use "force host" mode

2013-11-22 Thread Sebastian Andrzej Siewior
On 11/22/2013 05:49 PM, Mark Jackson wrote: >> and the ID pin not on ground or 3.3V? >> What are the side effects? I remember correctly Bin wanted to avoid >> settings this if it could be avoided. > > Yes ... we have a host only USB port and an unconnected ID pin. Is it too late to connect that p

Re: [PATCH] Allow MUSB DSPS to use "force host" mode

2013-11-22 Thread Mark Jackson
On 22/11/13 17:01, Sebastian Andrzej Siewior wrote: > On 11/22/2013 05:49 PM, Mark Jackson wrote: >>> and the ID pin not on ground or 3.3V? >>> What are the side effects? I remember correctly Bin wanted to avoid >>> settings this if it could be avoided. >> >> Yes ... we have a host only USB port an

Re: [PATCH] Allow MUSB DSPS to use "force host" mode

2013-11-22 Thread Sebastian Andrzej Siewior
On 11/22/2013 06:07 PM, Mark Jackson wrote: >> Do you insists on having this change merged upstream? > > No ... I didn't think it would be such an issue, so I'm happy to keep this > as a local patch if that's any better. Felipe, Bin: Second opinion on that? > > Mark J. Sebastian -- To unsubscr

Re: Need help to support USB3.0 HID Keyboard device

2013-11-22 Thread Alan Stern
On Fri, 22 Nov 2013, Bhavik Kothari wrote: > Hi, > > I have been working on USB3.0 device driver and wanted to support USB3.0 > HID (keyboard). > > To support HID Keyboard device, I have made below Interface descriptor: > > Interface Descriptor with alternate settings 0: > > bLength = 0x

Re: [PATCH] PM / Sleep: Add pm_generic functions to re-use runtime PM callbacks

2013-11-22 Thread Alan Stern
On Fri, 22 Nov 2013, Ulf Hansson wrote: > To put devices into low power state during sleep, it sometimes makes > sense at subsystem-level to re-use device's runtime PM callbacks. > > The PM core will at device_suspend_late disable runtime PM, after that > we can safely operate on these callbacks.

Re: [PATCH v2 09/14] PM / Runtime: hold device active during device_wakeup_{enable|disable}

2013-11-22 Thread Dan Williams
On Fri, Nov 22, 2013 at 7:50 AM, Rafael J. Wysocki wrote: > On 11/22/2013 10:08 AM, Dan Williams wrote: >> >> usbcore blocks powering off hub ports while a downstream source is >> wakeup enabled. Once wakeup is disabled usbcore can try again to turn >> off the parent port. Add a pm_runtime refer

Re: [PATCH v2 11/14] USB: add connect_type == hotplug as a port poweroff constraint

2013-11-22 Thread Dan Williams
On Fri, Nov 22, 2013 at 2:41 AM, Oliver Neukum wrote: > On Fri, 2013-11-22 at 01:08 -0800, Dan Williams wrote: >> Now that userspace can discover the constraints keeping a port powered, >> require >> it to explicitly disable hotplug capability before powering off a port. This >> makes the 'conne

Re: [PATCH v2 06/14] USB: centralize usb port power policy

2013-11-22 Thread Dan Williams
On Fri, Nov 22, 2013 at 2:39 AM, Oliver Neukum wrote: > On Fri, 2013-11-22 at 01:07 -0800, Dan Williams wrote: >> Move all port power policy evaluation to usb_port_runtime_suspend(). >> Makes it clearer what blocks port power off and is preparation for >> follow on changes that >> 1/ make a usb_po

Re: [PATCH v2 14/14] USB: Documentation for USB port power off mechanisms

2013-11-22 Thread Dan Williams
On Fri, Nov 22, 2013 at 2:46 AM, Oliver Neukum wrote: > On Fri, 2013-11-22 at 01:08 -0800, Dan Williams wrote: >> From: Lan Tianyu >> >> Describe the mechanisms for controlling port power policy and >> discovering the port power state. > >> + power/pm_qos_no_power_off: >> + This w

RE: [PATCH v2 04/14] USB: kill unnecessary C_PORT_CONNECTION and broken C_PORT_ENABLE manipulations

2013-11-22 Thread Paul Zimmerman
> From: linux-usb-ow...@vger.kernel.org > [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Dan Williams > Sent: Friday, November 22, 2013 1:08 AM > > C_PORT_CONNECTION changes are now handled and cleared while a port is > powered off. It is also specified to be cleared by both usb2 [1] and

Re: [PATCH v2 04/14] USB: kill unnecessary C_PORT_CONNECTION and broken C_PORT_ENABLE manipulations

2013-11-22 Thread Dan Williams
On Fri, Nov 22, 2013 at 12:44 PM, Paul Zimmerman wrote: >> From: linux-usb-ow...@vger.kernel.org >> [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Dan Williams >> Sent: Friday, November 22, 2013 1:08 AM >> >> C_PORT_CONNECTION changes are now handled and cleared while a port is >> powered

Re: [PATCH v2 00/14] fixup and rework port power control

2013-11-22 Thread Alan Stern
On Fri, 22 Nov 2013, Dan Williams wrote: > Summary: > 1/ Half the size of v1 [1], drop peer port power control for now > 2/ Make port power control more robust by reusing the existing >"reset-resume" implementation for connection recovery. > > First off, this set diverges significantly from t

Re: [PATCH 1/1] usb: chipidea: imx: avoid unnecessary probe defer every time

2013-11-22 Thread Marek Vasut
Hello Greg, > On Fri, Nov 22, 2013 at 04:34:14PM +0100, Marek Vasut wrote: > > Hi Peter, > > > > > > > endif > > > > > > > > > > ifneq ($(CONFIG_OF),) > > > > > > > > > > - obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc_imx.o usbmisc_imx.o > > > > > + obj-$(CONFIG_USB_CHIPIDEA) += u

Re: [PATCH v2 09/14] PM / Runtime: hold device active during device_wakeup_{enable|disable}

2013-11-22 Thread Rafael J. Wysocki
On 11/22/2013 8:29 PM, Dan Williams wrote: On Fri, Nov 22, 2013 at 7:50 AM, Rafael J. Wysocki wrote: On 11/22/2013 10:08 AM, Dan Williams wrote: usbcore blocks powering off hub ports while a downstream source is wakeup enabled. Once wakeup is disabled usbcore can try again to turn off the par

Re: [PATCH v2 09/14] PM / Runtime: hold device active during device_wakeup_{enable|disable}

2013-11-22 Thread Dan Williams
On Fri, Nov 22, 2013 at 4:06 PM, Rafael J. Wysocki wrote: > On 11/22/2013 8:29 PM, Dan Williams wrote: >> >> On Fri, Nov 22, 2013 at 7:50 AM, Rafael J. Wysocki >> wrote: >>> >>> On 11/22/2013 10:08 AM, Dan Williams wrote: usbcore blocks powering off hub ports while a downstream source i

Re: [PATCH v2 09/14] PM / Runtime: hold device active during device_wakeup_{enable|disable}

2013-11-22 Thread Rafael J. Wysocki
On 11/23/2013 1:16 AM, Dan Williams wrote: On Fri, Nov 22, 2013 at 4:06 PM, Rafael J. Wysocki wrote: On 11/22/2013 8:29 PM, Dan Williams wrote: On Fri, Nov 22, 2013 at 7:50 AM, Rafael J. Wysocki wrote: On 11/22/2013 10:08 AM, Dan Williams wrote: usbcore blocks powering off hub ports while a

[PATCH 2/8] staging: dwc2: fix potential use after free

2013-11-22 Thread Paul Zimmerman
dwc2_process_non_isoc_desc() can potentially free the qtd, so null out the qtd pointer if the call fails so we don't try to access it later Signed-off-by: Paul Zimmerman --- drivers/staging/dwc2/hcd_ddma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/dwc

[PATCH 3/8] staging: dwc2: rename DWC2_PARAM_TEST to DWC2_OUT_OF_BOUNDS

2013-11-22 Thread Paul Zimmerman
DWC2_PARAM_TEST is not a very good name for this macro, so rename it to DWC2_OUT_OF_BOUNDS Signed-off-by: Paul Zimmerman --- drivers/staging/dwc2/core.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/dwc2/core.c b/drivers/st

[PATCH 1/8] staging: dwc2: fix some functions to return a proper error code

2013-11-22 Thread Paul Zimmerman
Fix some functions called by dwc2_hcd_qtd_add() to return either a proper error code or 0, instead of somewhat random values. Then change the caller of dwc2_hcd_qtd_add() to just check the return value for 0. Signed-off-by: Paul Zimmerman --- drivers/staging/dwc2/hcd.c | 6 +++--- drivers/

[PATCH 0/8] staging: dwc2: cleanups for DWC2 driver

2013-11-22 Thread Paul Zimmerman
This is a series of cleanups to the DWC2 driver, in response to Dan Carpenter's review on 11/15/2013. I believe I have addressed all of Dan's suggestions, except for removing the validation checks from the dwc2_set_param_* functions. We depend on the validation checks for setting a default value fo

[PATCH 4/8] staging: dwc2: make all the dwc2_set_param* functions void

2013-11-22 Thread Paul Zimmerman
We were not checking the return value from any of these functions, so make them void functions Signed-off-by: Paul Zimmerman --- drivers/staging/dwc2/core.c | 193 drivers/staging/dwc2/core.h | 60 +++--- drivers/staging/dwc2/hcd.h | 4 +-

[PATCH 6/8] staging: dwc2: remove useless cast

2013-11-22 Thread Paul Zimmerman
Remove useless cast in dwc2_get_otg_version() Signed-off-by: Paul Zimmerman --- drivers/staging/dwc2/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c index 6149fbc..5b490a4 100644 --- a/drivers/staging/dwc2/core.

[PATCH 5/8] staging: dwc2: remove use of NO_FS_PHY_HW_CHECKS macro

2013-11-22 Thread Paul Zimmerman
NO_FS_PHY_HW_CHECKS is never defined, so remove the conditional code that checks for it being set Signed-off-by: Paul Zimmerman --- drivers/staging/dwc2/core.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c index 8

[PATCH 8/8] staging: dwc2: remove #ifdef DEBUG from a couple of places

2013-11-22 Thread Paul Zimmerman
Remove #ifdef DEBUG from a couple of places where it is not needed Signed-off-by: Paul Zimmerman --- drivers/staging/dwc2/core_intr.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/dwc2/core_intr.c b/drivers/staging/dwc2/core_intr.c index c78bb5d..8205799 100644 --- a/d

[PATCH 7/8] staging: dwc2: rename dwc2_check_core_status()

2013-11-22 Thread Paul Zimmerman
Rename dwc2_check_core_status() to dwc2_is_controller_alive(), and make it a boolean function. Also change the message when the controller is dead to say "dead" instead of "disconnected". Signed-off-by: Paul Zimmerman --- drivers/staging/dwc2/core.c | 6 +++--- drivers/staging/dwc2/core.h

Re: [PATCH v2 09/14] PM / Runtime: hold device active during device_wakeup_{enable|disable}

2013-11-22 Thread Dan Williams
On Fri, Nov 22, 2013 at 4:27 PM, Rafael J. Wysocki wrote: > On 11/23/2013 1:16 AM, Dan Williams wrote: >> >> On Fri, Nov 22, 2013 at 4:06 PM, Rafael J. Wysocki >> wrote: >>> >>> On 11/22/2013 8:29 PM, Dan Williams wrote: On Fri, Nov 22, 2013 at 7:50 AM, Rafael J. Wysocki wrote: >>

[PATCH] usb: chipidea: add support for USB OTG controller on TI-NSPIRE

2013-11-22 Thread dt . tangr
From: Daniel Tang The USB controller in TI-NSPIRE calculators are based off either Freescale's USB OTG controller or the USB controller found in the IMX233, both of which are Chipidea compatible. This patch adds a device tree binding for the controller. Signed-off-by: Daniel Tang --- .../devi

Re: some question about EXDEV status in period schedule

2013-11-22 Thread yoma sophian
SORRY for send the wrong mail :) 2013/11/23 yoma sophian : > 2013/11/19 Alan Stern : >> Please use Reply-To-All so that your message gets sent to the mailing >> list as well as to me. >> >> On Sat, 16 Nov 2013, yoma sophian wrote: >> >>> hi alan: >>> >>> > There are other examples in the log like