diff --git a/packages/bsp/common/usr/lib/armbian/armbian-common b/packages/bsp/common/usr/lib/armbian/armbian-common index 8015ceb489..bec5acdf9b 100644 --- a/packages/bsp/common/usr/lib/armbian/armbian-common +++ b/packages/bsp/common/usr/lib/armbian/armbian-common @@ -25,8 +25,9 @@ chmod +x /etc/update-motd.d/90-warning get_random_mac () { -if [[ $LINUXFAMILY == sunxi ]]; then prefix="DC:44:6D"; else prefix="X2-00-00"; fi -MACADDR=$(printf $prefix':%02X:%02X:%02X\n' $[RANDOM%256] $[RANDOM%256] $[RANDOM%256]) +local prefixes=("X2" "X6" "XA" "XE") +local random=$(shuf -i 0-3 -n 1) +MACADDR=$(printf ${prefixes[$random]}':%02X:%02X:%02X:%02X:%02X\n' $[RANDOM%256] $[RANDOM%256] $[RANDOM%256] $[RANDOM%256] $[RANDOM%256]) } set_fixed_mac () diff --git a/packages/bsp/common/usr/lib/armbian/armbian-firstrun b/packages/bsp/common/usr/lib/armbian/armbian-firstrun index d6ee4c26dd..433d132230 100644 --- a/packages/bsp/common/usr/lib/armbian/armbian-firstrun +++ b/packages/bsp/common/usr/lib/armbian/armbian-firstrun @@ -76,7 +76,6 @@ case "$1" in sed -i "s/^PORT=.*/PORT=ttyS3/" /etc/default/ap6212 ;; "Orange Pi Zero"|"NanoPi Duo"|"Sunvell R69") - # set XR819 WiFi address permanently based on a random address using Allwinner's MAC prefix get_random_mac echo "options xradio_wlan macaddr=${MACADDR}" >/etc/modprobe.d/xradio_wlan.conf echo -e "\n### [firstrun] Use MAC address ${MACADDR} for Wi-Fi from now" >>${Log} diff --git a/patch/kernel/meson64-next/Revert-net-stmmac-Do-not-keep-rearming-the-coalesce-timer-in-stmmac_xmit.patch b/patch/kernel/meson64-next/Revert-net-stmmac-Do-not-keep-rearming-the-coalesce-timer-in-stmmac_xmit.patch deleted file mode 100644 index 3c1a6a7712..0000000000 --- a/patch/kernel/meson64-next/Revert-net-stmmac-Do-not-keep-rearming-the-coalesce-timer-in-stmmac_xmit.patch +++ /dev/null @@ -1,177 +0,0 @@ -From patchwork Fri Aug 24 09:04:40 2018 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Jerome Brunet -X-Patchwork-Id: 10575397 -Return-Path: - -Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org - [172.30.200.125]) - by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B1DC81390 - for ; - Fri, 24 Aug 2018 14:48:29 +0000 (UTC) -Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) - by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9EB462C5DF - for ; - Fri, 24 Aug 2018 14:48:29 +0000 (UTC) -Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) - id 930562C6E3; Fri, 24 Aug 2018 14:48:29 +0000 (UTC) -X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on - pdx-wl-mail.web.codeaurora.org -X-Spam-Level: -X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 -Received: from bombadil.infradead.org (bombadil.infradead.org - [198.137.202.133]) - (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) - (No client certificate requested) - by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 061B62C5DF - for ; - Fri, 24 Aug 2018 14:48:29 +0000 (UTC) -DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; - d=lists.infradead.org; s=bombadil.20170209; h=Sender: - Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: - List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: - Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: - Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: - References:List-Owner; bh=Ipz7MkXLEkA4l+4UPHBKYgGidNrQiq1Rhgum3muc5jM=; b=eAZ - lDjiCOoBQ4+Fw3GJe6d5ZHGf5l8LyzrsVlHjGcO4ZgTQedcNsmMG3+Bj0p0WuxYyOwpHAgCrtwpF0 - C/FTuLyNrq+mS48G13s/fGJQ+kHwucM7Ah39cjFOr/bgMpgkNjNF3bKZQgg/YHWU4D1C67lBqGYXU - iVBvt24ICc+tIUKC7z7BNQJt3WE5HGBl6VO+qZ/6eAMHUiaBlOcBbY6PiF7fGJ+3AZtqOQGLYgoOz - Hfz12lqEoAMxqS12kCkQawIQlIGTtjg2bNessSjNdpCQsFB1Gl1Qde7u07pch8JlPWokelDw0klZM - 2lrUNa3kwi3h4tf4XcYbtGquVfIQ2Ug==; -Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) - by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) - id 1ftDNz-0004pI-Kc; Fri, 24 Aug 2018 14:48:27 +0000 -Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) - by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) - id 1ft81r-0005He-5c - for linux-amlogic@lists.infradead.org; Fri, 24 Aug 2018 09:07:37 +0000 -Received: by mail-wr1-x444.google.com with SMTP id a108-v6so6827630wrc.13 - for ; - Fri, 24 Aug 2018 02:05:00 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=baylibre-com.20150623.gappssmtp.com; s=20150623; - h=from:to:cc:subject:date:message-id; - bh=z4ffCXzbbDJPOq/rb6uuve93foFOxyU52TMljzPih58=; - b=k8MPpSHj1ACjeQRBbx3gDxNVTKVbqx3BXo0cplaQiykDztOJ6CokFkInlg9y3SgXW+ - O//r2kVi6extVZx2NS9yM50gABGlv+dg3mTsF+Lh3SGVxRNoTqQ1km13gGonLlPCZcH+ - vhR1jvEQgaODkzTN8gN/6xOT0/zl1hAjvVIiYnIG2hShkPh4rWw8YadDTWSqlSStYpYF - kO1ZZ25aoVxhB4ggfH/HSCCTwRwSAsvfUoXTVirm1na3mpd6Vaj88oXVLjuajpnM3NT0 - WiBbiu02KMP3cEler9cW/Ju8XxeW2BPE0WGB2w1wR+GNSs1w8lZVLnH188tJ44xGfI34 - BlHg== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20161025; - h=x-gm-message-state:from:to:cc:subject:date:message-id; - bh=z4ffCXzbbDJPOq/rb6uuve93foFOxyU52TMljzPih58=; - b=IDMLOy1aiQ3OgqaSKKRIkXpnZr7s5ETh/6Cx9T3ZR/QhjmghhgDfeObZ1aqaezeGKk - djvvzarrPexjI0mjFwhaEhXTOtk4qkxiLf9BFSiP6fHzog0H9AmWvYWNDwlaG8z8tAZp - jB1RKi6pCOjN1FQ4+yTt7S/TONtGCH6zAAJdztWOTYCYq4h5PZB2GZliW9xoCEVt1qXv - AtyyBTicLx0cMHc5UxQzODJ2vlDIHkwYCCkdJHP+uvOcCClPCBRXiac4vJ4LUdGfjQGO - 5NKprFcfy3ojE2Vi+r1ewP+qTAh/6DWryHekIfSJt1VjZTVqYrt20siT5tTP3/X13KrQ - SuNA== -X-Gm-Message-State: APzg51BuO/zAOYSKOWkr2zr8Kj7s2oQQmn1T5pKj42BRy2pUI0TJoooP - n8xlICUXzA8u/Ixy2SxAK+t+ZQ== -X-Google-Smtp-Source: - ANB0VdaiiuDtTra1UMpQxVn4G67i2ZhXpx6RrxcQJ2haX/v/ALDcDyirEwq26zOY/n1qI8VCWT6Ong== -X-Received: by 2002:adf:8325:: with SMTP id 34-v6mr633131wrd.67.1535101492843; - Fri, 24 Aug 2018 02:04:52 -0700 (PDT) -Received: from boomer.baylibre.local ([90.63.244.31]) - by smtp.googlemail.com with ESMTPSA id - h75-v6sm2690896wma.46.2018.08.24.02.04.51 - (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); - Fri, 24 Aug 2018 02:04:52 -0700 (PDT) -From: Jerome Brunet -To: Giuseppe Cavallaro , - Alexandre Torgue , - Jose Abreu , netdev@vger.kernel.org -Subject: [PATCH] Revert "net: stmmac: Do not keep rearming the coalesce timer - in stmmac_xmit" -Date: Fri, 24 Aug 2018 11:04:40 +0200 -Message-Id: <20180824090440.13411-1-jbrunet@baylibre.com> -X-Mailer: git-send-email 2.17.1 -X-BeenThere: linux-amlogic@lists.infradead.org -X-Mailman-Version: 2.1.21 -Precedence: list -List-Id: -List-Unsubscribe: , - -List-Archive: -List-Post: -List-Help: -List-Subscribe: , - -Cc: Joao Pinto , linux-kernel@vger.kernel.org, - Vitor Soares , Corentin Labbe , - linux-amlogic@lists.infradead.org, Jerome Brunet -MIME-Version: 1.0 -Content-Type: text/plain; charset="us-ascii" -Sender: "linux-amlogic" -Errors-To: - linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org -X-Virus-Scanned: ClamAV using ClamSMTP - -This reverts commit 4ae0169fd1b3c792b66be58995b7e6b629919ecf. - -This change in the handling of the coalesce timer is causing regression on -(at least) amlogic platforms. - -Network will break down very quickly (a few seconds) after starting -a download. This can easily be reproduced using iperf3 for example. - -The problem has been reported on the S805, S905, S912 and A113 SoCs -(Realtek and Micrel PHYs) and it is likely impacting all Amlogics -platforms using Gbit ethernet - -No problem was seen with the platform using 10/100 only PHYs (GXL internal) - -Reverting change brings things back to normal and allows to use network -again until we better understand the problem with the coalesce timer. - -Cc: Jose Abreu -Cc: Joao Pinto -Cc: Vitor Soares -Cc: Giuseppe Cavallaro -Cc: Alexandre Torgue -Cc: Corentin Labbe -Signed-off-by: Jerome Brunet ---- - drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 - - drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +---- - 2 files changed, 1 insertion(+), 5 deletions(-) - -diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h -index 76649adf8fb0..c0a855b7ab3b 100644 ---- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h -+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h -@@ -112,7 +112,6 @@ struct stmmac_priv { - u32 tx_count_frames; - u32 tx_coal_frames; - u32 tx_coal_timer; -- bool tx_timer_armed; - - int tx_coalesce; - int hwts_tx_en; -diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -index ff1ffb46198a..9f458bb16f2a 100644 ---- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -3147,16 +3147,13 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev) - * element in case of no SG. - */ - priv->tx_count_frames += nfrags + 1; -- if (likely(priv->tx_coal_frames > priv->tx_count_frames) && -- !priv->tx_timer_armed) { -+ if (likely(priv->tx_coal_frames > priv->tx_count_frames)) { - mod_timer(&priv->txtimer, - STMMAC_COAL_TIMER(priv->tx_coal_timer)); -- priv->tx_timer_armed = true; - } else { - priv->tx_count_frames = 0; - stmmac_set_tx_ic(priv, desc); - priv->xstats.tx_set_ic_bit++; -- priv->tx_timer_armed = false; - } - - skb_tx_timestamp(skb);