From patchwork Tue Sep 8 00:51:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 1359330 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=lunn.ch Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4BlmpH1Lk5z9sTM for ; Tue, 8 Sep 2020 10:52:39 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728305AbgIHAwd (ORCPT ); Mon, 7 Sep 2020 20:52:33 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:48814 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728088AbgIHAwb (ORCPT ); Mon, 7 Sep 2020 20:52:31 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kFRro-00Di69-7x; Tue, 08 Sep 2020 02:52:12 +0200 From: Andrew Lunn To: David Miller Cc: netdev , Chris Healy , Andrew Lunn Subject: [PATCH net-next v2 0/7] net: dsa: mv88e6xxx: Add devlink regions support Date: Tue, 8 Sep 2020 02:51:48 +0200 Message-Id: <20200908005155.3267736-1-andrew@lunn.ch> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Make use of devlink regions to allow read access to some of the internal of the switches. The switch itself will never trigger a region snapshot, it is assumed it is performed from user space as needed. v2: Remove left of debug print Comment ATU format is generic to mv88e6xxx Combine declaration and the assignment on a single line. Andrew Lunn (7): net: dsa: Add helper to convert from devlink to ds net: dsa: Add devlink regions support to DSA net: dsa: mv88e6xxx: Move devlink code into its own file net: dsa: mv88e6xxx: Create helper for FIDs in use net: dsa: mv88e6xxx: Add devlink regions net: dsa: wire up devlink info get net: dsa: mv88e6xxx: Implement devlink info get callback drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/dsa/mv88e6xxx/chip.c | 290 ++---------- drivers/net/dsa/mv88e6xxx/chip.h | 14 + drivers/net/dsa/mv88e6xxx/devlink.c | 686 ++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/devlink.h | 21 + include/net/dsa.h | 13 +- net/dsa/dsa.c | 36 +- net/dsa/dsa2.c | 19 +- 8 files changed, 807 insertions(+), 273 deletions(-) create mode 100644 drivers/net/dsa/mv88e6xxx/devlink.c create mode 100644 drivers/net/dsa/mv88e6xxx/devlink.h