From owner-freebsd-wireless@freebsd.org Mon May 7 01:17:11 2018 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86410FCC1AE for ; Mon, 7 May 2018 01:17:11 +0000 (UTC) (envelope-from freebsd@tim.thechases.com) Received: from gorilla.birch.relay.mailchannels.net (gorilla.birch.relay.mailchannels.net [23.83.209.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0B4F7428C for ; Mon, 7 May 2018 01:17:08 +0000 (UTC) (envelope-from freebsd@tim.thechases.com) X-Sender-Id: wwwh2|x-authuser|tim@thechases.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 4BCB05C2012; Mon, 7 May 2018 01:17:02 +0000 (UTC) Received: from uscentral455.accountservergroup.com (unknown [100.96.32.20]) (Authenticated sender: wwwh2) by relay.mailchannels.net (Postfix) with ESMTPA id B8AC25C1D21; Mon, 7 May 2018 01:17:01 +0000 (UTC) X-Sender-Id: wwwh2|x-authuser|tim@thechases.com Received: from uscentral455.accountservergroup.com (uscentral455.accountservergroup.com [172.18.54.155]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.14.1); Mon, 07 May 2018 01:17:02 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: wwwh2|x-authuser|tim@thechases.com X-MailChannels-Auth-Id: wwwh2 X-Squirrel-Daffy: 61bc4dc152bbbd3d_1525655822124_4269447382 X-MC-Loop-Signature: 1525655822124:248445573 X-MC-Ingress-Time: 1525655822123 Received: from 172-0-250-193.lightspeed.rcsntx.sbcglobal.net ([172.0.250.193]:43690 helo=bigbox.christie.dr) by uscentral455.accountservergroup.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fFUlw-000J3z-SV; Sun, 06 May 2018 21:17:00 -0400 Date: Sun, 6 May 2018 20:16:59 -0500 From: Tim Chase To: Oleksandr Tymoshenko Cc: "freebsd-wireless@freebsd.org" Subject: Re: ath0: could not map interrupt (again?) Message-ID: <20180506201659.0a831f5f@bigbox.christie.dr> In-Reply-To: <20180504005448.GA89012@bluezbox.com> References: <20180502165745.59a5bfc4@bigbox.christie.dr> <20180502211001.550d290c@bigbox.christie.dr> <20180503192743.639240d0@bigbox.christie.dr> <20180504005448.GA89012@bluezbox.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AuthUser: tim@thechases.com X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.25 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: Mon, 07 May 2018 01:17:11 -0000 On 2018-05-03 17:54, Oleksandr Tymoshenko wrote: > Tim Chase (freebsd@tim.thechases.com) wrote: > > ppb0 at pci0 dev 28 function 0 "Intel SCH PCIE" rev 0x07: apic 2 > > int 17 ... > > athn0 at pci2 dev 0 function 0 "Atheros AR9281" rev 0x01: apic 2 > > int 17 athn0: AR9280 rev 2 (2T2R), ROM rev 22, address > > 00:24:d2:b3:8c:b4 > > > > so it looks like the interrupt *can* be shared, it just appears > > that FreeBSD is doing something peculiar with it. > > It looks like PCI bridge allocates interupt without RF_SHAREABLE > (see dev/pci/pci_pci.c, pcib_alloc_pcie_irq). Could you test > this patch [1]? I am not sure if non-shareable IRQs for PCI/PCI > bridge is a design decision or it's just that nobody has hit this > problem before. > > [1] > https://people.freebsd.org/~gonzo/patches/pci_pci-shareable-irq.diff Applying your one-line patch adding RF_SHAREABLE (sorry for the delay as buildworld took ~2.5 days and buildkernel took about half a day on this machine) does seem to have at least gotten past the initial issue. The pcib1 now looks like it's properly sharing the interrupt and ath0 at least identifies. Relevant excerpts from dmesg: # dmesg | grep -e ath0 -e pcib1 pcib1: irq 17 at device 28.0 on pci0 pcib1: [GIANT-LOCKED] pci1: on pcib1 ath0: mem 0xd8000000-0xd800ffff irq 17 at device 0.0 on pci2 ath0: [HT] enabling HT modes ath0: [HT] 1 stream STBC receive enabled ath0: [HT] 1 stream STBC transmit enabled ath0: [HT] 2 RX streams; 2 TX streams ath0: AR9280 mac 128.2 RF5133 phy 13.0 ath0: 2GHz radio: 0x0000; 5GHz radio: 0x00c0 This was performed against HEAD which, at the time, was r333254. I'll poke at it more thoroughly in the morning, but I wanted to let you know that it seems to be working thus far. If you know of any particular ways in which I should stress it (to see if IRQ 17 on pcib1 really *wasn't* supposed to be sharable), I'd be glad to abuse it a bit. Many thanks! -tim