tegra: usb: disable interrupts when locking
authorSang-Hun Lee <sanlee@nvidia.com>
Tue, 15 May 2012 23:04:41 +0000 (16:04 -0700)
committerSimone Willett <swillett@nvidia.com>
Fri, 25 May 2012 16:56:22 +0000 (09:56 -0700)
commit168971ab0977d04e958671651c0be4be116fee01
tree24c12f96cd2a0d52ad980e26d87e1a423e9f2dad
parenteff5dd61e05e1b01c396609e2129a8ab433d2666
tegra: usb: disable interrupts when locking

Problem description:
 - tegra_udc_irq uses udc->lock
 - Some functions running in the process context was not disabling
   interrupts when locking udc->lock
 - If a function gets interrupted by tegra_udc_irq after locking
   udc->lock, a deadlock occurs, as tegra_udc_irq would also try to
   lock

Fix description:
 - Use an interruption disabling variant of spin_lock

Bug 983958

Change-Id: Ib774847212da64f1f727a207a4821860ffa7b4a8
Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/102693
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
GVS: Gerrit_Virtual_Submit
drivers/usb/gadget/tegra_udc.c