From owner-freebsd-current@FreeBSD.ORG Tue Oct 13 17:41:31 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28F781065694 for ; Tue, 13 Oct 2009 17:41:31 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: from mail-ew0-f218.google.com (mail-ew0-f218.google.com [209.85.219.218]) by mx1.freebsd.org (Postfix) with ESMTP id A6D6C8FC13 for ; Tue, 13 Oct 2009 17:41:30 +0000 (UTC) Received: by ewy18 with SMTP id 18so4005832ewy.43 for ; Tue, 13 Oct 2009 10:41:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent:organization:x-operation-sytem; bh=SLjL3drOu6Z7d65/Nn5OVrxTDjW22AsCjJbYEr2GDpM=; b=L5vRxlANsNurZ8OSie3cs00B8T5q95sNUQ2J/L05bUQEaiyCPRIGdb8YhovkrQQ5HO zyA6IbhscQwE7u3LFtHydhxr+CtgpeGhcJx3BmkQBoxIlQwqX2FOzaMd3yxD5PLGe5ki EcfiEfbr82WVZhbNg3liG5VagzG0eSQtBx//g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent:organization:x-operation-sytem; b=cFvD2hhQu158gI67By2jXtXtMOvfMT02FPmE7qqkjNq7PBma1jRZmYceNGh20ClF1o bVucwGkMJgbO3+ctVtBttixMOZxwx3SNMOkXnZxiugoD9n2Ib/CmAlCYidT0oc0l66Cd m/0PldKvxv1L2tI7ZeaSffq8dBLGiESW9xcBk= Received: by 10.102.193.20 with SMTP id q20mr3116243muf.28.1255455689475; Tue, 13 Oct 2009 10:41:29 -0700 (PDT) Received: from weongyo ([174.35.1.224]) by mx.google.com with ESMTPS id u9sm506709muf.31.2009.10.13.10.41.26 (version=SSLv3 cipher=RC4-MD5); Tue, 13 Oct 2009 10:41:27 -0700 (PDT) Received: by weongyo (sSMTP sendmail emulation); Tue, 13 Oct 2009 10:42:01 -0700 From: Weongyo Jeong Date: Tue, 13 Oct 2009 10:42:01 -0700 To: Poul-Henning Kamp Message-ID: <20091013174201.GC67082@weongyo> Mail-Followup-To: Poul-Henning Kamp , current@freebsd.org References: <86051.1254232666@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline In-Reply-To: <86051.1254232666@critter.freebsd.dk> User-Agent: Mutt/1.4.2.3i Organization: CDNetworks. X-Operation-Sytem: FreeBSD Cc: current@freebsd.org Subject: Re: if_rum dies on transmit... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Weongyo Jeong List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2009 17:41:31 -0000 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Sep 29, 2009 at 01:57:46PM +0000, Poul-Henning Kamp wrote: > > Has anybody else seen if_rum die when you try to transmit a file over > a TCP connection ? > > If I try to print across the network, upload a file with ftp or anything > else of that general tenor, if_rum seems to hang the output queue and > stops transmitting packets. > > Restarting wpa_supplicant mostly resolves the issue, but it does not > on its own discover the problem. > > According to tcpdump(8), packets are still received. > > Any ideas ? Could you please test with attached patch? regards, Weongyo Jeong --UugvWAfsgieZRqgk Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch_rum_20091013.diff" Index: if_rum.c =================================================================== --- if_rum.c (revision 198036) +++ if_rum.c (working copy) @@ -826,6 +826,9 @@ usbd_transfer_submit(xfer); } + RUM_UNLOCK(sc); + rum_start(ifp); + RUM_LOCK(sc); break; default: /* Error */ @@ -930,8 +933,8 @@ * the private mutex of a device! That is why we do the * "ieee80211_input" here, and not some lines up! */ + RUM_UNLOCK(sc); if (m) { - RUM_UNLOCK(sc); ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); if (ni != NULL) { @@ -941,8 +944,11 @@ } else (void) ieee80211_input_all(ic, m, rssi, RT2573_NOISE_FLOOR); - RUM_LOCK(sc); } + if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0 && + !IFQ_IS_EMPTY(&ifp->if_snd)) + rum_start(ifp); + RUM_LOCK(sc); return; default: /* Error */ --UugvWAfsgieZRqgk--