Message ID | 1550786597-591-1-git-send-email-Tristram.Ha@microchip.com |
---|---|
Headers | show
Return-Path: <netdev-owner@vger.kernel.org> X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 4457lH1zfJz9s21 for <patchwork-incoming-netdev@ozlabs.org>; Fri, 22 Feb 2019 09:03:23 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726881AbfBUWDW (ORCPT <rfc822;patchwork-incoming-netdev@ozlabs.org>); Thu, 21 Feb 2019 17:03:22 -0500 Received: from esa1.microchip.iphmx.com ([68.232.147.91]:4733 "EHLO esa1.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726237AbfBUWDV (ORCPT <rfc822;netdev@vger.kernel.org>); Thu, 21 Feb 2019 17:03:21 -0500 X-IronPort-AV: E=Sophos;i="5.58,397,1544511600"; d="scan'208";a="28111735" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES128-SHA; 21 Feb 2019 15:03:16 -0700 Received: from localhost.localdomain (10.10.76.4) by CHN-SV-EXCH01.mchp-main.com (10.10.76.37) with Microsoft SMTP Server id 14.3.352.0; Thu, 21 Feb 2019 15:03:16 -0700 From: <Tristram.Ha@microchip.com> To: Sergio Paracuellos <sergio.paracuellos@gmail.com>, Andrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>, Pavel Machek <pavel@ucw.cz> CC: Tristram Ha <Tristram.Ha@microchip.com>, <UNGLinuxDriver@microchip.com>, <netdev@vger.kernel.org> Subject: [PATCH v3 net-next 0/4] net: dsa: microchip: add MIB counters support Date: Thu, 21 Feb 2019 14:03:13 -0800 Message-ID: <1550786597-591-1-git-send-email-Tristram.Ha@microchip.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: <netdev.vger.kernel.org> X-Mailing-List: netdev@vger.kernel.org |
Series |
net: dsa: microchip: add MIB counters support
|
expand
|
From: Tristram Ha <Tristram.Ha@microchip.com> This series of patches is to modify the KSZ9477 DSA driver to read MIB counters periodically to avoid overflow. The MIB counters should be read only when there is link. Otherwise it is a waste of time as hardware never increases the counters. Functions are added to check the port link status so that MIB counters read call is used efficiently. v3 - Use netif_carrier_ok instead of checking the phy device pointer v2 - Create macro similar to readx_poll_timeout to use with switch - Create ksz_port_cleanup function so that variables like on_ports and live_ports can be updated inside it v1 - Use readx_poll_timeout - Do not clear MIB counters when port is enabled - Do not advertise 1000 half-duplex mode when port is enabled - Do not use freeze function as MIB counters may miss counts Tristram Ha (4): net: dsa: microchip: prepare PHY for proper advertisement net: dsa: microchip: add MIB counter reading support net: dsa: microchip: get port link status net: dsa: microchip: remove unnecessary include headers drivers/net/dsa/microchip/ksz9477.c | 137 +++++++++++++++++---------- drivers/net/dsa/microchip/ksz_common.c | 163 ++++++++++++++++++++++++++++++++- drivers/net/dsa/microchip/ksz_common.h | 27 +++++- drivers/net/dsa/microchip/ksz_priv.h | 14 +-- 4 files changed, 284 insertions(+), 57 deletions(-)