Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B130CC43331 for ; Wed, 13 Nov 2019 09:05:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 87D3821A49 for ; Wed, 13 Nov 2019 09:05:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727275AbfKMJFF (ORCPT ); Wed, 13 Nov 2019 04:05:05 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:58695 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726988AbfKMJFF (ORCPT ); Wed, 13 Nov 2019 04:05:05 -0500 X-Originating-IP: 86.206.246.123 Received: from localhost (lfbn-tou-1-421-123.w86-206.abo.wanadoo.fr [86.206.246.123]) (Authenticated sender: antoine.tenart@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 93927240018; Wed, 13 Nov 2019 09:05:01 +0000 (UTC) From: Antoine Tenart To: davem@davemloft.net, linux@armlinux.org.uk Cc: Antoine Tenart , andrew@lunn.ch, alexandre.belloni@bootlin.com, nicolas.ferre@microchip.com, netdev@vger.kernel.org, thomas.petazzoni@bootlin.com, mparab@cadence.com, piotrs@cadence.com, dkangude@cadence.com, ewanm@cadence.com, arthurm@cadence.com, stevenh@cadence.com Subject: [PATCH net-next v3 0/2] net: macb: convert to phylink Date: Wed, 13 Nov 2019 10:00:04 +0100 Message-Id: <20191113090006.58898-1-antoine.tenart@bootlin.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hello, This series converts the MACB Ethernet driver to the Phylink framework. The MAC configuration is moved to the Phylink ops and Phylink helpers are now used in the ethtools functions. This helps to access the flow control and pauseparam logic and this will be helpful in the future for boards using this controller with SFP cages. Thanks, Antoine Since v2: - Moved the Tx and Rx buffer initialization rework to its own patch. Since v1: - Stopped using state->link in mac_config and moved macb_set_tx_clk to the link_up helper.. - Fixed the node given to phylink_of_phy_connect. - Removed netif_carrier_off from macb_open. - Fixed the macb_get_wol logic. - Rewored macb_ioctl as suggested. - Added a call to phylink_destroy in macb_remove. - Fixed the suspend/resume case by calling phylink_start/stop in the resume/suspend helpers. I had to take the rtnl lock to do this, which might be something to discuss. Antoine Tenart (2): net: macb: move the Tx and Rx buffer initialization into a function net: macb: convert to phylink drivers/net/ethernet/cadence/Kconfig | 2 +- drivers/net/ethernet/cadence/macb.h | 9 +- drivers/net/ethernet/cadence/macb_main.c | 484 ++++++++++++----------- 3 files changed, 261 insertions(+), 234 deletions(-) -- 2.23.0