From owner-freebsd-current@FreeBSD.ORG Wed Mar 11 01:32:18 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 A360C106564A for ; Wed, 11 Mar 2009 01:32:18 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.233]) by mx1.freebsd.org (Postfix) with ESMTP id 6F58B8FC13 for ; Wed, 11 Mar 2009 01:32:18 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by rv-out-0506.google.com with SMTP id f6so2701443rvb.43 for ; Tue, 10 Mar 2009 18:32:18 -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:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=WMbdDMees1xySXsrkt631KneqITRmOqhjsZtpyZCzwg=; b=BTuEO9w2wu1Rn5vF4JBab9d4R3U7vSepW8h2ZFVjAmqA5PX5ewLW6oKpyDVQYy1sP9 mbh0gCZmHSrU9RXiQsWmHEU+fx1THH83xomaxmIIB3l+LEO9WTRQv1lYD1tbZ7sr7UH4 qzx3UTLSmHnYIsoNx6b0mmXDx2memRqxFQf5M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=fB6SxKNNNX63N3tkHa3pPECmU8dgw/p03DOjJ7zhvdFsCzIA19TLHH+KtruTi6cjp9 4Rp3CTikDl8L3sbPlDMUSg/2WGofUd3Z09WPyKhZnULmmPiMlPlge5yj1HmVCdTYriO6 Ej3CRF3pLI89Qb4XskyiNBBmTyDEA4J8nhb0g= Received: by 10.140.170.21 with SMTP id s21mr4042655rve.205.1236733789422; Tue, 10 Mar 2009 18:09:49 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ([114.111.62.249]) by mx.google.com with ESMTPS id g31sm14842732rvb.7.2009.03.10.18.09.46 (version=SSLv3 cipher=RC4-MD5); Tue, 10 Mar 2009 18:09:47 -0700 (PDT) Received: by michelle.cdnetworks.co.kr (sSMTP sendmail emulation); Wed, 11 Mar 2009 10:08:21 +0900 From: Pyun YongHyeon Date: Wed, 11 Mar 2009 10:08:21 +0900 To: "Arno J. Klaassen" Message-ID: <20090311010821.GC13527@michelle.cdnetworks.co.kr> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="lrZ03NoBR/3+SXJZ" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: current@freebsd.org Subject: Re: msi broken? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2009 01:32:19 -0000 --lrZ03NoBR/3+SXJZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Mar 10, 2009 at 03:08:59PM +0100, Arno J. Klaassen wrote: > > Hello, > > when upgrading this morning from a March 1 -current, if_bge > stopped working (and irq256: bge0 not showing up in > vmstat -i ). Setting hw.pci.enable_msi="0" makes it work again. > I don't have bge(4) hardwares so I can't test this. Would you try attached patch? --lrZ03NoBR/3+SXJZ Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="bge.msi.diff" Index: sys/dev/bge/if_bge.c =================================================================== --- sys/dev/bge/if_bge.c (revision 189658) +++ sys/dev/bge/if_bge.c (working copy) @@ -2912,7 +2912,7 @@ write_op(sc, BGE_MISC_CFG, BGE_32BITTIME_66MHZ); /* Re-enable MSI, if neccesary, and enable the memory arbiter. */ - if (BGE_IS_5714_FAMILY(sc)) { + if (BGE_IS_5714_FAMILY(sc) || sc->bge_flags & BGE_FLAG_MSI) { /* This chip disables MSI on reset. */ if (sc->bge_flags & BGE_FLAG_MSI) { val = pci_read_config(dev, BGE_PCI_MSI_CTL, 2); @@ -2922,8 +2922,10 @@ CSR_WRITE_4(sc, BGE_MSI_MODE, val | BGE_MSIMODE_ENABLE); } - val = CSR_READ_4(sc, BGE_MARB_MODE); - CSR_WRITE_4(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE | val); + if (BGE_IS_5714_FAMILY(sc)) { + val = CSR_READ_4(sc, BGE_MARB_MODE); + CSR_WRITE_4(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE | val); + } } else CSR_WRITE_4(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE); --lrZ03NoBR/3+SXJZ--