Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2566738ybp; Sat, 5 Oct 2019 15:06:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMvSjgYGFayXO7d+67oARNQXG2deNvGEoHN5sBJcMtDvk3fDSgionLxk9Qw85uW5RkbGpN X-Received: by 2002:a17:906:3e96:: with SMTP id a22mr18113848ejj.268.1570313166032; Sat, 05 Oct 2019 15:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570313166; cv=none; d=google.com; s=arc-20160816; b=YP6U1lmdLHh5cKjkl8I1l/ysG4lwit9SPUH6+OfsixckWmtrJExa5E/BlIjWWDb50h 9pYeWGl5/VvtfKuOMLpsGujBiG0Qn+dmSiUw+z3+oP5P9lgcthyinJWtL8KLWlrVWxzA KtAUMt7S4jeon7rxM+CQCPygADkP59wG1hYKpUcv4cs5UgNw6GdWVuT5pMfD9ElCPwJ8 69AHntt9gAh8VYMyUPknhZaF4jK1clWcJiur4Cygc9QDFPKbzSMZ22tbGa6QbPaVG6GT ulmN0g43w9C2uxHhFNTK93AcHqrkI638rICGVz5KJjJETpblEXrhDuZxUA/SXsJFcAHy 1Low== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=wMdnRrOTU2CPivpJ8e4AUiay63xgWFU0Eh0sVZPpASc=; b=S5AQB8pl1e30x492nszdIMOp7iJ+D+HlaVJRibBcDhC/McNT5Y2VFBMr1uvBPyR1AF JNLVW9oxcl1sS7S587MQ2mBOP/R+Gbd3jg0sdF46X7I4+nfw1FzvIT0rM/jdQAsFmEnS 2vtmvr+/1xhZN1sH8oqNJ3grtYHrmU5viT5FDA5STHZM8tHXozuiLQiH5O8JUWb/vDd6 maXyBINSQ3+MnL1A0Qf6r1kwxOq3Dl5yESPSzQlnQPFBq2PUCSt54I/x8oi8LJx3Ylkw UoUGjbEegvAQ/12jYj0nAm49V2DlBIoDjdwdEXHzg7CDetvTR3ZfSzPJfJ8+YcGRaIO7 XuOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="PXyr/deD"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gh16si5377639ejb.150.2019.10.05.15.05.42; Sat, 05 Oct 2019 15:06:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="PXyr/deD"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726074AbfJEWFh (ORCPT + 99 others); Sat, 5 Oct 2019 18:05:37 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:36266 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725801AbfJEWFh (ORCPT ); Sat, 5 Oct 2019 18:05:37 -0400 Received: by mail-pg1-f195.google.com with SMTP id 23so5830462pgk.3; Sat, 05 Oct 2019 15:05:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=wMdnRrOTU2CPivpJ8e4AUiay63xgWFU0Eh0sVZPpASc=; b=PXyr/deDTtZ/qPQGlH79o3Z72KMrIniG8nTh81X4+1ELiiHKpY923XfzYvuQ1ILrJ9 Fg0n3qCLNle+CZ5dBkZzy0hJ/+mXn4iHDedomDzdv3bSWV6FWdamZd/Y3rkzKOGLITHX N05zD9xRBt/MnqPa3TXPOuYfKWrAupRDcxYFq2pnmuT/h3odOMRxKaWJLcP0coDduKB4 BuAUWjn8/gXOFjT+6OPdMbOMytpgj7MAEoBqplHwjpd9CBCIzv2wT81CwfxI3O1f1d09 qoMwN0GFQejMfnF4VnuDgJuC7d0wzm9hRsJP8Ss+DB6n9In3my07WVl2sktDDUGHdL9R 0C0A== 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=wMdnRrOTU2CPivpJ8e4AUiay63xgWFU0Eh0sVZPpASc=; b=XtzcAueVfF1UdL8Cdsc9BV/LVnIzfrZOWXajwKR63L02x2VoKvMZVxztYm5VqZlhxr St01WqB9wX5wxIPGpp3/nGIO5hfookaa84m1KC0AcznJUcgFuRnEv+uHQcfU0mEduSsr mvwRVAv6wx045m3VgO/Vx3jmxMWp8lfwOpe6kT45GLu85WP/T0w6QLOe+WGwizzKlS3k s3hkLqzTp3IsHXqrkgVqofXht+nrw0rf18+m1/0Fy2gt+4eErr/J46FKbzWGrEVs6ERF 2O5A+6au2kqodc/l6wgy4/z4cEUA1KL1I3FkX+S2PVgu5f4x0t/7j6GIL+7638bx4zjg Y3LA== X-Gm-Message-State: APjAAAUbZPPlVwxuk/Sy7FwHr7K9zmeDDzJdg2NzJgGORXZIAXaz9Fsw cT5PpsS6Ee1RjCO91h7t+g0EmG8M X-Received: by 2002:a63:2006:: with SMTP id g6mr22335071pgg.287.1570313136391; Sat, 05 Oct 2019 15:05:36 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id 195sm13989120pfz.103.2019.10.05.15.05.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2019 15:05:35 -0700 (PDT) From: Florian Fainelli To: netdev@vger.kernel.org Cc: Hubert Feurstein , Florian Fainelli , Andrew Lunn , Vivien Didelot , "David S. Miller" , linux-kernel@vger.kernel.org (open list) Subject: [PATCH net] net: dsa: b53: Do not clear existing mirrored port mask Date: Sat, 5 Oct 2019 15:05:18 -0700 Message-Id: <20191005220518.14008-1-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clearing the existing bitmask of mirrored ports essentially prevents us from capturing more than one port at any given time. This is clearly wrong, do not clear the bitmask prior to setting up the new port. Reported-by: Hubert Feurstein Fixes: ed3af5fd08eb ("net: dsa: b53: Add support for port mirroring") Signed-off-by: Florian Fainelli --- drivers/net/dsa/b53/b53_common.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index 526ba2ab66f1..cc3536315eff 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -1845,7 +1845,6 @@ int b53_mirror_add(struct dsa_switch *ds, int port, loc = B53_EG_MIR_CTL; b53_read16(dev, B53_MGMT_PAGE, loc, ®); - reg &= ~MIRROR_MASK; reg |= BIT(port); b53_write16(dev, B53_MGMT_PAGE, loc, reg); -- 2.17.1