diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-11-22 13:06:44 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-11-22 13:06:44 -0500 |
commit | 0bd2af46839ad6262d25714a6ec0365db9d6b98f (patch) | |
tree | dcced72d230d69fd0c5816ac6dd03ab84799a93e /drivers/usb/class/cdc-acm.c | |
parent | e138a5d2356729b8752e88520cc1525fae9794ac (diff) | |
parent | f26b90440cd74c78fe10c9bd5160809704a9627c (diff) |
Merge ../scsi-rc-fixes-2.6
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index ec4d1d756725..9a9012fd284b 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -325,7 +325,7 @@ static void acm_rx_tasklet(unsigned long _acm) | |||
325 | struct acm_rb *buf; | 325 | struct acm_rb *buf; |
326 | struct tty_struct *tty = acm->tty; | 326 | struct tty_struct *tty = acm->tty; |
327 | struct acm_ru *rcv; | 327 | struct acm_ru *rcv; |
328 | //unsigned long flags; | 328 | unsigned long flags; |
329 | int i = 0; | 329 | int i = 0; |
330 | dbg("Entering acm_rx_tasklet"); | 330 | dbg("Entering acm_rx_tasklet"); |
331 | 331 | ||
@@ -333,15 +333,15 @@ static void acm_rx_tasklet(unsigned long _acm) | |||
333 | return; | 333 | return; |
334 | 334 | ||
335 | next_buffer: | 335 | next_buffer: |
336 | spin_lock(&acm->read_lock); | 336 | spin_lock_irqsave(&acm->read_lock, flags); |
337 | if (list_empty(&acm->filled_read_bufs)) { | 337 | if (list_empty(&acm->filled_read_bufs)) { |
338 | spin_unlock(&acm->read_lock); | 338 | spin_unlock_irqrestore(&acm->read_lock, flags); |
339 | goto urbs; | 339 | goto urbs; |
340 | } | 340 | } |
341 | buf = list_entry(acm->filled_read_bufs.next, | 341 | buf = list_entry(acm->filled_read_bufs.next, |
342 | struct acm_rb, list); | 342 | struct acm_rb, list); |
343 | list_del(&buf->list); | 343 | list_del(&buf->list); |
344 | spin_unlock(&acm->read_lock); | 344 | spin_unlock_irqrestore(&acm->read_lock, flags); |
345 | 345 | ||
346 | dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d", buf, buf->size); | 346 | dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d", buf, buf->size); |
347 | 347 | ||
@@ -356,29 +356,29 @@ next_buffer: | |||
356 | memmove(buf->base, buf->base + i, buf->size - i); | 356 | memmove(buf->base, buf->base + i, buf->size - i); |
357 | buf->size -= i; | 357 | buf->size -= i; |
358 | spin_unlock(&acm->throttle_lock); | 358 | spin_unlock(&acm->throttle_lock); |
359 | spin_lock(&acm->read_lock); | 359 | spin_lock_irqsave(&acm->read_lock, flags); |
360 | list_add(&buf->list, &acm->filled_read_bufs); | 360 | list_add(&buf->list, &acm->filled_read_bufs); |
361 | spin_unlock(&acm->read_lock); | 361 | spin_unlock_irqrestore(&acm->read_lock, flags); |
362 | return; | 362 | return; |
363 | } | 363 | } |
364 | spin_unlock(&acm->throttle_lock); | 364 | spin_unlock(&acm->throttle_lock); |
365 | 365 | ||
366 | spin_lock(&acm->read_lock); | 366 | spin_lock_irqsave(&acm->read_lock, flags); |
367 | list_add(&buf->list, &acm->spare_read_bufs); | 367 | list_add(&buf->list, &acm->spare_read_bufs); |
368 | spin_unlock(&acm->read_lock); | 368 | spin_unlock_irqrestore(&acm->read_lock, flags); |
369 | goto next_buffer; | 369 | goto next_buffer; |
370 | 370 | ||
371 | urbs: | 371 | urbs: |
372 | while (!list_empty(&acm->spare_read_bufs)) { | 372 | while (!list_empty(&acm->spare_read_bufs)) { |
373 | spin_lock(&acm->read_lock); | 373 | spin_lock_irqsave(&acm->read_lock, flags); |
374 | if (list_empty(&acm->spare_read_urbs)) { | 374 | if (list_empty(&acm->spare_read_urbs)) { |
375 | spin_unlock(&acm->read_lock); | 375 | spin_unlock_irqrestore(&acm->read_lock, flags); |
376 | return; | 376 | return; |
377 | } | 377 | } |
378 | rcv = list_entry(acm->spare_read_urbs.next, | 378 | rcv = list_entry(acm->spare_read_urbs.next, |
379 | struct acm_ru, list); | 379 | struct acm_ru, list); |
380 | list_del(&rcv->list); | 380 | list_del(&rcv->list); |
381 | spin_unlock(&acm->read_lock); | 381 | spin_unlock_irqrestore(&acm->read_lock, flags); |
382 | 382 | ||
383 | buf = list_entry(acm->spare_read_bufs.next, | 383 | buf = list_entry(acm->spare_read_bufs.next, |
384 | struct acm_rb, list); | 384 | struct acm_rb, list); |
@@ -400,9 +400,9 @@ urbs: | |||
400 | free-urbs-pool and resubmited ASAP */ | 400 | free-urbs-pool and resubmited ASAP */ |
401 | if (usb_submit_urb(rcv->urb, GFP_ATOMIC) < 0) { | 401 | if (usb_submit_urb(rcv->urb, GFP_ATOMIC) < 0) { |
402 | list_add(&buf->list, &acm->spare_read_bufs); | 402 | list_add(&buf->list, &acm->spare_read_bufs); |
403 | spin_lock(&acm->read_lock); | 403 | spin_lock_irqsave(&acm->read_lock, flags); |
404 | list_add(&rcv->list, &acm->spare_read_urbs); | 404 | list_add(&rcv->list, &acm->spare_read_urbs); |
405 | spin_unlock(&acm->read_lock); | 405 | spin_unlock_irqrestore(&acm->read_lock, flags); |
406 | return; | 406 | return; |
407 | } | 407 | } |
408 | } | 408 | } |
@@ -1083,6 +1083,9 @@ static struct usb_device_id acm_ids[] = { | |||
1083 | { USB_DEVICE(0x0482, 0x0203), /* KYOCERA AH-K3001V */ | 1083 | { USB_DEVICE(0x0482, 0x0203), /* KYOCERA AH-K3001V */ |
1084 | .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ | 1084 | .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ |
1085 | }, | 1085 | }, |
1086 | { USB_DEVICE(0x079b, 0x000f), /* BT On-Air USB MODEM */ | ||
1087 | .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ | ||
1088 | }, | ||
1086 | { USB_DEVICE(0x0ace, 0x1608), /* ZyDAS 56K USB MODEM */ | 1089 | { USB_DEVICE(0x0ace, 0x1608), /* ZyDAS 56K USB MODEM */ |
1087 | .driver_info = SINGLE_RX_URB, /* firmware bug */ | 1090 | .driver_info = SINGLE_RX_URB, /* firmware bug */ |
1088 | }, | 1091 | }, |