From owner-freebsd-net@FreeBSD.ORG Thu May 30 13:35:06 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 864558AC; Thu, 30 May 2013 13:35:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id 62F861A2; Thu, 30 May 2013 13:35:06 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C2A79B98A; Thu, 30 May 2013 09:35:01 -0400 (EDT) From: John Baldwin To: freebsd-net@freebsd.org, pyunyh@gmail.com Subject: Re: misc/179033: [dc] dc ethernet driver seems to have issues with some multiport card and mother board combinations Date: Thu, 30 May 2013 09:29:31 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201305300113.r4U1DRGp089692@freefall.freebsd.org> <51A6CE52.20501@eugeneweb.com> <20130530051214.GA1530@michelle.cdnetworks.com> In-Reply-To: <20130530051214.GA1530@michelle.cdnetworks.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201305300929.31872.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 30 May 2013 09:35:03 -0400 (EDT) Cc: "Mr. Clif" , yongari@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 May 2013 13:35:06 -0000 On Thursday, May 30, 2013 1:12:14 am YongHyeon PYUN wrote: > On Wed, May 29, 2013 at 08:58:10PM -0700, Mr. Clif wrote: > > Sorry for the confusion Pyun, > > > > I started looking at it in the context of pfsense, but they rejected my > > bug report which was understandable because it's an upstream issue. They > > suggested I resubmit it to you guys if I could reproduce it. So I booted > > FreeBSD and lo and behold the same two ports failed in exactly the same > > Ok, I'd like to fix that. Hmmm, the dc(4) driver is using the I/O port BARs rather than the memory BARs for its registers and this bug seems to be that the dc(4) device can't properly access its registers on dc0 and dc1 on the Atom box. The one thing I see is that the BIOS on the Atom box assigns addresses in the 0x1100-0x11ff range for dc0 and dc1. Those addresses conflict with ISA I/O aliases for the 0x100-0x1ff range. The Dell BIOS is more careful to avoid these ranges. I think the fix is that I need to fix the PCI-PCI bridge to reject these resource ranges if the ISA enable bit is set in the bridge's control register. However, for the time being you can change dc(4) to use the memory BAR instead of the I/O port BAR as a workaround: Index: if_dc.c =================================================================== --- if_dc.c (revision 251132) +++ if_dc.c (working copy) @@ -128,7 +128,7 @@ __FBSDID("$FreeBSD$"); #include #include -#define DC_USEIOSPACE +//#define DC_USEIOSPACE #include If this fixes it then I can take this PR as a test case for handling the ISA enable bit in the PCI-PCI bridge code. -- John Baldwin