summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2024-11-14 09:39:53 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2024-11-14 09:39:53 +0000
commitd7b3c49cb9e1a166b75ae7328bd8d697543ef039 (patch)
treee17dbf9c1414d7ca428746d3a81332901252302f /sys/dev
parent7e337b4a8d0e244e1352a887237aae9db5af4396 (diff)
use down->up hammer to handle ENETRESET in ice_ioctl; can be refined later
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_ice.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/sys/dev/pci/if_ice.c b/sys/dev/pci/if_ice.c
index 73da4071116..c7a9b530c02 100644
--- a/sys/dev/pci/if_ice.c
+++ b/sys/dev/pci/if_ice.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ice.c,v 1.4 2024/11/14 09:38:51 stsp Exp $ */
+/* $OpenBSD: if_ice.c,v 1.5 2024/11/14 09:39:52 stsp Exp $ */
/* Copyright (c) 2024, Intel Corporation
* All rights reserved.
@@ -13346,15 +13346,6 @@ ice_down(struct ice_softc *sc)
}
int
-ice_iff(struct ice_softc *sc)
-{
- /* Configure promiscuous mode */
- ice_if_promisc_set(sc);
-
- return 0;
-}
-
-int
ice_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
{
struct ice_softc *sc = ifp->if_softc;
@@ -13389,7 +13380,12 @@ ice_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
}
if (error == ENETRESET) {
- error = ice_iff(sc);
+ error = 0;
+ if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) ==
+ (IFF_UP | IFF_RUNNING)) {
+ ice_down(sc);
+ error = ice_up(sc);
+ }
}
splx(s);