Re: [PATCH v2] EHCI: Quirk flag for port power handling on overcurrent.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 04/03/2013 02:18 PM, Christian Engelmayer wrote:

Commit 756aa6b3d536afe85e151138cb03a293998887b3 (ehci-hub: improved
over-current recovery) added port power cycling on overcurrent indications as
needed by the MPC8349 USB controller after resolving of the overcurrent
situation in order to have the host state machine assert the correct port
status again.

Commit 81463c1d707186adbbe534016cd1249edeab0dac (EHCI: only power off port if
over-current is active) solved a thus resulting issue of endless overcurrent
changes in combination with the MAX4967 USB power supply chip that signals
overcurrent when power is not enabled by only powering off a port if the
overcurrent is currently active.

Added quirks flag need_oc_pp_cycle in order to specify the needed behaviour as
there is no common behaviour that can comply with both requirements.
Activated the quirks handling for Freescale 83xx based boards.

Signed-off-by: Christian Engelmayer <christian.engelmayer@xxxxxxxxxxxxxx>
---
Resubmit after comments by Alan Stern and Sergei Shtylyov:

* Moved the quirks flag to the ehci driver structure instead of using a
   module parameter.
* Kept the referenced commit titles in the patch descripton.
* Kept the current driver behaviour in case the newly added flag is not set.

  drivers/usb/host/ehci-fsl.c |    9 +++++++++
  drivers/usb/host/ehci-hub.c |    3 ++-
  drivers/usb/host/ehci.h     |    1 +
  3 files changed, 12 insertions(+), 1 deletions(-)

[...]
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 7d06e77..b392a53 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -839,7 +839,8 @@ static int ehci_hub_control (
  			 * power switching; they're allowed to just limit the
  			 * current.  khubd will turn the power back on.
  			 */
-			if ((temp & PORT_OC) && HCS_PPC(ehci->hcs_params)) {
+			if (((temp & PORT_OC) || (ehci->need_oc_pp_cycle))

   Don't need parens around 'ehci->need_oc_pp_cycle'.
   Anyway, you have my:

Acked-by: Sergei Shtylyov <sergei.shtylyov@xxxxxxxxxxxxxxxxxx>

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux