From owner-freebsd-wireless@freebsd.org Tue Aug 9 02:07:12 2016 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A355FBB0D9A for ; Tue, 9 Aug 2016 02:07:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6FC851805 for ; Tue, 9 Aug 2016 02:07:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x22d.google.com with SMTP id 38so374848225iol.0 for ; Mon, 08 Aug 2016 19:07:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to; bh=U027rOAgNLC3g19SS+XYGXZSOYFzXieAkHOYDtNAHPs=; b=slWcPJz01C62C9wE2Cf07ejbEQTYNbeyo8P7AdbmiXzhI+/MeQWdFMjbdnhItybQ3E AgO6VN77qK1LuD98FYpIEd0ZB1iMZE8gYl32yuAeYL16P58u+i3qbAzHwcZKXd48E9en I6lRQPP+Sp4FDRULy/b947rpcoWxL8EK3X6YhfSkwTKp6GgALeUb2HHZ+r1Ak07Ywwfr e199I+/NP0jDBGW/hyCC3Vw7tdGOgDjayjqdH2as/+ouUlgTjpzGpgH1/ldGOvL/3bBX IrdSCUQKjpiosObhuBxLkGRdQm/oIBFBa9ajuIL71pO4gUXDNl82n3HGfiWuvBbJ+Zf1 t+lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=U027rOAgNLC3g19SS+XYGXZSOYFzXieAkHOYDtNAHPs=; b=Euu6jfBYN/cVK6/Rhh+M4kob4qRs77+zhVbIRQcOJGJ/ZwZwtKpIc2l45DmnSxyPFI +kfH4w2G/Wco3nNDk9SqCXUYVoce3KQbxrJhAcUeHF/DfFtRse2sddr8dd/tTyuTwpSW i8WmyTd2Gs6A/QFIVgjY+uuyMldPLl2Lp44oveB/qrXGBHaKHJlURxeO0tP0jDrnvIlY fSnQ4BKaVJxIpJHwIFlh8AnyKuGWXjd7UqAB9OpWEnbyjl4JvBuGOTF/ywu6T0dnVjrl jIaeNn7TP5De8axoxCJWT6tb6gr401tGOGbhooKcIEJCb3zFmwBDr68hTG44Axtfsos+ 8jiA== X-Gm-Message-State: AEkooutxW0D8eHFqcrqZoeKr8jRCHqbZ+jRfUW+ENYk/nvAfQHuAN0wWPepWx65XDK6pZRfLhK8RiSPPI/gNxQ== X-Received: by 10.107.144.10 with SMTP id s10mr92962692iod.165.1470708431562; Mon, 08 Aug 2016 19:07:11 -0700 (PDT) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.36.141.129 with HTTP; Mon, 8 Aug 2016 19:07:10 -0700 (PDT) From: Adrian Chadd Date: Mon, 8 Aug 2016 19:07:10 -0700 X-Google-Sender-Auth: UfEZaS9JUyXuGbz8i9htJQNP62g Message-ID: Subject: help tracking down carambola 2 ethernet link stability To: "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2016 02:07:12 -0000 hiya, FreeBSD-HEAD on the carambola 2 has an interesting effect - the switch port temporarily flaps any time the wifi interface is brought up or down. I've narrowed it to the "tuning_caps" field in the EEPROM. It's overriding some PLL capacitor tuning values, causing the carambola 2 to be more frequency-correct (ie, it solved all of the "why can it only see some but not other devices on 2GHz" issues) but it seems to have introduced this weird behaviour. If I disable that code, then the link doesn't flap at all. If you use this in AP mode then it shows up as the ethernet link flapping whenever the chip is reset (eg stuck beacon.) in STA mode it shows up as the ethernet link flapping each time the channel is changed. The ath9k driver in Linux and openwrt (both carambola 2 and the upstream openwrt) have some patches to make "USB more stable" by disabling some PHY lock bits, but it doesn't make a difference here. I'm wondering if there are other reset and/or PHY PLL bits that we just do differently from the Atheros HAL that ath9k "does better" on this platform. So, I'm asking for some help in tracking this stuff down. I'd really like to see this completely stable on the carambola 2 as it's a cheaply available AR9331 part and it'd be a shame to not support it, but I'm out of spare clock cycles to chase it all down. Thanks, -adrian