summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2004-10-01 07:01:38 +0000
committergreen <green@FreeBSD.org>2004-10-01 07:01:38 +0000
commitd8d12b2198f171b95ad3a6a00fa0c0f9217affc2 (patch)
treee6d2d1c71d80a0282fcbd98f363d457670ac2790 /sys/pci
parent2e5b8b98835509cddd3b2345fbdc9d31180a21d9 (diff)
downloadFreeBSD-src-d8d12b2198f171b95ad3a6a00fa0c0f9217affc2.zip
FreeBSD-src-d8d12b2198f171b95ad3a6a00fa0c0f9217affc2.tar.gz
Conditionalize IFF_NEEDSGIANT, like everything else here, on IS_MPSAFE.
The driver doesn't look any less safe without Giant than with, and works with IS_MPSAFE set to 1 here, so others should probably test it as such.
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/if_dc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c
index 262e947..961c49d 100644
--- a/sys/pci/if_dc.c
+++ b/sys/pci/if_dc.c
@@ -2191,8 +2191,9 @@ dc_attach(device_t dev)
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
/* XXX: bleah, MTU gets overwritten in ether_ifattach() */
ifp->if_mtu = ETHERMTU;
- ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST |
- IFF_NEEDSGIANT;
+ ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
+ if (!IS_MPSAFE)
+ ifp->if_flags |= IFF_NEEDSGIANT;
ifp->if_ioctl = dc_ioctl;
ifp->if_start = dc_start;
ifp->if_watchdog = dc_watchdog;
OpenPOWER on IntegriCloud