diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-29 11:56:17 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-29 11:56:17 -0400 |
commit | 6ed962a208cb72cff29a107d6c73247526017ddb (patch) | |
tree | 2bd574d8ab1db79b369735ba0519a66760019189 /drivers/usb/serial | |
parent | c6a389f123b9f68d605bb7e0f9b32ec1e3e14132 (diff) | |
parent | 55a46269ccedec140e2487a2344e8a247d48b385 (diff) |
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>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/Kconfig | 1 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/io_edgeport.c | 4 | ||||
-rw-r--r-- | drivers/usb/serial/ipw.c | 33 | ||||
-rw-r--r-- | drivers/usb/serial/opticon.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/pl2303.c | 3 | ||||
-rw-r--r-- | drivers/usb/serial/symbolserial.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 8 |
8 files changed, 41 insertions, 14 deletions
diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig index b71e309116a3..677f577c0243 100644 --- a/drivers/usb/serial/Kconfig +++ b/drivers/usb/serial/Kconfig | |||
@@ -252,6 +252,7 @@ config USB_SERIAL_GARMIN | |||
252 | 252 | ||
253 | config USB_SERIAL_IPW | 253 | config USB_SERIAL_IPW |
254 | tristate "USB IPWireless (3G UMTS TDD) Driver" | 254 | tristate "USB IPWireless (3G UMTS TDD) Driver" |
255 | select USB_SERIAL_WWAN | ||
255 | help | 256 | help |
256 | Say Y here if you want to use a IPWireless USB modem such as | 257 | Say Y here if you want to use a IPWireless USB modem such as |
257 | the ones supplied by Axity3G/Sentech South Africa. | 258 | the ones supplied by Axity3G/Sentech South Africa. |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 5fc13e717911..5cfd87eb1a8b 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -1486,7 +1486,7 @@ static void ftdi_set_max_packet_size(struct usb_serial_port *port) | |||
1486 | } | 1486 | } |
1487 | 1487 | ||
1488 | /* set max packet size based on descriptor */ | 1488 | /* set max packet size based on descriptor */ |
1489 | priv->max_packet_size = le16_to_cpu(ep_desc->wMaxPacketSize); | 1489 | priv->max_packet_size = usb_endpoint_maxp(ep_desc); |
1490 | 1490 | ||
1491 | dev_info(&udev->dev, "Setting MaxPacketSize %d\n", priv->max_packet_size); | 1491 | dev_info(&udev->dev, "Setting MaxPacketSize %d\n", priv->max_packet_size); |
1492 | } | 1492 | } |
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index abf095be5753..2ee807523f53 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c | |||
@@ -3042,7 +3042,7 @@ static int edge_startup(struct usb_serial *serial) | |||
3042 | 3042 | ||
3043 | endpoint = &serial->interface->altsetting[0]. | 3043 | endpoint = &serial->interface->altsetting[0]. |
3044 | endpoint[i].desc; | 3044 | endpoint[i].desc; |
3045 | buffer_size = le16_to_cpu(endpoint->wMaxPacketSize); | 3045 | buffer_size = usb_endpoint_maxp(endpoint); |
3046 | if (!interrupt_in_found && | 3046 | if (!interrupt_in_found && |
3047 | (usb_endpoint_is_int_in(endpoint))) { | 3047 | (usb_endpoint_is_int_in(endpoint))) { |
3048 | /* we found a interrupt in endpoint */ | 3048 | /* we found a interrupt in endpoint */ |
@@ -3107,7 +3107,7 @@ static int edge_startup(struct usb_serial *serial) | |||
3107 | usb_rcvbulkpipe(dev, | 3107 | usb_rcvbulkpipe(dev, |
3108 | endpoint->bEndpointAddress), | 3108 | endpoint->bEndpointAddress), |
3109 | edge_serial->bulk_in_buffer, | 3109 | edge_serial->bulk_in_buffer, |
3110 | le16_to_cpu(endpoint->wMaxPacketSize), | 3110 | usb_endpoint_maxp(endpoint), |
3111 | edge_bulk_in_callback, | 3111 | edge_bulk_in_callback, |
3112 | edge_serial); | 3112 | edge_serial); |
3113 | bulk_in_found = true; | 3113 | bulk_in_found = true; |
diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c index ca77e88836bd..5170799d6e94 100644 --- a/drivers/usb/serial/ipw.c +++ b/drivers/usb/serial/ipw.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/usb.h> | 47 | #include <linux/usb.h> |
48 | #include <linux/usb/serial.h> | 48 | #include <linux/usb/serial.h> |
49 | #include <linux/uaccess.h> | 49 | #include <linux/uaccess.h> |
50 | #include "usb-wwan.h" | ||
50 | 51 | ||
51 | /* | 52 | /* |
52 | * Version Information | 53 | * Version Information |
@@ -185,7 +186,7 @@ static int ipw_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
185 | 186 | ||
186 | /*--2: Start reading from the device */ | 187 | /*--2: Start reading from the device */ |
187 | dbg("%s: setting up bulk read callback", __func__); | 188 | dbg("%s: setting up bulk read callback", __func__); |
188 | usb_serial_generic_open(tty, port); | 189 | usb_wwan_open(tty, port); |
189 | 190 | ||
190 | /*--3: Tell the modem to open the floodgates on the rx bulk channel */ | 191 | /*--3: Tell the modem to open the floodgates on the rx bulk channel */ |
191 | dbg("%s:asking modem for RxRead (RXBULK_ON)", __func__); | 192 | 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) | |||
219 | return 0; | 220 | return 0; |
220 | } | 221 | } |
221 | 222 | ||
223 | /* fake probe - only to allocate data structures */ | ||
224 | static int ipw_probe(struct usb_serial *serial, const struct usb_device_id *id) | ||
225 | { | ||
226 | struct usb_wwan_intf_private *data; | ||
227 | |||
228 | data = kzalloc(sizeof(struct usb_wwan_intf_private), GFP_KERNEL); | ||
229 | if (!data) | ||
230 | return -ENOMEM; | ||
231 | |||
232 | spin_lock_init(&data->susp_lock); | ||
233 | usb_set_serial_data(serial, data); | ||
234 | return 0; | ||
235 | } | ||
236 | |||
237 | static void ipw_release(struct usb_serial *serial) | ||
238 | { | ||
239 | struct usb_wwan_intf_private *data = usb_get_serial_data(serial); | ||
240 | |||
241 | usb_wwan_release(serial); | ||
242 | usb_set_serial_data(serial, NULL); | ||
243 | kfree(data); | ||
244 | } | ||
245 | |||
222 | static void ipw_dtr_rts(struct usb_serial_port *port, int on) | 246 | static void ipw_dtr_rts(struct usb_serial_port *port, int on) |
223 | { | 247 | { |
224 | struct usb_device *dev = port->serial->dev; | 248 | struct usb_device *dev = port->serial->dev; |
@@ -285,7 +309,7 @@ static void ipw_close(struct usb_serial_port *port) | |||
285 | dev_err(&port->dev, | 309 | dev_err(&port->dev, |
286 | "Disabling bulk RxRead failed (error = %d)\n", result); | 310 | "Disabling bulk RxRead failed (error = %d)\n", result); |
287 | 311 | ||
288 | usb_serial_generic_close(port); | 312 | usb_wwan_close(port); |
289 | } | 313 | } |
290 | 314 | ||
291 | static struct usb_serial_driver ipw_device = { | 315 | static struct usb_serial_driver ipw_device = { |
@@ -297,9 +321,14 @@ static struct usb_serial_driver ipw_device = { | |||
297 | .usb_driver = &usb_ipw_driver, | 321 | .usb_driver = &usb_ipw_driver, |
298 | .id_table = usb_ipw_ids, | 322 | .id_table = usb_ipw_ids, |
299 | .num_ports = 1, | 323 | .num_ports = 1, |
324 | .disconnect = usb_wwan_disconnect, | ||
300 | .open = ipw_open, | 325 | .open = ipw_open, |
301 | .close = ipw_close, | 326 | .close = ipw_close, |
327 | .probe = ipw_probe, | ||
328 | .attach = usb_wwan_startup, | ||
329 | .release = ipw_release, | ||
302 | .dtr_rts = ipw_dtr_rts, | 330 | .dtr_rts = ipw_dtr_rts, |
331 | .write = usb_wwan_write, | ||
303 | }; | 332 | }; |
304 | 333 | ||
305 | 334 | ||
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index 96423f3c8ef3..c248a9147439 100644 --- a/drivers/usb/serial/opticon.c +++ b/drivers/usb/serial/opticon.c | |||
@@ -523,7 +523,7 @@ static int opticon_startup(struct usb_serial *serial) | |||
523 | goto error; | 523 | goto error; |
524 | } | 524 | } |
525 | 525 | ||
526 | priv->buffer_size = le16_to_cpu(endpoint->wMaxPacketSize) * 2; | 526 | priv->buffer_size = usb_endpoint_maxp(endpoint) * 2; |
527 | priv->bulk_in_buffer = kmalloc(priv->buffer_size, GFP_KERNEL); | 527 | priv->bulk_in_buffer = kmalloc(priv->buffer_size, GFP_KERNEL); |
528 | if (!priv->bulk_in_buffer) { | 528 | if (!priv->bulk_in_buffer) { |
529 | dev_err(&priv->udev->dev, "out of memory\n"); | 529 | dev_err(&priv->udev->dev, "out of memory\n"); |
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 1d33260de014..0ae840f789a4 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -360,9 +360,6 @@ static void pl2303_set_termios(struct tty_struct *tty, | |||
360 | tmp >>= 2; | 360 | tmp >>= 2; |
361 | buf[1] <<= 1; | 361 | buf[1] <<= 1; |
362 | } | 362 | } |
363 | if (tmp > 256) { | ||
364 | tmp %= 256; | ||
365 | } | ||
366 | buf[0] = tmp; | 363 | buf[0] = tmp; |
367 | } | 364 | } |
368 | } | 365 | } |
diff --git a/drivers/usb/serial/symbolserial.c b/drivers/usb/serial/symbolserial.c index d9457bd4fe10..7096f799b071 100644 --- a/drivers/usb/serial/symbolserial.c +++ b/drivers/usb/serial/symbolserial.c | |||
@@ -226,7 +226,7 @@ static int symbol_startup(struct usb_serial *serial) | |||
226 | goto error; | 226 | goto error; |
227 | } | 227 | } |
228 | 228 | ||
229 | priv->buffer_size = le16_to_cpu(endpoint->wMaxPacketSize) * 2; | 229 | priv->buffer_size = usb_endpoint_maxp(endpoint) * 2; |
230 | priv->int_buffer = kmalloc(priv->buffer_size, GFP_KERNEL); | 230 | priv->int_buffer = kmalloc(priv->buffer_size, GFP_KERNEL); |
231 | if (!priv->int_buffer) { | 231 | if (!priv->int_buffer) { |
232 | dev_err(&priv->udev->dev, "out of memory\n"); | 232 | dev_err(&priv->udev->dev, "out of memory\n"); |
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 1c031309ab25..cc274fdf2627 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -912,7 +912,7 @@ int usb_serial_probe(struct usb_interface *interface, | |||
912 | goto probe_error; | 912 | goto probe_error; |
913 | } | 913 | } |
914 | buffer_size = max_t(int, serial->type->bulk_in_size, | 914 | buffer_size = max_t(int, serial->type->bulk_in_size, |
915 | le16_to_cpu(endpoint->wMaxPacketSize)); | 915 | usb_endpoint_maxp(endpoint)); |
916 | port->bulk_in_size = buffer_size; | 916 | port->bulk_in_size = buffer_size; |
917 | port->bulk_in_endpointAddress = endpoint->bEndpointAddress; | 917 | port->bulk_in_endpointAddress = endpoint->bEndpointAddress; |
918 | port->bulk_in_buffer = kmalloc(buffer_size, GFP_KERNEL); | 918 | port->bulk_in_buffer = kmalloc(buffer_size, GFP_KERNEL); |
@@ -942,7 +942,7 @@ int usb_serial_probe(struct usb_interface *interface, | |||
942 | goto probe_error; | 942 | goto probe_error; |
943 | buffer_size = serial->type->bulk_out_size; | 943 | buffer_size = serial->type->bulk_out_size; |
944 | if (!buffer_size) | 944 | if (!buffer_size) |
945 | buffer_size = le16_to_cpu(endpoint->wMaxPacketSize); | 945 | buffer_size = usb_endpoint_maxp(endpoint); |
946 | port->bulk_out_size = buffer_size; | 946 | port->bulk_out_size = buffer_size; |
947 | port->bulk_out_endpointAddress = endpoint->bEndpointAddress; | 947 | port->bulk_out_endpointAddress = endpoint->bEndpointAddress; |
948 | port->bulk_out_buffer = kmalloc(buffer_size, GFP_KERNEL); | 948 | port->bulk_out_buffer = kmalloc(buffer_size, GFP_KERNEL); |
@@ -990,7 +990,7 @@ int usb_serial_probe(struct usb_interface *interface, | |||
990 | "No free urbs available\n"); | 990 | "No free urbs available\n"); |
991 | goto probe_error; | 991 | goto probe_error; |
992 | } | 992 | } |
993 | buffer_size = le16_to_cpu(endpoint->wMaxPacketSize); | 993 | buffer_size = usb_endpoint_maxp(endpoint); |
994 | port->interrupt_in_endpointAddress = | 994 | port->interrupt_in_endpointAddress = |
995 | endpoint->bEndpointAddress; | 995 | endpoint->bEndpointAddress; |
996 | port->interrupt_in_buffer = kmalloc(buffer_size, | 996 | port->interrupt_in_buffer = kmalloc(buffer_size, |
@@ -1021,7 +1021,7 @@ int usb_serial_probe(struct usb_interface *interface, | |||
1021 | "No free urbs available\n"); | 1021 | "No free urbs available\n"); |
1022 | goto probe_error; | 1022 | goto probe_error; |
1023 | } | 1023 | } |
1024 | buffer_size = le16_to_cpu(endpoint->wMaxPacketSize); | 1024 | buffer_size = usb_endpoint_maxp(endpoint); |
1025 | port->interrupt_out_size = buffer_size; | 1025 | port->interrupt_out_size = buffer_size; |
1026 | port->interrupt_out_endpointAddress = | 1026 | port->interrupt_out_endpointAddress = |
1027 | endpoint->bEndpointAddress; | 1027 | endpoint->bEndpointAddress; |