--- pegasus.c.alt       Tue Feb  5 00:48:13 2002
+++ pegasus.c   Tue Feb  5 00:52:17 2002
@@ -157,7 +157,8 @@
        add_wait_queue( &pegasus->ctrl_wait, &wait );
        set_current_state( TASK_UNINTERRUPTIBLE );
 
-       if ( (ret = usb_submit_urb( pegasus->ctrl_urb )) ) {
+       /* using ATOMIC, we'd never wake up if we slept */
+       if ( (ret = usb_submit_urb( pegasus->ctrl_urb, GFP_ATOMIC )) ) {
                err( __FUNCTION__ " BAD CTRLs %d", ret);
                goto out;
        }
@@ -207,7 +208,7 @@
        add_wait_queue( &pegasus->ctrl_wait, &wait );
        set_current_state( TASK_UNINTERRUPTIBLE );
 
-       if ( (ret = usb_submit_urb( pegasus->ctrl_urb )) ) {
+       if ( (ret = usb_submit_urb( pegasus->ctrl_urb, GFP_ATOMIC )) ) {
                err( __FUNCTION__ " BAD CTRL %d", ret);
                goto out;
        }
@@ -257,7 +258,7 @@
        add_wait_queue( &pegasus->ctrl_wait, &wait );
        set_current_state( TASK_UNINTERRUPTIBLE );
 
-       if ( (ret = usb_submit_urb( pegasus->ctrl_urb )) ) {
+       if ( (ret = usb_submit_urb( pegasus->ctrl_urb, GFP_ATOMIC )) ) {
                err( __FUNCTION__ " BAD CTRL %d", ret);
                goto out;
        }
@@ -287,7 +288,7 @@
                          (char *)&pegasus->dr,
                          pegasus->eth_regs, 3, ctrl_callback, pegasus );
 
-       if ( (ret = usb_submit_urb( pegasus->ctrl_urb )) )
+       if ( (ret = usb_submit_urb( pegasus->ctrl_urb, GFP_ATOMIC )) )
                err( __FUNCTION__ " BAD CTRL %d, flags %x",ret,pegasus->flags );
 
        return  ret;
@@ -573,7 +574,7 @@
                        usb_rcvbulkpipe(pegasus->usb, 1),
                        pegasus->rx_buff, PEGASUS_MAX_MTU, 
                        read_bulk_callback, pegasus );
-       if ( (res = usb_submit_urb(pegasus->rx_urb)) )
+       if ( (res = usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC)) )
                warn( __FUNCTION__ " failed submint rx_urb %d", res);
        pegasus->flags &= ~PEGASUS_RX_BUSY;
 }
@@ -661,7 +662,7 @@
                        pegasus->tx_buff, PEGASUS_MAX_MTU, 
                        write_bulk_callback, pegasus );
        pegasus->tx_urb->transfer_buffer_length = count;
-       if ((res = usb_submit_urb(pegasus->tx_urb))) {
+       if ((res = usb_submit_urb(pegasus->tx_urb, GFP_ATOMIC))) {
                warn("failed tx_urb %d", res);
                pegasus->stats.tx_errors++;
                netif_start_queue( net );
@@ -721,14 +722,14 @@
                        usb_rcvbulkpipe(pegasus->usb, 1),
                        pegasus->rx_buff, PEGASUS_MAX_MTU, 
                        read_bulk_callback, pegasus );
-       if ( (res = usb_submit_urb(pegasus->rx_urb)) )
+       if ( (res = usb_submit_urb(pegasus->rx_urb, GFP_KERNEL)) )
                warn( __FUNCTION__ " failed rx_urb %d", res );
 #ifdef PEGASUS_USE_INTR
        FILL_INT_URB( pegasus->intr_urb, pegasus->usb,
                        usb_rcvintpipe(pegasus->usb, 3),
                        pegasus->intr_buff, sizeof(pegasus->intr_buff),
                        intr_callback, pegasus, pegasus->intr_interval );
-       if ( (res = usb_submit_urb(pegasus->intr_urb)) )
+       if ( (res = usb_submit_urb(pegasus->intr_urb, GFP_KERNEL)) )
                warn( __FUNCTION__ " failed intr_urb %d", res);
 #endif
        netif_start_queue( net );

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to