Browse Source

fix luminaryif_rx pooling issue

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1038 bbd45198-f89e-11dd-88c7-29a3b14d5316
qiuyiuestc 14 years ago
parent
commit
6e4a697d0c
1 changed files with 7 additions and 6 deletions
  1. 7 6
      bsp/lm3s/luminaryif.c

+ 7 - 6
bsp/lm3s/luminaryif.c

@@ -121,9 +121,10 @@ void luminaryif_isr(void)
         // Indicate that a packet has been received.
         // Indicate that a packet has been received.
         //
         //
         rt_err_t result;
         rt_err_t result;
+		
         /* a frame has been received */
         /* a frame has been received */
         result = eth_device_ready((struct eth_device*)&(luminaryif_dev->parent));
         result = eth_device_ready((struct eth_device*)&(luminaryif_dev->parent));
-        RT_ASSERT(result == RT_EOK);
+
         //
         //
         // Disable Ethernet RX Interrupt.
         // Disable Ethernet RX Interrupt.
         //
         //
@@ -340,6 +341,11 @@ struct pbuf * luminaryif_rx(rt_device_t dev)
 
 
     if(!EthernetPacketAvail(ETH_BASE))
     if(!EthernetPacketAvail(ETH_BASE))
     {
     {
+        // 
+        // Enable Ethernet RX Interrupt. 
+        // 
+        EthernetIntEnable(ETH_BASE, ETH_INT_RX); 
+
         return(NULL);
         return(NULL);
     }
     }
 	
 	
@@ -417,11 +423,6 @@ struct pbuf * luminaryif_rx(rt_device_t dev)
 #endif
 #endif
     }
     }
 	
 	
-    //
-    // Enable Ethernet RX Interrupt.
-    //
-    EthernetIntEnable(ETH_BASE, ETH_INT_RX);
-		
     return(p);
     return(p);
 }
 }