ChangeSet 1.865.28.11, 2002/12/19 12:11:06-08:00, [EMAIL PROTECTED]

[PATCH] USB cdc-ether: GFP_KERNEL in interrupt

cdc-ether has the same problem as cdc-acm.
  - usb_submit_urb() under spinlock or in interrupt must use GFP_ATOMIC


diff -Nru a/drivers/usb/net/cdc-ether.c b/drivers/usb/net/cdc-ether.c
--- a/drivers/usb/net/cdc-ether.c       Sun Dec 22 00:39:46 2002
+++ b/drivers/usb/net/cdc-ether.c       Sun Dec 22 00:39:46 2002
@@ -132,7 +132,7 @@
 
        // Give this to the USB subsystem so it can tell us
        // when more data arrives.
-       if ( (res = usb_submit_urb(ether_dev->rx_urb, GFP_KERNEL)) ) {
+       if ( (res = usb_submit_urb(ether_dev->rx_urb, GFP_ATOMIC)) ) {
                warn("%s failed submint rx_urb %d", __FUNCTION__, res);
        }
 
@@ -302,7 +302,7 @@
        ether_dev->tx_urb->transfer_buffer_length = count;
        
        // Send the URB on its merry way.
-       if ((res = usb_submit_urb(ether_dev->tx_urb, GFP_KERNEL)))  {
+       if ((res = usb_submit_urb(ether_dev->tx_urb, GFP_ATOMIC)))  {
                // Hmm...  It didn't go. Tell someone...
                warn("failed tx_urb %d", res);
                // update some stats...


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to