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

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

 



On Tue, 2 Apr 2013, Christian Engelmayer wrote:

> Commit 756aa6b3d536afe85e151138cb03a293998887b3 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 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 quriks flag oc_pp_cycle in order to specify the needed behaviour as
> there is no common behaviour that can comply with both requirements.
> 
> Signed-off-by: Christian Engelmayer <christian.engelmayer@xxxxxxxxxxxxxx>
> ---
> Did I understand You correctly to add a new flag analogous to eg. ignore_oc,
> or would You prefer a new quirks flag in the driver structure?

I meant a new quirks flag in the driver structure, not a new module 
parameter.

In patch descriptions, when you refer to an earlier commit you should 
always include the commit's title along with its hash ID.  Otherwise 
people can't know what you're talking about until they fire up Git.

For example, above you should have written:

Commit 756aa6b3d536afe85e151138cb03a293998887b3 (ehci-hub: improved 
over-current recovery) added port power cycling...

> @@ -839,7 +839,7 @@ 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 (oc_pp_cycle && HCS_PPC(ehci->hcs_params)) {

You should not do it like this.  If the new flag isn't set, the driver 
must continue to follow its existing behavior.

Alan Stern

--
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