From owner-freebsd-embedded@FreeBSD.ORG Tue Nov 6 21:01:57 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ADE7087C; Tue, 6 Nov 2012 21:01:57 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 67B878FC0A; Tue, 6 Nov 2012 21:01:57 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so733853pbb.13 for ; Tue, 06 Nov 2012 13:01:56 -0800 (PST) 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=2gaaPUtjNUz0jR2FQYQ1055AVFzxgyAwY74Rz4P93oo=; b=sRVVrJhGY+KZIJhkp1BhJdp7WYHXIRYI234zN+rrhi4dZWUY0pp6+ZVGYQkiL6LFFV 0HTGpryqjm7kn8R3KNf3ezgQ2FQYpmorrvNS0MvUIaVJBm5L3RBDk8pow92Re2Von/fJ 1BfPhr++Iw3jIH2r9bdtwyCAHO8levFOLWk1d8B48VFTiLDoGQ/cWRmy9XphEMD2llmr eo7MHjPuiRKFQeXUWWxUaZnNWpKylZvGDuuh0BvAhSVaegpzYzlXoiHEC0/kKzIdwBgP 0LWkuNlckX9jbFuiUQY574gdc9o7vRqU6coUqJDkeDSn20fWIEHYHNW3K/2I5DRz9YEV f/qA== MIME-Version: 1.0 Received: by 10.68.251.197 with SMTP id zm5mr449213pbc.30.1352235716070; Tue, 06 Nov 2012 13:01:56 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.68.124.130 with HTTP; Tue, 6 Nov 2012 13:01:55 -0800 (PST) In-Reply-To: <4770DC05-A7C2-4E59-8188-ABFA404DAF23@gmail.com> References: <0FCCB08E-8517-4B5C-8621-06DAF3B86B09@gmail.com> <5BB9E514-7C57-480E-994C-BF59023BC400@gmail.com> <20121012020904.c03ef76a.ray@ddteam.net> <23E6E442-A8CE-4024-86BF-B0D19CC696F8@gmail.com> <7E5C5ACD-B9D0-4591-B071-797F9F1E1743@gmail.com> <4770DC05-A7C2-4E59-8188-ABFA404DAF23@gmail.com> Date: Tue, 6 Nov 2012 13:01:55 -0800 X-Google-Sender-Auth: pkz2AJ0kNULYsJBqIGwRLa7cqdk Message-ID: Subject: Re: if_arge eventually fails to attach PHY at boot (with arswitch) From: Adrian Chadd To: Luiz Otavio O Souza Content-Type: text/plain; charset=ISO-8859-1 Cc: Aleksandr Rybalko , freebsd-embedded@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2012 21:01:57 -0000 Hi, I'm happy to make arswitch need to be specified in hints, rather than probed. Does anyone have any cleaner ideas on how to probe this stuff? It's very recursive (ie, arswitch exposes an mdiobus, which the arswitch code then tries to probe. The probing messes the mdiobus up and makes it difficult to find a PHY there.) This feels like ISA all over again.. :) Adrian On 6 November 2012 10:39, Luiz Otavio O Souza wrote: > On Nov 3, 2012, at 12:48 PM, Adrian Chadd wrote: >> On 3 November 2012 06:10, Luiz Otavio O Souza wrote: >>> Hi Adrian and sorry for the delay, >>> >>> Yes, there is one fix missing, but it is not ready yet... i'm work on the fix and hope to get it ready for a review later today or tomorrow. >> >> Cool! What is it? > > The arswitch driver always tries to attach to every mdio bus on the system. When the switch exposes his own mdio another arswitch instance was trying to attach to it and while trying to read from the switch registers it sometimes upset the switch. > > I've tried to fix this by others means, but agreed with Ray that arswitch can't be really 'detected', so i just removed the auto attachment from it and now it only attaches when hinted. This fixes the problem without any additional hack. > > Please let me know what you think about it. > > The rtl8366 may have the same problem, but for now i don't have any hardware to test it... > > Ahh, the AP96 kernel file has the arswitch device declared but there is no hints for it on AP96.hints, so i didn't touch it. > > Thanks, > Luiz >