Re: [PATCH] usb: udc-core: fix asymmetric calls in remove_driver

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

 



Hi,

On Wed, Mar 21, 2012 at 9:50 PM, Felipe Balbi <balbi@xxxxxx> wrote:
> On Wed, Mar 21, 2012 at 09:34:30PM +0530, Kishon Vijay Abraham I wrote:
>> During modprobe of gadget driver, pullup(RUN) is called after udc_start. To
>> follow symmetry while removing gadget driver, pullup(STOP) is called before
>> udc_stop.
>>
>> This is needed for aggressive PM where udc_stop disables the module completely.
>> With aggressive PM, the module is completely disabled, clocks are cut during
>> udc_stop. Calling disconnect after udc_stop necessiates clocks to be enabled
>> again.
>>
>> Cc: Felipe Balbi <balbi@xxxxxx>
>> Signed-off-by: Partha Basak <p-basak2@xxxxxx>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@xxxxxx>
>
> applied, but I changed changelog a bit:
>
> commit 74bb842395d4ffb073d3928dc44a6c0a4fd86908
> Author: Kishon Vijay Abraham I <kishon@xxxxxx>
> Date:   Wed Mar 21 21:34:30 2012 +0530
>
>    usb: gadget: udc-core: fix asymmetric calls in remove_driver
>
>    During modprobe of gadget driver, pullup is called after
>    udc_start. In order to make the exit path symmetric when
>    removing a gadget driver, call pullup before ->udc_stop.
>
>    This is needed to avoid issues with PM where udc_stop
>    disables the module completely (put IP in reset state,
>    cut functional and interface clocks, and so on), which
>    prevents us from accessing the IP's address space,
>    thus creating the possibility of an abort exception
>    when we try to access IP's address space after clocks
>    are off.
>
>    This affects anyone using the sysfs interface for
>    device-initiated connect/disconnect.
>
>    Cc: stable@xxxxxxxxxxxxxxx
>    Signed-off-by: Partha Basak <p-basak2@xxxxxx>
>    Signed-off-by: Kishon Vijay Abraham I <kishon@xxxxxx>
>    Signed-off-by: Felipe Balbi <balbi@xxxxxx>
>
> you still need to address Greg's concern about stable rules ;-)

Sure. I'll resend the patch.

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