Merge 3.1-rc4 into usb-next
This was done to resolve a conflict in this file: drivers/usb/host/xhci-ring.c Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@@ -252,6 +252,7 @@ config USB_SERIAL_GARMIN
|
||||
|
||||
config USB_SERIAL_IPW
|
||||
tristate "USB IPWireless (3G UMTS TDD) Driver"
|
||||
select USB_SERIAL_WWAN
|
||||
help
|
||||
Say Y here if you want to use a IPWireless USB modem such as
|
||||
the ones supplied by Axity3G/Sentech South Africa.
|
||||
|
||||
@@ -1486,7 +1486,7 @@ static void ftdi_set_max_packet_size(struct usb_serial_port *port)
|
||||
}
|
||||
|
||||
/* set max packet size based on descriptor */
|
||||
priv->max_packet_size = le16_to_cpu(ep_desc->wMaxPacketSize);
|
||||
priv->max_packet_size = usb_endpoint_maxp(ep_desc);
|
||||
|
||||
dev_info(&udev->dev, "Setting MaxPacketSize %d\n", priv->max_packet_size);
|
||||
}
|
||||
|
||||
@@ -3042,7 +3042,7 @@ static int edge_startup(struct usb_serial *serial)
|
||||
|
||||
endpoint = &serial->interface->altsetting[0].
|
||||
endpoint[i].desc;
|
||||
buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
|
||||
buffer_size = usb_endpoint_maxp(endpoint);
|
||||
if (!interrupt_in_found &&
|
||||
(usb_endpoint_is_int_in(endpoint))) {
|
||||
/* we found a interrupt in endpoint */
|
||||
@@ -3107,7 +3107,7 @@ static int edge_startup(struct usb_serial *serial)
|
||||
usb_rcvbulkpipe(dev,
|
||||
endpoint->bEndpointAddress),
|
||||
edge_serial->bulk_in_buffer,
|
||||
le16_to_cpu(endpoint->wMaxPacketSize),
|
||||
usb_endpoint_maxp(endpoint),
|
||||
edge_bulk_in_callback,
|
||||
edge_serial);
|
||||
bulk_in_found = true;
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include <linux/usb.h>
|
||||
#include <linux/usb/serial.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include "usb-wwan.h"
|
||||
|
||||
/*
|
||||
* Version Information
|
||||
@@ -185,7 +186,7 @@ static int ipw_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
|
||||
/*--2: Start reading from the device */
|
||||
dbg("%s: setting up bulk read callback", __func__);
|
||||
usb_serial_generic_open(tty, port);
|
||||
usb_wwan_open(tty, port);
|
||||
|
||||
/*--3: Tell the modem to open the floodgates on the rx bulk channel */
|
||||
dbg("%s:asking modem for RxRead (RXBULK_ON)", __func__);
|
||||
@@ -219,6 +220,29 @@ static int ipw_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* fake probe - only to allocate data structures */
|
||||
static int ipw_probe(struct usb_serial *serial, const struct usb_device_id *id)
|
||||
{
|
||||
struct usb_wwan_intf_private *data;
|
||||
|
||||
data = kzalloc(sizeof(struct usb_wwan_intf_private), GFP_KERNEL);
|
||||
if (!data)
|
||||
return -ENOMEM;
|
||||
|
||||
spin_lock_init(&data->susp_lock);
|
||||
usb_set_serial_data(serial, data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ipw_release(struct usb_serial *serial)
|
||||
{
|
||||
struct usb_wwan_intf_private *data = usb_get_serial_data(serial);
|
||||
|
||||
usb_wwan_release(serial);
|
||||
usb_set_serial_data(serial, NULL);
|
||||
kfree(data);
|
||||
}
|
||||
|
||||
static void ipw_dtr_rts(struct usb_serial_port *port, int on)
|
||||
{
|
||||
struct usb_device *dev = port->serial->dev;
|
||||
@@ -285,7 +309,7 @@ static void ipw_close(struct usb_serial_port *port)
|
||||
dev_err(&port->dev,
|
||||
"Disabling bulk RxRead failed (error = %d)\n", result);
|
||||
|
||||
usb_serial_generic_close(port);
|
||||
usb_wwan_close(port);
|
||||
}
|
||||
|
||||
static struct usb_serial_driver ipw_device = {
|
||||
@@ -297,9 +321,14 @@ static struct usb_serial_driver ipw_device = {
|
||||
.usb_driver = &usb_ipw_driver,
|
||||
.id_table = usb_ipw_ids,
|
||||
.num_ports = 1,
|
||||
.disconnect = usb_wwan_disconnect,
|
||||
.open = ipw_open,
|
||||
.close = ipw_close,
|
||||
.probe = ipw_probe,
|
||||
.attach = usb_wwan_startup,
|
||||
.release = ipw_release,
|
||||
.dtr_rts = ipw_dtr_rts,
|
||||
.write = usb_wwan_write,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -523,7 +523,7 @@ static int opticon_startup(struct usb_serial *serial)
|
||||
goto error;
|
||||
}
|
||||
|
||||
priv->buffer_size = le16_to_cpu(endpoint->wMaxPacketSize) * 2;
|
||||
priv->buffer_size = usb_endpoint_maxp(endpoint) * 2;
|
||||
priv->bulk_in_buffer = kmalloc(priv->buffer_size, GFP_KERNEL);
|
||||
if (!priv->bulk_in_buffer) {
|
||||
dev_err(&priv->udev->dev, "out of memory\n");
|
||||
|
||||
@@ -360,9 +360,6 @@ static void pl2303_set_termios(struct tty_struct *tty,
|
||||
tmp >>= 2;
|
||||
buf[1] <<= 1;
|
||||
}
|
||||
if (tmp > 256) {
|
||||
tmp %= 256;
|
||||
}
|
||||
buf[0] = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ static int symbol_startup(struct usb_serial *serial)
|
||||
goto error;
|
||||
}
|
||||
|
||||
priv->buffer_size = le16_to_cpu(endpoint->wMaxPacketSize) * 2;
|
||||
priv->buffer_size = usb_endpoint_maxp(endpoint) * 2;
|
||||
priv->int_buffer = kmalloc(priv->buffer_size, GFP_KERNEL);
|
||||
if (!priv->int_buffer) {
|
||||
dev_err(&priv->udev->dev, "out of memory\n");
|
||||
|
||||
@@ -912,7 +912,7 @@ int usb_serial_probe(struct usb_interface *interface,
|
||||
goto probe_error;
|
||||
}
|
||||
buffer_size = max_t(int, serial->type->bulk_in_size,
|
||||
le16_to_cpu(endpoint->wMaxPacketSize));
|
||||
usb_endpoint_maxp(endpoint));
|
||||
port->bulk_in_size = buffer_size;
|
||||
port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
|
||||
port->bulk_in_buffer = kmalloc(buffer_size, GFP_KERNEL);
|
||||
@@ -942,7 +942,7 @@ int usb_serial_probe(struct usb_interface *interface,
|
||||
goto probe_error;
|
||||
buffer_size = serial->type->bulk_out_size;
|
||||
if (!buffer_size)
|
||||
buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
|
||||
buffer_size = usb_endpoint_maxp(endpoint);
|
||||
port->bulk_out_size = buffer_size;
|
||||
port->bulk_out_endpointAddress = endpoint->bEndpointAddress;
|
||||
port->bulk_out_buffer = kmalloc(buffer_size, GFP_KERNEL);
|
||||
@@ -990,7 +990,7 @@ int usb_serial_probe(struct usb_interface *interface,
|
||||
"No free urbs available\n");
|
||||
goto probe_error;
|
||||
}
|
||||
buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
|
||||
buffer_size = usb_endpoint_maxp(endpoint);
|
||||
port->interrupt_in_endpointAddress =
|
||||
endpoint->bEndpointAddress;
|
||||
port->interrupt_in_buffer = kmalloc(buffer_size,
|
||||
@@ -1021,7 +1021,7 @@ int usb_serial_probe(struct usb_interface *interface,
|
||||
"No free urbs available\n");
|
||||
goto probe_error;
|
||||
}
|
||||
buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
|
||||
buffer_size = usb_endpoint_maxp(endpoint);
|
||||
port->interrupt_out_size = buffer_size;
|
||||
port->interrupt_out_endpointAddress =
|
||||
endpoint->bEndpointAddress;
|
||||
|
||||
Reference in New Issue
Block a user