From owner-freebsd-current@FreeBSD.ORG Wed May 6 18:33:47 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B45E7CDC; Wed, 6 May 2015 18:33:47 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E4A11BED; Wed, 6 May 2015 18:33:47 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 81014B93C; Wed, 6 May 2015 14:33:46 -0400 (EDT) From: John Baldwin To: Ryan Stone Cc: FreeBSD Current , Eric Badger , "current@freebsd.org" Subject: Re: PCI PF memory decode disable when sizing VF BARs Date: Wed, 06 May 2015 14:33:44 -0400 Message-ID: <2106775.8KnH0oLhUZ@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: <11092809.7nmbPfKl0V@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 06 May 2015 14:33:46 -0400 (EDT) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2015 18:33:47 -0000 On Wednesday, May 06, 2015 02:24:24 PM Ryan Stone wrote: > On Wed, May 6, 2015 at 11:45 AM, John Baldwin wrote: > > > There are some devices with BARs in non-standard locations. :( If there is > > a flag to just disable the VF bar decoding, then ideally we should just be > > doing that and leaving the global decoding flag alone while sizing the VF > > BAR. > > > > Disabling SR-IOV BAR decoding in this function is currently redundant, as > it's already done in pci_iov.c, but I guess to keep the interface sane it > makes sense to do it here too. Something like this then? Ah, sorry, I didn't know you did it in the caller already. Perhaps then something more like your previous patch, but using the test you added here (PCIR_IS_IOV) instead of your previous check against BAR values to decide when to frob the command register? -- John Baldwin