From mboxrd@z Thu Jan 1 00:00:00 1970 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=-7.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS autolearn=ham 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 7AC55C282C0 for ; Fri, 25 Jan 2019 20:08:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4B4272184C for ; Fri, 25 Jan 2019 20:08:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tCQBImXY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726999AbfAYUIj (ORCPT ); Fri, 25 Jan 2019 15:08:39 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:39048 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726044AbfAYUIi (ORCPT ); Fri, 25 Jan 2019 15:08:38 -0500 Received: by mail-wm1-f67.google.com with SMTP id y8so7744401wmi.4 for ; Fri, 25 Jan 2019 12:08:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=7zSuKXnuuD+/f4Z7EKupWxN7D4kPah391xCe929F7tk=; b=tCQBImXY3Fop83d4ngXzx82cCGPGclZtQ0XrhoGIXD9ew9d85G1yKMlY+GD7wpCW2o mpGogDYwHdUMuvJ08QoTn9LBAmURmzHI62GWFBfKgVmLUy5lIeaq4gmbaqHPiWLypATu fmOZdNIPLNOLRI9pcoGwWGAF5BgI80QdfOxwgjXa+occAwae0MUfyLGY/HVpr2krn0O0 oD0C32IIkQUkamtWj7y72FgIruT1qoCjZkeDWIPtRaoZovBlO/bCqFTpSkL1sxXLIk0N rR9k82nEpDYuIr51tQZ9OelNAFtTNPBvPsMIad8H6M1kN1vrFUlbAaxt/7lPQiSW+mRr BwUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=7zSuKXnuuD+/f4Z7EKupWxN7D4kPah391xCe929F7tk=; b=pRDxqcTFGPaH4FmHPr6hcpkGmtbq36vgJBwqilCXXCERymp0GS+u5kUvwFilHFCTLL jmMrQcKWc6zkLWMIT33BQTsEgZMHmAev9Bplk5KvJGsjBPUfKfh+iHJXjV/nmDZLNLO1 qaWGGdswLO5ZPoEI8ApAlL+DbiUaKiFtoW0qheL8c24hkSy5QkWV0tdjz+U7zXBMLBLR +5k+XgAauPczJXnZHd2B/WrEklKDlo52dGoA92KQqkY/ONzQOyWJc3x1Cp/OFOi+9XrC XQv94udhD5BnFqIL0uX5kA1gG59CalKiNE0siDxfQprJHvDoLuUJtx+4ALwI5M+mKZLD DBhQ== X-Gm-Message-State: AJcUukfsDHvSX+Qz5tTAYslKZ8wSJb9cENI55ORYFDzKjVQ0dgkkfrhl m08snWxsxVSslzh7+Spqi6iTV9lK X-Google-Smtp-Source: ALg8bN50AgsRZDA+uzgV3NJXSy8lLnwRpfJkYHQZTDCPk68mTYwt/aKFiGqJ8dP8BzwYJOG2/aihTA== X-Received: by 2002:a1c:67c2:: with SMTP id b185mr7501455wmc.96.1548446917092; Fri, 25 Jan 2019 12:08:37 -0800 (PST) Received: from ?IPv6:2003:ea:8bf1:e200:fc07:c732:1a36:65ad? (p200300EA8BF1E200FC07C7321A3665AD.dip0.t-ipconnect.de. [2003:ea:8bf1:e200:fc07:c732:1a36:65ad]) by smtp.googlemail.com with ESMTPSA id 127sm119883993wmm.45.2019.01.25.12.08.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 12:08:36 -0800 (PST) To: Andrew Lunn , Florian Fainelli , David Miller Cc: "netdev@vger.kernel.org" From: Heiner Kallweit Subject: [PATCH net-next] Documentation: net: phy: reflect latest changes to phylib API Message-ID: <27b5d4a5-4939-54d9-baed-6dd2ae743511@gmail.com> Date: Fri, 25 Jan 2019 21:08:24 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Recent changes to the phylib API - removed phy_stop_interrupts - replaced phy_start_interrupts with phy_request_interrupt - moved some functionality from phy_connect() and phy_disconnect() to phy_start() and phy_stop() respectively. Reflect these changes in the documentation. Signed-off-by: Heiner Kallweit --- Documentation/networking/phy.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Documentation/networking/phy.txt b/Documentation/networking/phy.txt index bdec0f700..7ecba4fd6 100644 --- a/Documentation/networking/phy.txt +++ b/Documentation/networking/phy.txt @@ -210,12 +210,16 @@ Letting the PHY Abstraction Layer do Everything Lastly, once the controller is ready to handle network traffic, you call phy_start(phydev). This tells the PAL that you are ready, and configures the - PHY to connect to the network. If you want to handle your own interrupts, - just set phydev->irq to PHY_IGNORE_INTERRUPT before you call phy_start. - Similarly, if you don't want to use interrupts, set phydev->irq to PHY_POLL. + PHY to connect to the network. If the MAC interrupt of your network driver + also handles PHY status changes, just set phydev->irq to PHY_IGNORE_INTERRUPT + before you call phy_start and use phy_mac_interrupt() from the network + driver. If you don't want to use interrupts, set phydev->irq to PHY_POLL. + phy_start() enables the PHY interrupts (if applicable) and starts the + phylib state machine. When you want to disconnect from the network (even if just briefly), you call - phy_stop(phydev). + phy_stop(phydev). This function also stops the phylib state machine and + disables PHY interrupts. Pause frames / flow control @@ -271,11 +275,9 @@ Doing it all yourself A convenience function to print out the PHY status neatly. - int phy_start_interrupts(struct phy_device *phydev); - int phy_stop_interrupts(struct phy_device *phydev); + void phy_request_interrupt(struct phy_device *phydev); - Requests the IRQ for the PHY interrupts, then enables them for - start, or disables then frees them for stop. + Requests the IRQ for the PHY interrupts. struct phy_device * phy_attach(struct net_device *dev, const char *phy_id, phy_interface_t interface); -- 2.20.1