Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39807
b: refs/heads/master
c: 762f007
h: refs/heads/master
i:
  39805: 8c2b67a
  39803: 4e457b6
  39799: fccc28d
  39791: 8ac1976
  39775: 30c1c65
  39743: 7224036
  39679: 1d66859
v: v3
  • Loading branch information
Jarek Poplawski authored and Greg Kroah-Hartman committed Oct 17, 2006
1 parent dc45e02 commit b89952b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a7a0c9cd1f45c2cae38ebe0951246bf94399818a
refs/heads/master: 762f007b05446f5c63268fb2c28646f28959ee4b
26 changes: 13 additions & 13 deletions trunk/drivers/usb/class/cdc-acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,23 +325,23 @@ static void acm_rx_tasklet(unsigned long _acm)
struct acm_rb *buf;
struct tty_struct *tty = acm->tty;
struct acm_ru *rcv;
//unsigned long flags;
unsigned long flags;
int i = 0;
dbg("Entering acm_rx_tasklet");

if (!ACM_READY(acm) || acm->throttle)
return;

next_buffer:
spin_lock(&acm->read_lock);
spin_lock_irqsave(&acm->read_lock, flags);
if (list_empty(&acm->filled_read_bufs)) {
spin_unlock(&acm->read_lock);
spin_unlock_irqrestore(&acm->read_lock, flags);
goto urbs;
}
buf = list_entry(acm->filled_read_bufs.next,
struct acm_rb, list);
list_del(&buf->list);
spin_unlock(&acm->read_lock);
spin_unlock_irqrestore(&acm->read_lock, flags);

dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d", buf, buf->size);

Expand All @@ -356,29 +356,29 @@ static void acm_rx_tasklet(unsigned long _acm)
memmove(buf->base, buf->base + i, buf->size - i);
buf->size -= i;
spin_unlock(&acm->throttle_lock);
spin_lock(&acm->read_lock);
spin_lock_irqsave(&acm->read_lock, flags);
list_add(&buf->list, &acm->filled_read_bufs);
spin_unlock(&acm->read_lock);
spin_unlock_irqrestore(&acm->read_lock, flags);
return;
}
spin_unlock(&acm->throttle_lock);

spin_lock(&acm->read_lock);
spin_lock_irqsave(&acm->read_lock, flags);
list_add(&buf->list, &acm->spare_read_bufs);
spin_unlock(&acm->read_lock);
spin_unlock_irqrestore(&acm->read_lock, flags);
goto next_buffer;

urbs:
while (!list_empty(&acm->spare_read_bufs)) {
spin_lock(&acm->read_lock);
spin_lock_irqsave(&acm->read_lock, flags);
if (list_empty(&acm->spare_read_urbs)) {
spin_unlock(&acm->read_lock);
spin_unlock_irqrestore(&acm->read_lock, flags);
return;
}
rcv = list_entry(acm->spare_read_urbs.next,
struct acm_ru, list);
list_del(&rcv->list);
spin_unlock(&acm->read_lock);
spin_unlock_irqrestore(&acm->read_lock, flags);

buf = list_entry(acm->spare_read_bufs.next,
struct acm_rb, list);
Expand All @@ -400,9 +400,9 @@ static void acm_rx_tasklet(unsigned long _acm)
free-urbs-pool and resubmited ASAP */
if (usb_submit_urb(rcv->urb, GFP_ATOMIC) < 0) {
list_add(&buf->list, &acm->spare_read_bufs);
spin_lock(&acm->read_lock);
spin_lock_irqsave(&acm->read_lock, flags);
list_add(&rcv->list, &acm->spare_read_urbs);
spin_unlock(&acm->read_lock);
spin_unlock_irqrestore(&acm->read_lock, flags);
return;
}
}
Expand Down

0 comments on commit b89952b

Please sign in to comment.