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

Commit 07038c15 authored by Sujeet Kumar's avatar Sujeet Kumar
Browse files

USB: u_bam: Acquire the correct gbam port ul or dl spinlock



Allocating and freeing tx and rx requests needs to
protect the idle lists using a spinlock. The spinlock
is separate for ul and dl cases. Before allocating
the requests, acquire the respective spinlock.

CRs-Fixed: 734346
Change-Id: Iecb5ed348140b37be732fbfba137eef31d088639
Signed-off-by: default avatarSujeet Kumar <ksujeet@codeaurora.org>
parent 384d6b23
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1017,9 +1017,9 @@ static int _gbam_start_io(struct gbam_port *port, bool in)
	void		(*ep_complete)(struct usb_ep *, struct usb_request *);

	if (in)
		spinlock = &port->port_lock_ul;
	else
		spinlock = &port->port_lock_dl;
	else
		spinlock = &port->port_lock_ul;

	spin_lock_irqsave(spinlock, flags);
	if (!port->port_usb) {