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.
This commit is contained in:
Brian Feldman 2004-10-01 07:01:38 +00:00
parent ba2851254f
commit 3d57a2e58e
2 changed files with 6 additions and 4 deletions

View File

@ -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;

View File

@ -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;