From 70b6a8119c02ed07bc12918814c950d358cb1885 Mon Sep 17 00:00:00 2001 From: rwatson Date: Sun, 15 Mar 2009 14:21:05 +0000 Subject: Remove IFF_NEEDSGIANT, a compatibility infrastructure introduced in FreeBSD 5.x to allow network device drivers to run with Giant despite the network stack being Giant-free. This significantly simplifies calls into ioctl() on network interfaces, especially in the multicast code, as well as eliminates deferred invocation of interface if_start routines. Disable the build on device drivers still depending on IFF_NEEDSGIANT as they no longer compile. They will be removed in a few weeks if they haven't been made MPSAFE in that time. Disabled drivers: if_ar if_axe if_aue if_cdce if_cue if_kue if_ray if_rue if_rum if_sr if_udav if_ural if_zyd Drivers that were already disabled because of tty changes: if_ppp if_sl Discussed on: arch@ --- sys/netnatm/natm.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'sys/netnatm') diff --git a/sys/netnatm/natm.c b/sys/netnatm/natm.c index b9705db..baa596e 100644 --- a/sys/netnatm/natm.c +++ b/sys/netnatm/natm.c @@ -221,13 +221,9 @@ natm_usr_connect(struct socket *so, struct sockaddr *nam, d_thread_t *p) op.param.traffic = ATMIO_TRAFFIC_UBR; NATM_UNLOCK(); - IFF_LOCKGIANT(ifp); if (ifp->if_ioctl == NULL || - ifp->if_ioctl(ifp, SIOCATMOPENVCC, (caddr_t)&op) != 0) { - IFF_UNLOCKGIANT(ifp); + ifp->if_ioctl(ifp, SIOCATMOPENVCC, (caddr_t)&op) != 0) return (EIO); - } - IFF_UNLOCKGIANT(ifp); soisconnected(so); return (error); } @@ -259,11 +255,8 @@ natm_usr_disconnect(struct socket *so) cl.vpi = npcb->npcb_vpi; cl.vci = npcb->npcb_vci; NATM_UNLOCK(); - if (ifp->if_ioctl != NULL) { - IFF_LOCKGIANT(ifp); + if (ifp->if_ioctl != NULL) ifp->if_ioctl(ifp, SIOCATMCLOSEVCC, (caddr_t)&cl); - IFF_UNLOCKGIANT(ifp); - } soisdisconnected(so); return (error); } @@ -342,17 +335,13 @@ natm_usr_control(struct socket *so, u_long cmd, caddr_t arg, struct ifnet *ifp, d_thread_t *p) { struct natmpcb *npcb; - int error; npcb = (struct natmpcb *)so->so_pcb; KASSERT(npcb != NULL, ("natm_usr_control: npcb == NULL")); if (ifp == NULL || ifp->if_ioctl == NULL) return (EOPNOTSUPP); - IFF_LOCKGIANT(ifp); - error = ((*ifp->if_ioctl)(ifp, cmd, arg)); - IFF_UNLOCKGIANT(ifp); - return (error); + return ((*ifp->if_ioctl)(ifp, cmd, arg)); } static void -- cgit v1.1