From owner-freebsd-mips@FreeBSD.ORG Fri May 4 15:31:49 2012 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 635041065791; Fri, 4 May 2012 15:31:49 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0822B8FC14; Fri, 4 May 2012 15:31:48 +0000 (UTC) Received: by qcsg15 with SMTP id g15so2456374qcs.13 for ; Fri, 04 May 2012 08:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=VJnGelBUu/HPf+3P2DQHcB511Q41PmdTKUrrp1UJ8mM=; b=dnwcRjTRMxTjTWQQckq05ire4u09WJRPABitkS08zlDdtMXSdAvi7e4l/CDJ69P2Os /8id/tkJCXBzj2jp1AVjjZBmfoFGL4Z4uriiEIbfqZNm/WmxfVr21s9CidAD0S60LSAt NfkOQ2namAU3ODUVAS6JXP0B7u4wuXz2MRM6ivFGTHzPZnOTINVlqvbU7/Qr2kqxT9rK Y4ws8Z8fOLKlQQVa7z9jUDvgLguvdRYixPw8hCuXcxtFXZuLZnw5ZRNz7999XLzCnHAI LXDCM/3ANn2TmR9t3fMtVam3TCiTV5yDW9e6YTp40PaMYxueLW5YbccKemz/Tde0mDga 3TcQ== MIME-Version: 1.0 Received: by 10.224.210.10 with SMTP id gi10mr10821048qab.47.1336145508143; Fri, 04 May 2012 08:31:48 -0700 (PDT) Sender: pkelsey@gmail.com Received: by 10.229.149.198 with HTTP; Fri, 4 May 2012 08:31:48 -0700 (PDT) In-Reply-To: References: Date: Fri, 4 May 2012 11:31:48 -0400 X-Google-Sender-Auth: ChYF2pfp0JpzltAX0_cnbGPjajc Message-ID: From: Patrick Kelsey To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-mips@freebsd.org Subject: Re: heads up - ar71xx changes X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 15:31:49 -0000 On Wed, May 2, 2012 at 5:37 PM, Adrian Chadd wrote: > Hi, > > there's been a few ar71xx changes in the last few days. I'd appreciate > it if it got decent testing. > Hi Adrian, I've finally gotten back to doing a bit of testing with an RB450G (AR71XX + AR8316), and I found that I needed to use the following diff to get arg1 to initialize properly on that platform: Index: sys/mips/atheros/if_arge.c =================================================================== --- sys/mips/atheros/if_arge.c (revision 234999) +++ sys/mips/atheros/if_arge.c (working copy) @@ -600,7 +605,8 @@ &sc->arge_miibus, sc->arge_ifp, arge_ifmedia_upd, arge_ifmedia_sts, BMSR_DEFCAPMASK, i, MII_OFFSET_ANY, 0); - if (error != 0) { + if ((error != 0) && + (sc->arge_miibus != NULL)) { device_printf(sc->arge_dev, "unable to attach" " PHY %d: %d\n", i, error); goto fail; Without the above diff, things wind up at goto fail on arge1 (which has no miibus and a phymask of 0xf) instead of in the multiphy logic that follows. -Patrick