Initialize watchdog jiffies in e100.

This commit is contained in:
Florian Pose 2025-06-26 16:08:36 +02:00
parent bf1e45d934
commit 12df7a1f4a
16 changed files with 65 additions and 17 deletions

View File

@ -3001,7 +3001,10 @@ static int __devinit e100_probe(struct pci_dev *pdev,
// offer device to EtherCAT master module
nic->ecdev = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
if (!nic->ecdev) {
if (nic->ecdev) {
nic->ec_watchdog_jiffies = jiffies;
}
else {
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) {
netif_err(nic, probe, nic->netdev,

View File

@ -3104,7 +3104,10 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
// offer device to EtherCAT master module
nic->ecdev = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
if (!nic->ecdev) {
if (nic->ecdev) {
nic->ec_watchdog_jiffies = jiffies;
}
else {
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) {
netif_err(nic, probe, nic->netdev,

View File

@ -3101,7 +3101,10 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
// offer device to EtherCAT master module
nic->ecdev = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
if (!nic->ecdev) {
if (nic->ecdev) {
nic->ec_watchdog_jiffies = jiffies;
}
else {
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) {
netif_err(nic, probe, nic->netdev,

View File

@ -3101,7 +3101,10 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
// offer device to EtherCAT master module
nic->ecdev = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
if (!nic->ecdev) {
if (nic->ecdev) {
nic->ec_watchdog_jiffies = jiffies;
}
else {
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) {
netif_err(nic, probe, nic->netdev,

View File

@ -3101,7 +3101,10 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
// offer device to EtherCAT master module
nic->ecdev = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
if (!nic->ecdev) {
if (nic->ecdev) {
nic->ec_watchdog_jiffies = jiffies;
}
else {
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) {
netif_err(nic, probe, nic->netdev,

View File

@ -3068,7 +3068,10 @@ static int __devinit e100_probe(struct pci_dev *pdev,
// offer device to EtherCAT master module
nic->ecdev = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
if (!nic->ecdev) {
if (nic->ecdev) {
nic->ec_watchdog_jiffies = jiffies;
}
else {
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) {
netif_err(nic, probe, nic->netdev,

View File

@ -3092,7 +3092,10 @@ static int __devinit e100_probe(struct pci_dev *pdev,
// offer device to EtherCAT master module
nic->ecdev = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
if (!nic->ecdev) {
if (nic->ecdev) {
nic->ec_watchdog_jiffies = jiffies;
}
else {
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) {
netif_err(nic, probe, nic->netdev,

View File

@ -3091,7 +3091,10 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
// offer device to EtherCAT master module
nic->ecdev = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
if (!nic->ecdev) {
if (nic->ecdev) {
nic->ec_watchdog_jiffies = jiffies;
}
else {
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) {
netif_err(nic, probe, nic->netdev,

View File

@ -3104,7 +3104,10 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
// offer device to EtherCAT master module
nic->ecdev = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
if (!nic->ecdev) {
if (nic->ecdev) {
nic->ec_watchdog_jiffies = jiffies;
}
else {
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) {
netif_err(nic, probe, nic->netdev,

View File

@ -3086,7 +3086,10 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
// offer device to EtherCAT master module
nic->ecdev = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
if (!nic->ecdev) {
if (nic->ecdev) {
nic->ec_watchdog_jiffies = jiffies;
}
else {
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) {
netif_err(nic, probe, nic->netdev,

View File

@ -3124,7 +3124,10 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
// offer device to EtherCAT master module
nic->ecdev = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
if (!nic->ecdev) {
if (nic->ecdev) {
nic->ec_watchdog_jiffies = jiffies;
}
else {
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) {
netif_err(nic, probe, nic->netdev,

View File

@ -3092,7 +3092,10 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
// offer device to EtherCAT master module
nic->ecdev = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
if (!nic->ecdev) {
if (nic->ecdev) {
nic->ec_watchdog_jiffies = jiffies;
}
else {
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) {
netif_err(nic, probe, nic->netdev,

View File

@ -3090,7 +3090,10 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
// offer device to EtherCAT master module
nic->ecdev = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
if (!nic->ecdev) {
if (nic->ecdev) {
nic->ec_watchdog_jiffies = jiffies;
}
else {
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) {
netif_err(nic, probe, nic->netdev,

View File

@ -3101,7 +3101,10 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
nic->ecdev_ = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
nic->ecdev_initialized = true;
if (!get_ecdev(nic)) {
if (get_ecdev(nic)) {
nic->ec_watchdog_jiffies = jiffies;
}
else {
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) {
netif_err(nic, probe, nic->netdev,

View File

@ -1,6 +1,6 @@
/*****************************************************************************
*
* Copyright (C) 2007-2012 Florian Pose, Ingenieurgemeinschaft IgH
* Copyright (C) 2007-2025 Florian Pose, Ingenieurgemeinschaft IgH
*
* This file is part of the IgH EtherCAT Master.
*
@ -3100,7 +3100,10 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
nic->ecdev_ = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
nic->ecdev_initialized = true;
if (!get_ecdev(nic)) {
if (get_ecdev(nic)) {
nic->ec_watchdog_jiffies = jiffies;
}
else {
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) {
netif_err(nic, probe, nic->netdev,

View File

@ -3101,7 +3101,10 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
nic->ecdev_ = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
nic->ecdev_initialized = true;
if (!get_ecdev(nic)) {
if (get_ecdev(nic)) {
nic->ec_watchdog_jiffies = jiffies;
}
else {
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) {
netif_err(nic, probe, nic->netdev,