~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to net/core/netpoll.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
193
193
 
194
194
        poll_napi(dev);
195
195
 
 
196
        if (dev->priv_flags & IFF_SLAVE) {
 
197
                if (dev->npinfo) {
 
198
                        struct net_device *bond_dev = dev->master;
 
199
                        struct sk_buff *skb;
 
200
                        while ((skb = skb_dequeue(&dev->npinfo->arp_tx))) {
 
201
                                skb->dev = bond_dev;
 
202
                                skb_queue_tail(&bond_dev->npinfo->arp_tx, skb);
 
203
                        }
 
204
                }
 
205
        }
 
206
 
196
207
        service_arp_queue(dev->npinfo);
197
208
 
198
209
        zap_completion_queue();
313
324
                     tries > 0; --tries) {
314
325
                        if (__netif_tx_trylock(txq)) {
315
326
                                if (!netif_tx_queue_stopped(txq)) {
316
 
                                        dev->priv_flags |= IFF_IN_NETPOLL;
317
327
                                        status = ops->ndo_start_xmit(skb, dev);
318
 
                                        dev->priv_flags &= ~IFF_IN_NETPOLL;
319
328
                                        if (status == NETDEV_TX_OK)
320
329
                                                txq_trans_update(txq);
321
330
                                }
530
539
{
531
540
        int proto, len, ulen;
532
541
        int hits = 0;
533
 
        struct iphdr *iph;
 
542
        const struct iphdr *iph;
534
543
        struct udphdr *uh;
535
544
        struct netpoll_info *npinfo = skb->dev->npinfo;
536
545
        struct netpoll *np, *tmp;
689
698
 
690
699
        if (*cur != 0) {
691
700
                /* MAC address */
692
 
                if ((delim = strchr(cur, ':')) == NULL)
693
 
                        goto parse_failed;
694
 
                *delim = 0;
695
 
                np->remote_mac[0] = simple_strtol(cur, NULL, 16);
696
 
                cur = delim + 1;
697
 
                if ((delim = strchr(cur, ':')) == NULL)
698
 
                        goto parse_failed;
699
 
                *delim = 0;
700
 
                np->remote_mac[1] = simple_strtol(cur, NULL, 16);
701
 
                cur = delim + 1;
702
 
                if ((delim = strchr(cur, ':')) == NULL)
703
 
                        goto parse_failed;
704
 
                *delim = 0;
705
 
                np->remote_mac[2] = simple_strtol(cur, NULL, 16);
706
 
                cur = delim + 1;
707
 
                if ((delim = strchr(cur, ':')) == NULL)
708
 
                        goto parse_failed;
709
 
                *delim = 0;
710
 
                np->remote_mac[3] = simple_strtol(cur, NULL, 16);
711
 
                cur = delim + 1;
712
 
                if ((delim = strchr(cur, ':')) == NULL)
713
 
                        goto parse_failed;
714
 
                *delim = 0;
715
 
                np->remote_mac[4] = simple_strtol(cur, NULL, 16);
716
 
                cur = delim + 1;
717
 
                np->remote_mac[5] = simple_strtol(cur, NULL, 16);
 
701
                if (!mac_pton(cur, np->remote_mac))
 
702
                        goto parse_failed;
718
703
        }
719
704
 
720
705
        netpoll_print_options(np);
807
792
                return -ENODEV;
808
793
        }
809
794
 
 
795
        if (ndev->master) {
 
796
                printk(KERN_ERR "%s: %s is a slave device, aborting.\n",
 
797
                       np->name, np->dev_name);
 
798
                err = -EBUSY;
 
799
                goto put;
 
800
        }
 
801
 
810
802
        if (!netif_running(ndev)) {
811
803
                unsigned long atmost, atleast;
812
804