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_
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
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
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
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
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
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
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
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
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 +++
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
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
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
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
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
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
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
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
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
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
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
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
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
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?
>>
>>
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
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'
>
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
> +
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
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.
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.
> >> >>
> >> >>
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
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
> > 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
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
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
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
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
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
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
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
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
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.
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:
>
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
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
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
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
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
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.
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
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
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
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
> 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
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
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
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
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
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
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
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
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
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/
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
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 +-
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.
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
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
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
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:
>>
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
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
72 matches
Mail list logo