From owner-freebsd-stable@FreeBSD.ORG Fri Nov 30 01:39:45 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E508B637 for ; Fri, 30 Nov 2012 01:39:45 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id A94838FC14 for ; Fri, 30 Nov 2012 01:39:45 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi5so5471691pad.13 for ; Thu, 29 Nov 2012 17:39:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=RpK+xi+ja3ex6u82CNDCO8rmme2PPCEYi++1wwPHeYU=; b=LSff7yMWezlkxuC9Yrx9IGhlHmTzWhAZRuElqyUoJwuR3NGbrZB6C2ZrV6dZ86vAUD 4p0tM0SuCBmjohnm/1yF9FWdNUpEJVRvl5gufQTwwCy4+qPlUDld7mQjwTUjbSv6Hut6 phY0f8KFamWyuWEqegIE18514Kis6JSiAVmJUF+MXvTBqSaHTzNsl3OntpywtUPEqBN0 qzT6F4xH00JQe9fdK5Gv/Q43jDBYMY6rXLlcKGGY5poVWbeW6mt9BC4afVK8hyfb8nSB BusH1aLnt7aFtvICTXlUeeskwvqaI3baZrjcfdnaREznejxTbm/OaeKYYFotnJjBUuas f7kg== Received: by 10.68.143.201 with SMTP id sg9mr1314481pbb.32.1354239578999; Thu, 29 Nov 2012 17:39:38 -0800 (PST) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPS id xk2sm2099269pbc.45.2012.11.29.17.39.35 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 29 Nov 2012 17:39:37 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Fri, 30 Nov 2012 10:39:30 +0900 From: YongHyeon PYUN Date: Fri, 30 Nov 2012 10:39:30 +0900 To: Richard Kuhns Subject: Re: bge on the new Mac Mini Message-ID: <20121130013930.GA3124@michelle.cdnetworks.com> References: <50AD32A6.8080209@wintek.com> <20121122014921.GA3180@michelle.cdnetworks.com> <20121122020851.GB3180@michelle.cdnetworks.com> <50B3872B.9010709@wintek.com> <20121127052448.GC1452@michelle.cdnetworks.com> <50B4C155.8050703@wintek.com> <20121128001950.GA3390@michelle.cdnetworks.com> <50B629C5.8050805@wintek.com> <20121129000816.GA3190@michelle.cdnetworks.com> <50B75FA4.1000601@wintek.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50B75FA4.1000601@wintek.com> User-Agent: Mutt/1.4.2.3i Cc: "freebsd-stable@freebsd.org" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Nov 2012 01:39:46 -0000 On Thu, Nov 29, 2012 at 08:14:12AM -0500, Richard Kuhns wrote: > On 11/28/12 19:08, YongHyeon PYUN wrote: > > On Wed, Nov 28, 2012 at 10:12:05AM -0500, Richard Kuhns wrote: > >> On 11/27/12 19:19, YongHyeon PYUN wrote: > >>> On Tue, Nov 27, 2012 at 08:34:13AM -0500, Richard Kuhns wrote: > >>>> On 11/27/12 00:24, YongHyeon PYUN wrote: > >>>>> On Mon, Nov 26, 2012 at 10:13:47AM -0500, Richard Kuhns wrote: > >>>>>> On 11/21/12 21:08, YongHyeon PYUN wrote: > >>>>>>> On Thu, Nov 22, 2012 at 10:49:21AM +0900, YongHyeon PYUN wrote: > >>>>>>>> On Wed, Nov 21, 2012 at 02:59:34PM -0500, Richard Kuhns wrote: > >>>>>>>>> On 11/20/12 03:52, YongHyeon PYUN wrote: > >>>>>>>>>> On Fri, Nov 16, 2012 at 10:30:04AM -0500, Richard Kuhns wrote: > >>>>>>>>>>> Hi all, > >>>>>>>>>>> > >>>>>>>>>>> Over the last month or so I've installed FreeBSD 9 (-stable) on several Mac > >>>>>>>>>>> Minis via the memstick image; they seem to be pretty good little boxes for > >>>>>>>>>>> things like offsite secondary nameservers, for example, and they're easily > >>>>>>>>>>> replaced in case of problems. > >>>>>>>>>>> > >>>>>>>>>>> However, the newest minis have slightly different hardware, and FreeBSD can't > >>>>>>>>>>> find the built-in NIC. pciconf -lv on the new mini shows it as > >>>>>>>>>>> > >>>>>>>>>>> none3@pci0:1:0:0: class=0x020000 card=0x168614e4 chip=0x168614e4 rev=0x01 > >>>>>>>>>> > >>>>>>>>>> It seems this controller is BCM57766. > >>>>>>>>>> > >>>>>>>>>>> hdr=0x00 > >>>>>>>>>>> vendor = 'Broadcom Corporation' > >>>>>>>>>>> class = network > >>>>>>>>>>> subclass = ethernet > >>>>>>>>>>> > >>>>>>>>>>> The previous edition mini (that works) reports > >>>>>>>>>>> > >>>>>>>>>>> bge0@pci0:2:0:0: class=0x020000 card=0x16b414e4 chip=0x16b414e4 rev=0x10 hdr=0x00 > >>>>>>>>>>> vendor = 'Broadcom Corporation' > >>>>>>>>>>> device = 'NetXtreme BCM57765 Gigabit Ethernet PCIe' > >>>>>>>>>>> class = network > >>>>>>>>>>> subclass = ethernet > >>>>>>>>>>> > >>>>>>>>>>> Is there a chance that adding the new card/chip info to the current driver would > >>>>>>>>>>> allow it to work? I'll be happy to test and report back. I'm afraid I'm not > >>>>>>>>>>> familiar enough with hardware at that level to figure out the patch myself. > >>>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> Try attached patch and let me know whether the patch works or not. > >>>>>>>>>> If the patch works please share dmesg output(bge(4) and brgphy(4) > >>>>>>>>>> output only). > >>>>>>>>>> Note, the patch was generated against CURRENT. > >>>>>>>>>> > >>>>>>>>> > >>>>>>>>> I'm afraid it didn't help. I ended up grabbing if_bge.c and if_bgereg.h from > >>>>>>>> > >>>>>>>> I guess you also need to copy brgphy.c from HEAD to > >>>>>>>> /usr/src/sys/dev/mii directory. > >>>>>>>> > >>>>>>>>> HEAD using svnweb.freebsd.org. The patch installed cleanly and there were no > >>>>>>>>> errors during the build, but still no NIC. > >>>>>>>> > >>>>>>>> Does it mean you're not seeing bge0 interface? Or you can't pass > >>>>>>>> any traffic via bge0? > >>>>>>> > >>>>>>> Oops, it seems I've not included your device ID in the diff. > >>>>>>> Try attach one instead. Make sure you use brgphy.c from HEAD. > >>>>>>> > >>>>>> > >>>>>> There's progress! With your latest patch using brgphy.c, if_bge.c, and > >>>>>> if_bgereg.h from head I'm now seeing the bge0 interface. Unfortunately, the > >>>>>> moment I try to configure it the box locks up completely; it won't even toggle > >>>>>> the caps lock LED. > >>>>>> > >>>>>> Booting single user and running ifconfig shows: > >>>>>> > >>>>>> bge0: flags=8802 metric 0 mtu 1500 > >>>>>> options=8009b > >>>>>> ether a8:20:66:11:3b:d6 > >>>>>> nd6 options=21 > >>>>>> media: Ethernet autoselect (1000baseT ) > >>>>>> status: active > >>>>>> > >>>>>> I did a verbose boot; here's the part that seems to be relevant to bge0: > >>>>>> > >>>>>> bge0: mem > >>>>>> 0xa0400000-0xa040ffff,0xa0410000-0xa041ffff irq 16 at device 0.0 on pci1 > >>>>>> bge0: CHIP ID 0x10110142; ASIC REV 0x10110; CHIP REV 0x101101; PCI-E > >>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > >>>>> > >>>>> All these information are garbage which indicates a bug in the diff. > >>>>> > >>>>>> miibus0: on bge0 > >>>>>> brgphy0: PHY 1 on miibus0 > >>>>>> brgphy0: OUI 0x001be9, model 0x0024, rev. 1 > >>>>>> brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, > >>>>>> 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow > >>>>>> bge0: bpf attached > >>>>>> bge0: Ethernet address: a8:20:66:11:3b:d6 > >>>>>> ioapic0: routing intpin 16 (PCI IRQ 16) to lapic 0 vector 61 > >>>>>> > >>>>>> I greatly appreciate your efforts. I'm sorry for the delay getting back with > >>>>>> you, but we had a busy Thanksgiving weekend. > >>>>>> > >>>>> > >>>>> Try again with attached bge.57766.diff3. > >>>>> Thanks for testing! > >>>>> > >>>> > >>>> I don't think the patch actually got attached :-( > >>> > >>> Oops, attached. > >>> > >> > >> And there was great rejoicing... > >> > >> It seems to take longer than I'm used to for it to decide it has link (about > >> halfway through 'waiting for the default route interface'), but it works! > >> > > > > Great. Could you show me dmesg(bge(4) and brgphy(4) only) and > > "ifconfig bge0" output? > > Sure. Here's the 'ifconfig bge0' output: > > bge0: flags=8843 metric 0 mtu 1500 > options=c019b > ether a8:20:66:11:3b:d6 > inet 172.28.1.90 netmask 0xffffff00 broadcast 172.28.1.255 > inet6 fe80::aa20:66ff:fe11:3bd6%bge0 prefixlen 64 scopeid 0x2 > nd6 options=29 > media: Ethernet autoselect (1000baseT ) > status: active > > And here's the dmesg output from a verbose boot: > > bge0: mem > 0xa0400000-0xa040ffff,0xa0410000-0xa041ffff irq 16 at device 0.0 on pci1 > bge0: attempting to allocate 1 MSI vectors (8 supported) > msi: routing MSI IRQ 265 to local APIC 0 vector 61 > bge0: using IRQ 265 for MSI > bge0: CHIP ID 0x57766001; ASIC REV 0x57766; CHIP REV 0x577660; PCI-E > bge0: Disabling fastboot > miibus0: on bge0 > brgphy0: PHY 1 on miibus0 > brgphy0: OUI 0x001be9, model 0x0024, rev. 1 > brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, > 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow > bge0: bpf attached > bge0: Ethernet address: a8:20:66:11:3b:d6 Committed to HEAD(r243686). Thanks.