From patchwork Sat May 21 08:07:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Micha=C5=82_Osowiecki?= X-Patchwork-Id: 624726 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rBcvc35jMz9t5Y for ; Sat, 21 May 2016 18:11:23 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=uWvzEbS0; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b41x5-00034e-Ip; Sat, 21 May 2016 08:08:03 +0000 Received: from mail-lf0-x22e.google.com ([2a00:1450:4010:c07::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b41x2-00033w-Jx for lede-dev@lists.infradead.org; Sat, 21 May 2016 08:08:01 +0000 Received: by mail-lf0-x22e.google.com with SMTP id e126so31652207lfg.2 for ; Sat, 21 May 2016 01:07:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version; bh=MBRcQKzKbAIZ01YPLnkGMdwakgoPvKq+25Mg91qLvLA=; b=uWvzEbS0qUgR4TXmsZGp5P3nIAirHgM29Jmw0rO7Q28/9V/DxUlenqau5qtTZlfe2L OhmeuTreAQPu7+FPnHivLhVFTOfsTy6CkQ5mqv87FPaijX4zw+nQg/aCkIGjB6ZBCQLH LfurLPtQH0j1GuEeb4Pmhbxl5w5TQSXwwCejJcizocipyOzutpSDI/4MjXmcwDvU9dFm DmndNjeqzQ9VZ0nTS0QC3o7A1GNwTcvEcdv/K9MlcGXTU+w9CJhGUJyUjiPVXg/vrZiS HEJTy5enVYtsJMwigtAM0TDg6dQ1wIRWOXTskDVW5CVMnkcLzYH637j6ubJVrMhGkplR 8b6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version; bh=MBRcQKzKbAIZ01YPLnkGMdwakgoPvKq+25Mg91qLvLA=; b=Xldfz3mTyRb+Dp9x/8ALxUxdT1yFzBte3tKJ1D46y/LJLA+Q7BHAiHHR9QdgFwSD0c Q/rF+3pnSFDydiFPF2g8erh6U6IN1os2n6eJmrDgv5K3HQorYgTRkd20xihmHSLiEnoQ P5VxwmcnW1i42TBn8ezpZna9ES4nLQlKdup+3BhynWRQQj04jaeozBkMV3KDMWzLnOB1 k3VZ0qCW0sarpiYroDYtCtP03QyJf6yx6KvAyw/Uqrmm1thd26hsnmLaeBF5ndQuBbiI KlbdbHo2ze59rvEKL+BxYUdo+RHaTBziUrXfhGmhdSMtK7c6IY6cPzlSQpcUkcIfj79p ASTg== X-Gm-Message-State: AOPr4FVhlLlCOirSQ5nR5RjzpenuLJYs41jmnUUMHLp8Fu3Quaj4Spzz9IJZ2u0cTskRjw== X-Received: by 10.25.218.14 with SMTP id r14mr2481038lfg.120.1463818057540; Sat, 21 May 2016 01:07:37 -0700 (PDT) Received: from [192.168.2.102] (c43-66.icpnet.pl. [62.21.43.66]) by smtp.gmail.com with ESMTPSA id z132sm330172lff.46.2016.05.21.01.07.36 for (version=TLSv1/SSLv3 cipher=OTHER); Sat, 21 May 2016 01:07:36 -0700 (PDT) To: lede-dev@lists.infradead.org From: =?UTF-8?Q?Micha=c5=82_Osowiecki?= Message-ID: <57401748.9010001@gmail.com> Date: Sat, 21 May 2016 10:07:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160521_010800_867372_38B2247B X-CRM114-Status: UNSURE ( 7.69 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c07:0:0:0:22e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michal.osowiecki[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [LEDE-DEV] b53 cpu_port patch for cavium boards X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Cisco RV042G is Cavium based router with BCM53125 switch and BCM54612E connected to port 8, and port 5 acts as cpu port. Probably Linksys LRT214 and LRT224 will be affected by this patch too (boards are identical). I don't know if there are other Cavium boards with BCM53125. If so, this patch will need more work to detect them. Signed-off-by: MichaƂ Osowiecki --- a/drivers/net/phy/b53/b53_common.c +++ b/drivers/net/phy/b53/b53_common.c @@ -1372,6 +1372,14 @@ /* cpu port is always last */ sw_dev->ports = sw_dev->cpu_port + 1; +#ifdef CONFIG_CAVIUM_OCTEON_SOC + if (dev->chip_id == BCM53125_DEVICE_ID) { + /* CISCO RV042G */ + sw_dev->cpu_port = 5; + sw_dev->ports = 9; + dev->enabled_ports = 0x11f; + } +#endif dev->enabled_ports |= BIT(sw_dev->cpu_port); dev->ports = devm_kzalloc(dev->dev,