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

Bug#585661: linux-2.6: support for gobi 2000 WWAN devices



On Mon, 2010-06-14 at 14:15 +0100, Mark Hymers wrote:
> On Sun, 13, Jun, 2010 at 03:33:43AM +0100, Ben Hutchings spoke thus..
> > I would prefer if you could provide one patch corresponding to each of
> > the upstream commits, for 2.6.32.  This makes it easier to compare
> > versions and to resolve any future conflicts with stable updates.
> 
> Ok.  I've attached four patches which seem to be the relevant ones from
> git.  Note that I had to modify the second patch in order to apply on
> top of the current tree.  I've compiled and tested this and the device
> works fine.  Please note that I'm not a kernel hacker by any stretch of
> the imagination, so let me know if I need to improve anything.
>  
> > There is no point in doing this for 2.6.34 as we will shortly be moving
> > to 2.6.35 release candidates in experimental.
> 
> Ok, thanks.

These don't quite sum up to gobi_2.6.32.patch; the interdiff from
gobi_2.6.32.patch to these is:

> diff -u source/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig
> --- source/drivers/usb/serial/Kconfig	2010-06-11 21:50:52.087338327 +0100
> +++ b/drivers/usb/serial/Kconfig
> @@ -474,6 +474,7 @@
>  
>  config USB_SERIAL_QUALCOMM
>  	tristate "USB Qualcomm Serial modem"
> +	select USB_SERIAL_WWAN

This presumably corrects a bug in gobi_2.6.32.patch.

>  	help
>  	  Say Y here if you have a Qualcomm USB modem device.  These are
>  	  usually wireless cellular modems.
> @@ -566,7 +567,7 @@
>  	  module will be called keyspan_pda.
>  
>  config USB_SERIAL_WWAN
> -       tristate
> +	tristate
>  
>  config USB_SERIAL_OPTION
>  	tristate "USB driver for GSM and CDMA modems"
> diff -u source/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
> --- source/drivers/usb/serial/qcserial.c	2010-06-11 21:52:03.599336246 +0100
> +++ b/drivers/usb/serial/qcserial.c
> @@ -15,6 +15,7 @@
>  #include <linux/tty_flip.h>
>  #include <linux/usb.h>
>  #include <linux/usb/serial.h>
> +#include <linux/slab.h>
>  #include "usb-wwan.h"
>  
>  #define DRIVER_AUTHOR "Qualcomm Inc"
> @@ -22,7 +23,7 @@
>  
>  static int debug;
>  
> -static const struct usb_device_id id_table[] = {
> +static struct usb_device_id id_table[] = {
>  	{USB_DEVICE(0x05c6, 0x9211)},	/* Acer Gobi QDL device */
>  	{USB_DEVICE(0x05c6, 0x9212)},	/* Acer Gobi Modem Device */
>  	{USB_DEVICE(0x03f0, 0x1f1d)},	/* HP un2400 Gobi Modem Device */
> diff -u source/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
> --- source/drivers/usb/serial/usb_wwan.c	2010-06-11 21:50:52.110835306 +0100
> +++ b/drivers/usb/serial/usb_wwan.c
> @@ -26,6 +26,7 @@
>  #include <linux/kernel.h>
>  #include <linux/jiffies.h>
>  #include <linux/errno.h>
> +#include <linux/slab.h>
>  #include <linux/tty.h>
>  #include <linux/tty_flip.h>
>  #include <linux/module.h>
> @@ -216,7 +217,6 @@
>  	} else {
>  		tty = tty_port_tty_get(&port->port);
>  		if (urb->actual_length) {
> -			tty_buffer_request_room(tty, urb->actual_length);

Should this really have been removed?

>  			tty_insert_flip_string(tty, data, urb->actual_length);
>  			tty_flip_buffer_push(tty);
>  		} else
> @@ -224,9 +224,9 @@
>  		tty_kref_put(tty);
>  
>  		/* Resubmit urb so we continue receiving */
> -		if (port->port.count && status != -ESHUTDOWN) {
> +		if (status != -ESHUTDOWN) {
>  			err = usb_submit_urb(urb, GFP_ATOMIC);
> -			if (err)
> +			if (err && err != -EPERM)

What's correct here?

>  				printk(KERN_ERR "%s: resubmit read urb failed. "
>  				       "(%d)", __func__, err);
>  			else
> @@ -610,7 +610,7 @@
>  	for (i = 0; i < serial->num_ports; i++) {
>  		port = serial->port[i];
>  		if (!port->interrupt_in_urb) {
> -			dbg("%s: No interrupt URB for port %d\n", __func__, i);
> +			dbg("%s: No interrupt URB for port %d", __func__, i);

The newline should definitely be included, though this is not really
important.

>  			continue;
>  		}
>  		err = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO);
> diff -u source/drivers/usb/serial/usb-wwan.h b/drivers/usb/serial/usb-wwan.h
> --- source/drivers/usb/serial/usb-wwan.h	2010-06-11 21:50:52.103759088 +0100
> +++ b/drivers/usb/serial/usb-wwan.h
> @@ -39,6 +39,7 @@
>  	unsigned int suspended:1;
>  	int in_flight;
>  	int (*send_setup) (struct usb_serial_port *port);
> +	void *private;
>  };
>  
>  struct usb_wwan_port_private {

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: