Module Name: src Committed By: jdolecek Date: Sun Nov 5 18:26:11 UTC 2023
Modified Files: src/sys/dev/pci: if_ena.c Log Message: ena(4): stop management first when detaching Code contributed by KUSABA Takeshi <t-kus...@iij.ad.jp> To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/if_ena.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/if_ena.c diff -u src/sys/dev/pci/if_ena.c:1.39 src/sys/dev/pci/if_ena.c:1.40 --- src/sys/dev/pci/if_ena.c:1.39 Sun Nov 5 18:23:29 2023 +++ src/sys/dev/pci/if_ena.c Sun Nov 5 18:26:11 2023 @@ -36,7 +36,7 @@ #if 0 __FBSDID("$FreeBSD: head/sys/dev/ena/ena.c 333456 2018-05-10 09:37:54Z mw $"); #endif -__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.39 2023/11/05 18:23:29 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.40 2023/11/05 18:26:11 jdolecek Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -3885,6 +3885,7 @@ ena_detach(device_t pdev, int flags) return (EBUSY); } + ena_com_set_admin_running_state(ena_dev, false); ENA_CORE_MTX_LOCK(adapter); ena_down(adapter); ENA_CORE_MTX_UNLOCK(adapter);