Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149734
b: refs/heads/master
c: 710b523
h: refs/heads/master
v: v3
  • Loading branch information
Larry Finger authored and David S. Miller committed Apr 13, 2009
1 parent 3c3a148 commit ea0738f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 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: 54cb2284dce50672c40248b8e95940318ec2ca41
refs/heads/master: 710b523ac59426e8bfdea3533f42118e46b9cbfb
33 changes: 25 additions & 8 deletions trunk/drivers/net/usb/kaweth.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
****************************************************************/

/* TODO:
* Fix in_interrupt() problem
* Develop test procedures for USB net interfaces
* Run test procedures
* Fix bugs from previous two steps
Expand Down Expand Up @@ -606,14 +605,30 @@ static void kaweth_usb_receive(struct urb *urb)

struct sk_buff *skb;

if(unlikely(status == -ECONNRESET || status == -ESHUTDOWN))
/* we are killed - set a flag and wake the disconnect handler */
{
if (unlikely(status == -EPIPE)) {
kaweth->stats.rx_errors++;
kaweth->end = 1;
wake_up(&kaweth->term_wait);
dbg("Status was -EPIPE.");
return;
}

if (unlikely(status == -ECONNRESET || status == -ESHUTDOWN)) {
/* we are killed - set a flag and wake the disconnect handler */
kaweth->end = 1;
wake_up(&kaweth->term_wait);
dbg("Status was -ECONNRESET or -ESHUTDOWN.");
return;
}
if (unlikely(status == -EPROTO || status == -ETIME ||
status == -EILSEQ)) {
kaweth->stats.rx_errors++;
dbg("Status was -EPROTO, -ETIME, or -EILSEQ.");
return;
}
if (unlikely(status == -EOVERFLOW)) {
kaweth->stats.rx_errors++;
dbg("Status was -EOVERFLOW.");
}
spin_lock(&kaweth->device_lock);
if (IS_BLOCKED(kaweth->status)) {
spin_unlock(&kaweth->device_lock);
Expand Down Expand Up @@ -883,13 +898,16 @@ static void kaweth_set_rx_mode(struct net_device *net)
****************************************************************/
static void kaweth_async_set_rx_mode(struct kaweth_device *kaweth)
{
int result;
__u16 packet_filter_bitmap = kaweth->packet_filter_bitmap;

kaweth->packet_filter_bitmap = 0;
if (packet_filter_bitmap == 0)
return;

{
int result;
if (in_interrupt())
return;

result = kaweth_control(kaweth,
usb_sndctrlpipe(kaweth->dev, 0),
KAWETH_COMMAND_SET_PACKET_FILTER,
Expand All @@ -906,7 +924,6 @@ static void kaweth_async_set_rx_mode(struct kaweth_device *kaweth)
else {
dbg("Set Rx mode to %d", packet_filter_bitmap);
}
}
}

/****************************************************************
Expand Down

0 comments on commit ea0738f

Please sign in to comment.