Re: zte_ev not properly handling ZTE AC2726 CDMA modems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 25, 2013 at 06:15:28PM -0800, Dmitry Kunilov wrote:
> Hi everyone,
> 
> As a late follow-up to the discussion that happened in June about moving
> support for most ZTE CDMA devices from option.c to zte_ev.c (where the
> decision was to "convert and see if anyone complains"), I'd like to complain
> :)
> 
> We have a park of approximately thirty ZTE AC2726 EVDO modems connected to
> Broadcom-based routers running Linux-mips. After recent upgrade from ancient
> 2.6.22 to relatively modern 3.9.11, all 30 are having the same problem: pppd
> connects and Internet access works for 20 to 60 seconds, then connectivity
> drops and pppd logs an LCP timeout. After that, pppd is able to restart the
> connection and run for another 20-60 seconds.
> 
> I did notice that these modems are now handled by zte_ev instead of option,
> so I went and moved all the DEVICE_INFO's back from zte_ev.c to option.c and
> also disabled zte_ev module in the kernel configuration. After this change,
> the modems work just fine, like they did on 2.6.22 - using the option
> driver.
> 
> Please let me know if there is any debug info I can collect to help resolve
> this issue. 

Would you mind trying the patch below (against v3.12)?

Thanks,
Johan

>From a84412903e68e9e5ae4693ddd1fa7d9c780cbd28 Mon Sep 17 00:00:00 2001
From: Johan Hovold <jhovold@xxxxxxxxx>
Date: Tue, 26 Nov 2013 15:26:49 +0100
Subject: [PATCH] USB: serial: zte_ev debug patch

Continue to read on errors.
Warn about failed reads and writes.
Increase zte_ev buffer sizes.
Fix race in write which could lead to (temporarily) degraded throughput
(backport of fix in Greg's usb-linus branch).
---
 drivers/usb/serial/generic.c | 23 ++++++++---------------
 drivers/usb/serial/zte_ev.c  |  2 ++
 2 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 1f31e6b4c251..b5d976ae1b0d 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -176,14 +176,7 @@ retry:
 		return result;
 	}
 
-	/* Try sending off another urb, unless in irq context (in which case
-	 * there will be no free urb). */
-	if (!in_irq())
-		goto retry;
-
-	clear_bit_unlock(USB_SERIAL_WRITE_BUSY, &port->flags);
-
-	return 0;
+	goto retry;
 }
 
 /**
@@ -369,15 +362,15 @@ void usb_serial_generic_read_bulk_callback(struct urb *urb)
 	dev_dbg(&port->dev, "%s - urb %d, len %d\n", __func__, i,
 							urb->actual_length);
 
-	if (urb->status) {
-		dev_dbg(&port->dev, "%s - non-zero urb status: %d\n",
+	if (!urb->status) {
+		usb_serial_debug_data(&port->dev, __func__, urb->actual_length,
+									data);
+		port->serial->type->process_read_urb(urb);
+	} else {
+		dev_warn(&port->dev, "%s - non-zero urb status: %d\n",
 			__func__, urb->status);
-		return;
 	}
 
-	usb_serial_debug_data(&port->dev, __func__, urb->actual_length, data);
-	port->serial->type->process_read_urb(urb);
-
 	/* Throttle the device if requested by tty */
 	spin_lock_irqsave(&port->lock, flags);
 	port->throttled = port->throttle_req;
@@ -406,7 +399,7 @@ void usb_serial_generic_write_bulk_callback(struct urb *urb)
 	spin_unlock_irqrestore(&port->lock, flags);
 
 	if (status) {
-		dev_dbg(&port->dev, "%s - non-zero urb status: %d\n",
+		dev_warn(&port->dev, "%s - non-zero urb status: %d\n",
 			__func__, status);
 
 		spin_lock_irqsave(&port->lock, flags);
diff --git a/drivers/usb/serial/zte_ev.c b/drivers/usb/serial/zte_ev.c
index fca4c752a4ed..36152e3e2605 100644
--- a/drivers/usb/serial/zte_ev.c
+++ b/drivers/usb/serial/zte_ev.c
@@ -307,6 +307,8 @@ static struct usb_serial_driver zio_device = {
 	},
 	.id_table =		id_table,
 	.num_ports =		1,
+	.bulk_in_size =		2048,
+	.bulk_out_size =	2048,
 	.open =			zte_ev_usb_serial_open,
 	.close =		zte_ev_usb_serial_close,
 };
-- 
1.8.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux