diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-05-19 22:15:35 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-05-19 22:15:35 +0200 |
commit | 529d72a57521ff077dcca45e573b7592059b1061 (patch) | |
tree | 7463ccf155b4e72a1cfa70e67fa154d3681839d3 /pfinet | |
parent | 78480003853381e959592572038b064777228fb3 (diff) | |
download | hurd-529d72a57521ff077dcca45e573b7592059b1061.tar.gz hurd-529d72a57521ff077dcca45e573b7592059b1061.tar.bz2 hurd-529d72a57521ff077dcca45e573b7592059b1061.zip |
pfinet: wait a bit before retrying to open ethernet device
If netdde is restarting, it may have not finished probing devices, give
it some time.
Diffstat (limited to 'pfinet')
-rw-r--r-- | pfinet/ethernet.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pfinet/ethernet.c b/pfinet/ethernet.c index 65ec1e21..9eb33bb6 100644 --- a/pfinet/ethernet.c +++ b/pfinet/ethernet.c @@ -283,12 +283,13 @@ ethernet_xmit (struct sk_buff *skb, struct device *dev) err = device_write (edev->ether_port, D_NOWAIT, 0, (io_buf_ptr_t) skb->data, skb->len, &count); if (err == EMACH_SEND_INVALID_DEST || err == EMIG_SERVER_DIED) { - /* Device probably just died, try to reopen it. */ + /* Device probably just died, wait a bit (to let driver restart) and try to reopen it. */ if (tried == 2) /* Too many tries, abort */ break; + sleep (1); ethernet_close (dev); ethernet_open (dev); } |