equal
deleted
inserted
replaced
2815 DPRINTK(PROBE, ERR, "Error clearing wake event\n"); |
2815 DPRINTK(PROBE, ERR, "Error clearing wake event\n"); |
2816 |
2816 |
2817 // offer device to EtherCAT master module |
2817 // offer device to EtherCAT master module |
2818 nic->ecdev = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE); |
2818 nic->ecdev = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE); |
2819 if (nic->ecdev) { |
2819 if (nic->ecdev) { |
2820 if (ecdev_open(nic->ecdev)) { |
2820 err = ecdev_open(nic->ecdev); |
|
2821 if (err) { |
2821 ecdev_withdraw(nic->ecdev); |
2822 ecdev_withdraw(nic->ecdev); |
2822 goto err_out_free; |
2823 goto err_out_free; |
2823 } |
2824 } |
2824 } else { |
2825 } else { |
2825 strcpy(netdev->name, "eth%d"); |
2826 strcpy(netdev->name, "eth%d"); |
2963 struct net_device *netdev = pci_get_drvdata(pdev); |
2964 struct net_device *netdev = pci_get_drvdata(pdev); |
2964 struct nic *nic = netdev_priv(netdev); |
2965 struct nic *nic = netdev_priv(netdev); |
2965 |
2966 |
2966 /* Similar to calling e100_down(), but avoids adpater I/O. */ |
2967 /* Similar to calling e100_down(), but avoids adpater I/O. */ |
2967 netdev->stop(netdev); |
2968 netdev->stop(netdev); |
2968 |
2969 |
2969 if (!nic->ecdev) { |
2970 if (!nic->ecdev) { |
2970 /* Detach; put netif into state similar to hotplug unplug. */ |
2971 /* Detach; put netif into state similar to hotplug unplug. */ |
2971 napi_enable(&nic->napi); |
2972 napi_enable(&nic->napi); |
2972 netif_device_detach(netdev); |
2973 netif_device_detach(netdev); |
2973 } |
2974 } |