31
31
****************************************************************/
32
32
33
33
/* TODO:
34
- * Fix in_interrupt() problem
35
34
* Develop test procedures for USB net interfaces
36
35
* Run test procedures
37
36
* Fix bugs from previous two steps
@@ -606,14 +605,30 @@ static void kaweth_usb_receive(struct urb *urb)
606
605
607
606
struct sk_buff * skb ;
608
607
609
- if (unlikely (status == - ECONNRESET || status == - ESHUTDOWN ))
610
- /* we are killed - set a flag and wake the disconnect handler */
611
- {
608
+ if (unlikely (status == - EPIPE )) {
609
+ kaweth -> stats .rx_errors ++ ;
612
610
kaweth -> end = 1 ;
613
611
wake_up (& kaweth -> term_wait );
612
+ dbg ("Status was -EPIPE." );
614
613
return ;
615
614
}
616
-
615
+ if (unlikely (status == - ECONNRESET || status == - ESHUTDOWN )) {
616
+ /* we are killed - set a flag and wake the disconnect handler */
617
+ kaweth -> end = 1 ;
618
+ wake_up (& kaweth -> term_wait );
619
+ dbg ("Status was -ECONNRESET or -ESHUTDOWN." );
620
+ return ;
621
+ }
622
+ if (unlikely (status == - EPROTO || status == - ETIME ||
623
+ status == - EILSEQ )) {
624
+ kaweth -> stats .rx_errors ++ ;
625
+ dbg ("Status was -EPROTO, -ETIME, or -EILSEQ." );
626
+ return ;
627
+ }
628
+ if (unlikely (status == - EOVERFLOW )) {
629
+ kaweth -> stats .rx_errors ++ ;
630
+ dbg ("Status was -EOVERFLOW." );
631
+ }
617
632
spin_lock (& kaweth -> device_lock );
618
633
if (IS_BLOCKED (kaweth -> status )) {
619
634
spin_unlock (& kaweth -> device_lock );
@@ -883,13 +898,16 @@ static void kaweth_set_rx_mode(struct net_device *net)
883
898
****************************************************************/
884
899
static void kaweth_async_set_rx_mode (struct kaweth_device * kaweth )
885
900
{
901
+ int result ;
886
902
__u16 packet_filter_bitmap = kaweth -> packet_filter_bitmap ;
903
+
887
904
kaweth -> packet_filter_bitmap = 0 ;
888
905
if (packet_filter_bitmap == 0 )
889
906
return ;
890
907
891
- {
892
- int result ;
908
+ if (in_interrupt ())
909
+ return ;
910
+
893
911
result = kaweth_control (kaweth ,
894
912
usb_sndctrlpipe (kaweth -> dev , 0 ),
895
913
KAWETH_COMMAND_SET_PACKET_FILTER ,
@@ -906,7 +924,6 @@ static void kaweth_async_set_rx_mode(struct kaweth_device *kaweth)
906
924
else {
907
925
dbg ("Set Rx mode to %d" , packet_filter_bitmap );
908
926
}
909
- }
910
927
}
911
928
912
929
/****************************************************************
0 commit comments