Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225270
b: refs/heads/master
c: d7bb5f8
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Stezenbach authored and John W. Linville committed Dec 13, 2010
1 parent 61ebe87 commit 20c08dd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 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: 8d4ff3f3045e57f57634559c063bf70993a1d00a
refs/heads/master: d7bb5f845f437662296adbfeaab8fbfce1c32289
14 changes: 12 additions & 2 deletions trunk/drivers/net/wireless/rt2x00/rt2x00usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ static void rt2x00usb_kick_tx_entry(struct queue_entry *entry)
struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev);
struct queue_entry_priv_usb *entry_priv = entry->priv_data;
u32 length;
int status;

if (!test_and_clear_bit(ENTRY_DATA_PENDING, &entry->flags))
return;
Expand All @@ -251,7 +252,10 @@ static void rt2x00usb_kick_tx_entry(struct queue_entry *entry)
entry->skb->data, length,
rt2x00usb_interrupt_txdone, entry);

if (usb_submit_urb(entry_priv->urb, GFP_ATOMIC)) {
status = usb_submit_urb(entry_priv->urb, GFP_ATOMIC);
if (status) {
if (status == -ENODEV)
clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
set_bit(ENTRY_DATA_IO_FAILED, &entry->flags);
rt2x00lib_dmadone(entry);
}
Expand Down Expand Up @@ -435,6 +439,7 @@ void rt2x00usb_clear_entry(struct queue_entry *entry)
to_usb_device_intf(entry->queue->rt2x00dev->dev);
struct queue_entry_priv_usb *entry_priv = entry->priv_data;
int pipe;
int status;

entry->flags = 0;

Expand All @@ -445,7 +450,12 @@ void rt2x00usb_clear_entry(struct queue_entry *entry)
rt2x00usb_interrupt_rxdone, entry);

set_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags);
if (usb_submit_urb(entry_priv->urb, GFP_ATOMIC)) {

status = usb_submit_urb(entry_priv->urb, GFP_ATOMIC);
if (status) {
if (status == -ENODEV)
clear_bit(DEVICE_STATE_PRESENT,
&entry->queue->rt2x00dev->flags);
set_bit(ENTRY_DATA_IO_FAILED, &entry->flags);
rt2x00lib_dmadone(entry);
}
Expand Down

0 comments on commit 20c08dd

Please sign in to comment.