From owner-freebsd-wireless@FreeBSD.ORG Sun Jun 2 22:26:05 2013 Return-Path: Delivered-To: FreeBSD-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D80223A9 for ; Sun, 2 Jun 2013 22:26:05 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qc0-x236.google.com (mail-qc0-x236.google.com [IPv6:2607:f8b0:400d:c01::236]) by mx1.freebsd.org (Postfix) with ESMTP id 9E9551B17 for ; Sun, 2 Jun 2013 22:26:05 +0000 (UTC) Received: by mail-qc0-f182.google.com with SMTP id n1so1811238qcw.13 for ; Sun, 02 Jun 2013 15:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=lQtdO+w5fB6Z0MQw7T8dnrD7vjEEBH41pY7ztSp0hpM=; b=VIvcPgyAygQhpmK0jkH/VXU0zW+qr+j7rC/cJaa7iBSIgvQh7SoxYhlH6BdjhgKDlW mDdQU9H9/clvgLsq4K2wCUbSlWyFzvwEf46QPCNNmiACpx1FZxpqtxwxs8Ero96SilIf 21CozJZ1PM6dZ9PQhJWgJxAc8NLhxlmtPOxHxzvgyG8vYVSmJ2/VazpAKU2aSTMvYAnj a0aaW2cA9XjIocyyhul9adrh7Tgu3JkfgM+i6lvq22U9M71pY4KuVYZbIXVDaB8nufaW lY+3rNatRwYjnn5N/C4f0LuhRVpp7aTttUbXH+I4+nJLWWC0ZY69s1Ixa7x3AigA9MPI P1uw== MIME-Version: 1.0 X-Received: by 10.49.104.37 with SMTP id gb5mr19182340qeb.41.1370211965193; Sun, 02 Jun 2013 15:26:05 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.71.12 with HTTP; Sun, 2 Jun 2013 15:26:05 -0700 (PDT) In-Reply-To: References: Date: Sun, 2 Jun 2013 15:26:05 -0700 X-Google-Sender-Auth: EtRhHXuVis4QBGQivGjjCQCzGGc Message-ID: Subject: Re: panic: ath_legacy_tx_dma_restart: Q3: called with PUTRUNNING=1 From: Adrian Chadd To: Kim Culhan Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jun 2013 22:26:05 -0000 On 2 June 2013 04:49, Kim Culhan wrote: > Been seeing panics as in the Subject for a few weeks. > > Now running (and seeing the panics) with r251078M. > > Please let me know if additional info is needed. So, just to brain dump what the story is here. I changed the TX DMA code to implement exactly what the hardware guys want - I touch TxDP once, then I just use the link pointer in the last descriptor in the list to restart DMA. This fix is designed to catch if DMA is being restarted _after_ we've already started DMA and written a TxDP to the hardware. So, either: * I've screwed up the stuck beacon reset path and the hardware isn't being fully stopped before DMA is restarted (which I've done some simple testing of; it doesn't seem like that); * There's some parallel transmission going on that's managed to queue a frame to the transmit queue _and_ start DMA before the reset has completed. Now, in days gone past (read pre FreeBSD-10) this kind of stuff would happen all the time and well, it may explain a lot of why things can get very unhappy. I'm trying to eliminate these, which means adding KASSERT()s to the kernel as I find conditions that must not occur, and .. Kim found one. So I'll go chase this one down. Thanks Kim! Adrian