Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751801AbdISQBf (ORCPT ); Tue, 19 Sep 2017 12:01:35 -0400 Received: from mail.savoirfairelinux.com ([208.88.110.44]:46234 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751488AbdISQAr (ORCPT ); Tue, 19 Sep 2017 12:00:47 -0400 From: Vivien Didelot To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Florian Fainelli , Andrew Lunn , Vivien Didelot Subject: [PATCH net-next 0/4] net: dsa: move master ethtool code Date: Tue, 19 Sep 2017 11:56:56 -0400 Message-Id: <20170919155700.14474-1-vivien.didelot@savoirfairelinux.com> X-Mailer: git-send-email 2.14.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1306 Lines: 34 The DSA core overrides the master device's ethtool_ops structure so that it can inject statistics and such of its dedicated switch CPU port. This ethtool code is currently called on unnecessary conditions or before the master interface and its switch CPU port get wired up. This patchset fixes this. Similarly to slave.c where the DSA slave net_device is the entry point of the dsa_slave_* functions, this patchset also isolates the master's ethtool code in a new master.c file, where the DSA master net_device is the entry point of the dsa_master_* functions. This is a first step towards better control of the master device and support for multiple CPU ports. Vivien Didelot (4): net: dsa: remove copy of master ethtool_ops net: dsa: setup master ethtool unconditionally net: dsa: setup master ethtool after dsa_ptr net: dsa: move master ethtool code include/net/dsa.h | 1 - net/dsa/Makefile | 2 +- net/dsa/dsa.c | 28 ------------- net/dsa/dsa2.c | 18 ++++---- net/dsa/dsa_priv.h | 7 ++-- net/dsa/legacy.c | 10 ++--- net/dsa/master.c | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++ net/dsa/slave.c | 80 ----------------------------------- 8 files changed, 136 insertions(+), 130 deletions(-) create mode 100644 net/dsa/master.c -- 2.14.1