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

Commit eb2890c9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: fsl_udc_core: Fix kernel oops on module removal
  USB: option: TLAYTECH TUE800 support
  USB: r8a66597-hcd: fix cannot detect a device when uses_new_polling is set
  USB: serial: sierra driver autopm fixes
  USB: serial: sierra driver send_setup() autopm fix
  USB: rndis_host: debug info clobbered before it is logged
parents fa488e22 37c4fd8c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -362,12 +362,12 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
			retval = -EINVAL;
			goto halt_fail_and_release;
		}
		dev->hard_mtu = tmp;
		net->mtu = dev->hard_mtu - net->hard_header_len;
		dev_warn(&intf->dev,
			 "dev can't take %u byte packets (max %u), "
			 "adjusting MTU to %u\n",
			 dev->hard_mtu, tmp, net->mtu);
			 dev->hard_mtu, tmp, tmp - net->hard_header_len);
		dev->hard_mtu = tmp;
		net->mtu = dev->hard_mtu - net->hard_header_len;
	}

	/* REVISIT:  peripheral "alignment" request is ignored ... */
+1 −1
Original line number Diff line number Diff line
@@ -2139,7 +2139,7 @@ static int fsl_proc_read(char *page, char **start, off_t off, int count,
static void fsl_udc_release(struct device *dev)
{
	complete(udc_controller->done);
	dma_free_coherent(dev, udc_controller->ep_qh_size,
	dma_free_coherent(dev->parent, udc_controller->ep_qh_size,
			udc_controller->ep_qh, udc_controller->ep_qh_dma);
	kfree(udc_controller);
}
+13 −10
Original line number Diff line number Diff line
@@ -1003,9 +1003,7 @@ static void r8a66597_check_syssts(struct r8a66597 *r8a66597, int port,
	if (syssts == SE0) {
		r8a66597_write(r8a66597, ~ATTCH, get_intsts_reg(port));
		r8a66597_bset(r8a66597, ATTCHE, get_intenb_reg(port));
		return;
	}

	} else {
		if (syssts == FS_JSTS)
			r8a66597_bset(r8a66597, HSE, get_syscfg_reg(port));
		else if (syssts == LS_JSTS)
@@ -1018,12 +1016,17 @@ static void r8a66597_check_syssts(struct r8a66597 *r8a66597, int port,
			usb_hcd_resume_root_hub(r8a66597_to_hcd(r8a66597));
	}

	usb_hcd_poll_rh_status(r8a66597_to_hcd(r8a66597));
}

/* this function must be called with interrupt disabled */
static void r8a66597_usb_connect(struct r8a66597 *r8a66597, int port)
{
	u16 speed = get_rh_usb_speed(r8a66597, port);
	struct r8a66597_root_hub *rh = &r8a66597->root_hub[port];

	rh->port &= ~((1 << USB_PORT_FEAT_HIGHSPEED) |
		      (1 << USB_PORT_FEAT_LOWSPEED));
	if (speed == HSMODE)
		rh->port |= (1 << USB_PORT_FEAT_HIGHSPEED);
	else if (speed == LSMODE)
+4 −0
Original line number Diff line number Diff line
@@ -315,6 +315,9 @@ static int option_resume(struct usb_serial *serial);
#define QISDA_PRODUCT_H20_4515			0x4515
#define QISDA_PRODUCT_H20_4519			0x4519

/* TLAYTECH PRODUCTS */
#define TLAYTECH_VENDOR_ID			0x20B9
#define TLAYTECH_PRODUCT_TEU800			0x1682

/* TOSHIBA PRODUCTS */
#define TOSHIBA_VENDOR_ID			0x0930
@@ -593,6 +596,7 @@ static struct usb_device_id option_ids[] = {
	{ USB_DEVICE_AND_INTERFACE_INFO(ALINK_VENDOR_ID, ALINK_PRODUCT_3GU, 0xff, 0xff, 0xff) },
	{ USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S) },
	{ USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) },
	{ USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) },
	{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, option_ids);
+22 −16
Original line number Diff line number Diff line
@@ -296,7 +296,6 @@ struct sierra_port_private {
	int dsr_state;
	int dcd_state;
	int ri_state;

	unsigned int opened:1;
};

@@ -306,6 +305,8 @@ static int sierra_send_setup(struct usb_serial_port *port)
	struct sierra_port_private *portdata;
	__u16 interface = 0;
	int val = 0;
	int do_send = 0;
	int retval;

	dev_dbg(&port->dev, "%s\n", __func__);

@@ -324,10 +325,7 @@ static int sierra_send_setup(struct usb_serial_port *port)
		 */
		if (port->interrupt_in_urb) {
			/* send control message */
			return usb_control_msg(serial->dev,
				usb_rcvctrlpipe(serial->dev, 0),
				0x22, 0x21, val, interface,
				NULL, 0, USB_CTRL_SET_TIMEOUT);
			do_send = 1;
		}
	}

@@ -339,12 +337,18 @@ static int sierra_send_setup(struct usb_serial_port *port)
			interface = 1;
		else if (port->bulk_out_endpointAddress == 5)
			interface = 2;
		return usb_control_msg(serial->dev,
			usb_rcvctrlpipe(serial->dev, 0),
			0x22, 0x21, val, interface,
			NULL, 0, USB_CTRL_SET_TIMEOUT);

		do_send = 1;
	}
	if (!do_send)
		return 0;

	usb_autopm_get_interface(serial->interface);
	retval = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
		0x22, 0x21, val, interface, NULL, 0, USB_CTRL_SET_TIMEOUT);
	usb_autopm_put_interface(serial->interface);

	return retval;
}

static void sierra_set_termios(struct tty_struct *tty,
@@ -773,8 +777,11 @@ static void sierra_close(struct usb_serial_port *port)

	if (serial->dev) {
		mutex_lock(&serial->disc_mutex);
		if (!serial->disconnected)
		if (!serial->disconnected) {
			serial->interface->needs_remote_wakeup = 0;
			usb_autopm_get_interface(serial->interface);
			sierra_send_setup(port);
		}
		mutex_unlock(&serial->disc_mutex);
		spin_lock_irq(&intfdata->susp_lock);
		portdata->opened = 0;
@@ -788,8 +795,6 @@ static void sierra_close(struct usb_serial_port *port)
			sierra_release_urb(portdata->in_urbs[i]);
			portdata->in_urbs[i] = NULL;
		}
		usb_autopm_get_interface(serial->interface);
		serial->interface->needs_remote_wakeup = 0;
	}
}

@@ -827,6 +832,8 @@ static int sierra_open(struct tty_struct *tty, struct usb_serial_port *port)
	if (err) {
		/* get rid of everything as in close */
		sierra_close(port);
		/* restore balance for autopm */
		usb_autopm_put_interface(serial->interface);
		return err;
	}
	sierra_send_setup(port);
@@ -915,7 +922,7 @@ static void sierra_release(struct usb_serial *serial)
#ifdef CONFIG_PM
static void stop_read_write_urbs(struct usb_serial *serial)
{
	int i, j;
	int i;
	struct usb_serial_port *port;
	struct sierra_port_private *portdata;

@@ -923,8 +930,7 @@ static void stop_read_write_urbs(struct usb_serial *serial)
	for (i = 0; i < serial->num_ports; ++i) {
		port = serial->port[i];
		portdata = usb_get_serial_port_data(port);
		for (j = 0; j < N_IN_URB; j++)
			usb_kill_urb(portdata->in_urbs[j]);
		sierra_stop_rx_urbs(port);
		usb_kill_anchored_urbs(&portdata->active);
	}
}