Ignore:
Timestamp:
2010-03-27T14:05:17+01:00 (6 years ago)
Author:
juhosg
Message:

ar71xx: ag71xx: Add netpoll support

This patch adds support for polling interrupts, used by
netconsole and the likes.

Tested on d-link dir-615 C1 using netconsole.

Signed-off-by: Pat Erley <pat-lkml@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c

    r20092 r20503  
    927927} 
    928928 
     929#ifdef CONFIG_NET_POLL_CONTROLLER 
     930/* 
     931 * Polling 'interrupt' - used by things like netconsole to send skbs 
     932 * without having to re-enable interrupts. It's not called while 
     933 * the interrupt routine is executing. 
     934 */ 
     935static void ag71xx_netpoll(struct net_device *dev) 
     936{ 
     937        disable_irq(dev->irq); 
     938        ag71xx_interrupt(dev->irq, dev); 
     939        enable_irq(dev->irq); 
     940} 
     941#endif 
     942 
    929943static const struct net_device_ops ag71xx_netdev_ops = { 
    930944        .ndo_open               = ag71xx_open, 
     
    937951        .ndo_set_mac_address    = eth_mac_addr, 
    938952        .ndo_validate_addr      = eth_validate_addr, 
     953#ifdef CONFIG_NET_POLL_CONTROLLER 
     954        .ndo_poll_controller    = ag71xx_netpoll, 
     955#endif 
    939956}; 
    940957 
Note: See TracChangeset for help on using the changeset viewer.