Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341711
b: refs/heads/master
c: 213e85d
h: refs/heads/master
i:
  341709: e5024e4
  341707: d172933
  341703: 6755ff1
  341695: c9b3ac8
v: v3
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Dec 2, 2012
1 parent 41c0dec commit dbfe439
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 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: 5b4d72080f49498d2390563aa90f5bc31785406c
refs/heads/master: 213e85d389124f49c82d52cfb4473b8bb672f7c1
18 changes: 14 additions & 4 deletions trunk/drivers/atm/solos-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,9 +868,19 @@ static void pclose(struct atm_vcc *vcc)
{
struct solos_card *card = vcc->dev->dev_data;
unsigned char port = SOLOS_CHAN(vcc->dev);
struct sk_buff *skb;
struct sk_buff *skb, *tmpskb;
struct pkt_hdr *header;

/* Remove any yet-to-be-transmitted packets from the pending queue */
spin_lock(&card->tx_queue_lock);
skb_queue_walk_safe(&card->tx_queue[port], skb, tmpskb) {
if (SKB_CB(skb)->vcc == vcc) {
skb_unlink(skb, &card->tx_queue[port]);
solos_pop(vcc, skb);
}
}
spin_unlock(&card->tx_queue_lock);

skb = alloc_skb(sizeof(*header), GFP_ATOMIC);
if (!skb) {
dev_warn(&card->dev->dev, "Failed to allocate sk_buff in pclose()\n");
Expand All @@ -886,9 +896,6 @@ static void pclose(struct atm_vcc *vcc)
skb_get(skb);
fpga_queue(card, port, skb, NULL);

clear_bit(ATM_VF_ADDR, &vcc->flags);
clear_bit(ATM_VF_READY, &vcc->flags);

if (!wait_event_timeout(card->param_wq, !skb_shared(skb), 5 * HZ))
dev_warn(&card->dev->dev,
"Timeout waiting for VCC close on port %d\n", port);
Expand All @@ -899,6 +906,9 @@ static void pclose(struct atm_vcc *vcc)
tasklet has finished processing any incoming packets (and, more to
the point, using the vcc pointer). */
tasklet_unlock_wait(&card->tlet);

clear_bit(ATM_VF_ADDR, &vcc->flags);

return;
}

Expand Down

0 comments on commit dbfe439

Please sign in to comment.