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