Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83ca8f96 authored by Chandana Kishori Chiluveru's avatar Chandana Kishori Chiluveru Committed by Hemant Kumar
Browse files

usb: f_gsi: Fix BUG_ON for calling sleeping function in invalid context



In Current code driver calling spin_lock_irqsave two time with
different lock. This will lead an issue where irqs remains disabled
on processor. After that calling queu_work function reporting bug with
sleeping function called from invalid context.

Fix this by using spin_lcck instead of spin_lock_irq_save.

Change-Id: I68f05283fe541eb5af123a4ce836ee0fc1dd7e48
Signed-off-by: default avatarChandana Kishori Chiluveru <cchiluve@codeaurora.org>
parent 21a1b0f4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -226,12 +226,12 @@ int ipa_usb_notify_cb(enum ipa_usb_notify_event event,
				return -ENOMEM;
			}
			cpkt_notify_speed->type = GSI_CTRL_NOTIFY_SPEED;
			spin_lock_irqsave(&gsi->c_port.lock, flags);
			spin_lock(&gsi->c_port.lock);
			list_add_tail(&cpkt_notify_connect->list,
					&gsi->c_port.cpkt_resp_q);
			list_add_tail(&cpkt_notify_speed->list,
					&gsi->c_port.cpkt_resp_q);
			spin_unlock_irqrestore(&gsi->c_port.lock, flags);
			spin_unlock(&gsi->c_port.lock);
			gsi_ctrl_send_notification(gsi);
		}