From owner-freebsd-usb@FreeBSD.ORG Mon Feb 16 11:33:19 2009 Return-Path: Delivered-To: usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA490106566B; Mon, 16 Feb 2009 11:33:19 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 454088FC0A; Mon, 16 Feb 2009 11:33:19 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id D937346B1A; Mon, 16 Feb 2009 06:33:18 -0500 (EST) Date: Mon, 16 Feb 2009 11:33:18 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: weongyo@FreeBSD.org, thompsa@FreeBSD.org, Hans Petter Selasky Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Cc: usb@FreeBSD.org Subject: USB support in NDIS -- IFF_NEEDSGIANT? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2009 11:33:20 -0000 Dear all: As you know, I've been gradually working to eliminate all non-MPSAFE network device driver infrastructure for 8.0, having removed non-MPSAFE network protocol infrastructure in 7.0. In reviewing remaining drivers using IFF_NEEDSGIANT, I spotted this in the NDIS code: 718 if_initname(ifp, device_get_name(dev), device_get_unit(dev)); 719 ifp->if_mtu = ETHERMTU; 720 ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; 721 if (sc->ndis_iftype == PNPBus) 722 ifp->if_flags |= IFF_NEEDSGIANT; 723 ifp->if_ioctl = ndis_ioctl; 724 ifp->if_start = ndis_start; 725 ifp->if_init = ndis_init; Having taken a glance, it looks like this was added specifically to support USB devices attached via NDIS. With the new USB code, are NDIS drivers still supported? And in the new world order, is this IFF_NEEDSGIANT still required? Can I simply remove it once the old USB code is on the way out the door? (Note that the plan is to remove all device drivers that still require IFF_NEEDSGIANT some time before 8.0, probably starting with disabling them from the build in about 2-3 weeks). Thanks, Robert N M Watson Computer Laboratory University of Cambridge