709 struct net_device *dev); |
709 struct net_device *dev); |
710 static int rtl8139_poll(struct net_device *dev, int *budget); |
710 static int rtl8139_poll(struct net_device *dev, int *budget); |
711 #ifdef CONFIG_NET_POLL_CONTROLLER |
711 #ifdef CONFIG_NET_POLL_CONTROLLER |
712 static void rtl8139_poll_controller(struct net_device *dev); |
712 static void rtl8139_poll_controller(struct net_device *dev); |
713 #endif |
713 #endif |
|
714 /* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/ |
|
715 void ec_poll(struct net_device *); |
|
716 /* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/ |
714 irqreturn_t rtl8139_interrupt (int irq, void *dev_instance, |
717 irqreturn_t rtl8139_interrupt (int irq, void *dev_instance, |
715 struct pt_regs *regs); |
718 struct pt_regs *regs); |
716 static int rtl8139_close (struct net_device *dev); |
719 static int rtl8139_close (struct net_device *dev); |
717 static int netdev_ioctl (struct net_device *dev, struct ifreq *rq, int cmd); |
720 static int netdev_ioctl (struct net_device *dev, struct ifreq *rq, int cmd); |
718 static struct net_device_stats *rtl8139_get_stats (struct net_device *dev); |
721 static struct net_device_stats *rtl8139_get_stats (struct net_device *dev); |
2342 spin_unlock(&tp->rx_lock); |
2345 spin_unlock(&tp->rx_lock); |
2343 |
2346 |
2344 return !done; |
2347 return !done; |
2345 } |
2348 } |
2346 |
2349 |
|
2350 /* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/ |
|
2351 |
|
2352 void ec_poll(struct net_device *dev) |
|
2353 { |
|
2354 rtl8139_interrupt(0, dev, NULL); |
|
2355 } |
|
2356 |
|
2357 /* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/ |
|
2358 |
2347 /* The interrupt handler does all of the Rx thread work and cleans up |
2359 /* The interrupt handler does all of the Rx thread work and cleans up |
2348 after the Tx thread. */ |
2360 after the Tx thread. */ |
2349 irqreturn_t rtl8139_interrupt (int irq, void *dev_instance, |
2361 irqreturn_t rtl8139_interrupt (int irq, void *dev_instance, |
2350 struct pt_regs *regs) |
2362 struct pt_regs *regs) |
2351 { |
2363 { |
2899 } |
2911 } |
2900 |
2912 |
2901 if (rtl_ec_net_dev) { |
2913 if (rtl_ec_net_dev) { |
2902 printk(KERN_INFO "Registering EtherCAT device...\n"); |
2914 printk(KERN_INFO "Registering EtherCAT device...\n"); |
2903 if (!(rtl_ec_dev = ecdev_register(ec_device_master_index, |
2915 if (!(rtl_ec_dev = ecdev_register(ec_device_master_index, |
2904 rtl_ec_net_dev, rtl8139_interrupt, THIS_MODULE))) { |
2916 rtl_ec_net_dev, ec_poll, THIS_MODULE))) { |
2905 printk(KERN_ERR "Failed to register EtherCAT device!\n"); |
2917 printk(KERN_ERR "Failed to register EtherCAT device!\n"); |
2906 goto out_pci; |
2918 goto out_pci; |
2907 } |
2919 } |
2908 |
2920 |
2909 printk(KERN_INFO "Opening EtherCAT device...\n"); |
2921 printk(KERN_INFO "Opening EtherCAT device...\n"); |