usb: mdm_bridge: Make rx_done queue length check independent of rx throttle

rx_done queue length was checked only when rx throttle condition was true.
rx throttle condition is asynchronous because of which sometimes queue
length value becomes much larger than stop_submit_urb_limit when rx
throttled condition is false. Hence check the queue length irrespective of
the rx throttle condition before submitting the rx urb. Also increase the
stop_submit_urb_limit to same as the flow control enable threshold value
in downlink direction.

Change-Id: I3dd915b04bfe7640a98e40809831a7b45c39dfd7
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
diff --git a/drivers/usb/misc/mdm_data_bridge.c b/drivers/usb/misc/mdm_data_bridge.c
index a0e82cb..632a8c7 100644
--- a/drivers/usb/misc/mdm_data_bridge.c
+++ b/drivers/usb/misc/mdm_data_bridge.c
@@ -24,7 +24,7 @@
 #define MAX_RX_URBS			50
 #define RMNET_RX_BUFSIZE		2048
 
-#define STOP_SUBMIT_URB_LIMIT		400
+#define STOP_SUBMIT_URB_LIMIT		500
 #define FLOW_CTRL_EN_THRESHOLD		500
 #define FLOW_CTRL_DISABLE		300
 #define FLOW_CTRL_SUPPORT		1
@@ -157,12 +157,9 @@
 	}
 
 	spin_lock_irqsave(&dev->rx_done.lock, flags);
-	if (dev->rx_done.qlen > stop_submit_urb_limit && rx_throttled(brdg)) {
-		spin_unlock_irqrestore(&dev->rx_done.lock, flags);
-		return;
-	}
-
 	while (!list_empty(&dev->rx_idle)) {
+		if (dev->rx_done.qlen > stop_submit_urb_limit)
+			break;
 
 		rx_idle = list_first_entry(&dev->rx_idle, struct urb, urb_list);
 		list_del(&rx_idle->urb_list);