source: trunk/target/linux/ar7/patches-2.6.30/900-cpmac_multiqueue.patch @ 17097

Last change on this file since 17097 was 17097, checked in by florian, 7 years ago

[ar7] add experimental support for 2.6.30

File size: 2.3 KB
  • drivers/net/cpmac.c

    This patch fixes the network driver cpmac.c for compilation with
    configuration option CONFIG_NETDEVICES_MULTIQUEUE.
    
    These compiler warnings are fixed by the patch:
    drivers/net/cpmac.c: In function 'cpmac_end_xmit':
    drivers/net/cpmac.c:630: warning: passing argument 2 of 'netif_subqueue_stopped' makes pointer from integer without a cast
    drivers/net/cpmac.c:641: warning: passing argument 2 of 'netif_subqueue_stopped' makes pointer from integer without a cast
    drivers/net/cpmac.c: In function 'cpmac_probe':
    drivers/net/cpmac.c:1128: warning: unused variable 'i'
    
    During runtime, the unpatched driver raises a fatal runtime exception.
    This is fixed by calling __netif_subqueue_stopped instead
    of netif_subqueue_stopped, too.
    
    Two additional code parts were modified for CONFIG_NETDEVICES_MULTIQUEUE
    because other drivers do it in the same way.
    
            Signed-off-by: Stefan Weil <weil@mail.berlios.de>
    
    a b static void cpmac_end_xmit(struct net_de 
    615615 
    616616                dev_kfree_skb_irq(desc->skb); 
    617617                desc->skb = NULL; 
    618                 if (netif_subqueue_stopped(dev, queue)) 
     618                if (__netif_subqueue_stopped(dev, queue)) 
    619619                        netif_wake_subqueue(dev, queue); 
    620620        } else { 
    621621                if (netif_msg_tx_err(priv) && net_ratelimit()) 
    622622                        printk(KERN_WARNING 
    623623                               "%s: end_xmit: spurious interrupt\n", dev->name); 
    624                 if (netif_subqueue_stopped(dev, queue)) 
     624                if (__netif_subqueue_stopped(dev, queue)) 
    625625                        netif_wake_subqueue(dev, queue); 
    626626        } 
    627627} 
    static void cpmac_clear_tx(struct net_de 
    731731 
    732732static void cpmac_hw_error(struct work_struct *work) 
    733733{ 
    734         int i; 
    735734        struct cpmac_priv *priv = 
    736735                container_of(work, struct cpmac_priv, reset_work); 
    737736 
    static irqreturn_t cpmac_irq(int irq, vo 
    818817 
    819818static void cpmac_tx_timeout(struct net_device *dev) 
    820819{ 
    821         int i; 
    822820        struct cpmac_priv *priv = netdev_priv(dev); 
    823821 
    824822        spin_lock(&priv->lock); 
    static int external_switch; 
    10971095 
    10981096static int __devinit cpmac_probe(struct platform_device *pdev) 
    10991097{ 
    1100         int rc, phy_id, i; 
     1098        int rc, phy_id; 
    11011099        char *mdio_bus_id = "0"; 
    11021100        struct resource *mem; 
    11031101        struct cpmac_priv *priv; 
    static int __devinit cpmac_probe(struct  
    11251123        } 
    11261124 
    11271125        dev = alloc_etherdev_mq(sizeof(*priv), CPMAC_QUEUES); 
     1126        //~ dev = alloc_etherdev(sizeof(*priv)); 
    11281127 
    11291128        if (!dev) { 
    11301129                printk(KERN_ERR "cpmac: Unable to allocate net_device\n"); 
Note: See TracBrowser for help on using the repository browser.