]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/net/macb.c
Merge branch 'master' into csb1725
[mv-sheeva.git] / drivers / net / macb.c
index ff2f158ab0b92d88597bf68d1b1a13cf89ca4e41..f69e73e2191e9e4a54f3f617e14d8ac6c33734ef 100644 (file)
@@ -407,7 +407,7 @@ static int macb_rx_frame(struct macb *bp, unsigned int first_frag,
        }
 
        skb_reserve(skb, RX_OFFSET);
-       skb->ip_summed = CHECKSUM_NONE;
+       skb_checksum_none_assert(skb);
        skb_put(skb, len);
 
        for (frag = first_frag; ; frag = NEXT_RX(frag)) {
@@ -515,14 +515,15 @@ static int macb_poll(struct napi_struct *napi, int budget)
                (unsigned long)status, budget);
 
        work_done = macb_rx(bp, budget);
-       if (work_done < budget)
+       if (work_done < budget) {
                napi_complete(napi);
 
-       /*
-        * We've done what we can to clean the buffers. Make sure we
-        * get notified when new packets arrive.
-        */
-       macb_writel(bp, IER, MACB_RX_INT_FLAGS);
+               /*
+                * We've done what we can to clean the buffers. Make sure we
+                * get notified when new packets arrive.
+                */
+               macb_writel(bp, IER, MACB_RX_INT_FLAGS);
+       }
 
        /* TODO: Handle errors */
 
@@ -550,12 +551,16 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id)
                }
 
                if (status & MACB_RX_INT_FLAGS) {
+                       /*
+                        * There's no point taking any more interrupts
+                        * until we have processed the buffers. The
+                        * scheduling call may fail if the poll routine
+                        * is already scheduled, so disable interrupts
+                        * now.
+                        */
+                       macb_writel(bp, IDR, MACB_RX_INT_FLAGS);
+
                        if (napi_schedule_prep(&bp->napi)) {
-                               /*
-                                * There's no point taking any more interrupts
-                                * until we have processed the buffers
-                                */
-                               macb_writel(bp, IDR, MACB_RX_INT_FLAGS);
                                dev_dbg(&bp->pdev->dev,
                                        "scheduling RX softirq\n");
                                __napi_schedule(&bp->napi);