usb: rmnet: Queue usb buffers to h/w when skb queue is empty
rx buffers are not given to usb h/w when skb queue was empty which
is resulting in data stall. Fix data stall by queueing usb buffers
when skb queue is empty.
Change-Id: Id71bb4e3628efd9d76ec90431871faee7b2831ee
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
diff --git a/drivers/usb/gadget/u_bam.c b/drivers/usb/gadget/u_bam.c
index 869a541..9605927 100644
--- a/drivers/usb/gadget/u_bam.c
+++ b/drivers/usb/gadget/u_bam.c
@@ -294,10 +294,9 @@
while (d->pending_with_bam < BAM_PENDING_LIMIT) {
skb = __skb_dequeue(&d->rx_skb_q);
- if (!skb) {
- spin_unlock_irqrestore(&port->port_lock, flags);
- return;
- }
+ if (!skb)
+ break;
+
d->pending_with_bam++;
d->to_modem++;