Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1369706/?format=api
{ "id": 1369706, "url": "http://patchwork.ozlabs.org/api/patches/1369706/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20200923085614.8147-1-weifeng.voon@intel.com/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api", "name": "Linux network development", "link_name": "netdev", "list_id": "netdev.vger.kernel.org", "list_email": "netdev@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20200923085614.8147-1-weifeng.voon@intel.com>", "list_archive_url": null, "date": "2020-09-23T08:56:14", "name": "[v1,net] net: stmmac: removed enabling eee in EEE set callback", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "9984960a2385b3bf3150d8703ef5e2223f6f8888", "submitter": { "id": 69079, "url": "http://patchwork.ozlabs.org/api/people/69079/?format=api", "name": "Voon, Weifeng", "email": "weifeng.voon@intel.com" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20200923085614.8147-1-weifeng.voon@intel.com/mbox/", "series": [ { "id": 203621, "url": "http://patchwork.ozlabs.org/api/series/203621/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=203621", "date": "2020-09-23T08:56:14", "name": "[v1,net] net: stmmac: removed enabling eee in EEE set callback", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/203621/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1369706/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1369706/checks/", "tags": {}, "related": [], "headers": { "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;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=23.128.96.18; helo=vger.kernel.org;\n envelope-from=netdev-owner@vger.kernel.org; receiver=<UNKNOWN>)", "ozlabs.org;\n dmarc=fail (p=none dis=none) header.from=intel.com" ], "Received": [ "from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby ozlabs.org (Postfix) with ESMTP id 4BxBqT4N9Pz9sTC\n\tfor <patchwork-incoming-netdev@ozlabs.org>;\n Wed, 23 Sep 2020 18:56:21 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n id S1726794AbgIWI4S (ORCPT\n <rfc822;patchwork-incoming-netdev@ozlabs.org>);\n Wed, 23 Sep 2020 04:56:18 -0400", "from mga02.intel.com ([134.134.136.20]:30055 \"EHLO mga02.intel.com\"\n rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n id S1726244AbgIWI4S (ORCPT <rfc822;netdev@vger.kernel.org>);\n Wed, 23 Sep 2020 04:56:18 -0400", "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 23 Sep 2020 01:56:17 -0700", "from unknown (HELO climb.png.intel.com) ([10.221.118.165])\n by orsmga008.jf.intel.com with ESMTP; 23 Sep 2020 01:56:15 -0700" ], "IronPort-SDR": [ "\n OhDDZKWBhmGrz4R4FECwCEvhn5fQa8NxHeyDJ+rvlZ5M4HUFQF/T1HKtndPljmD4dPbXwSpwGK\n nLMSQ2DtGWRg==", "\n ANRFrIrOS1XqWbh5ONAWDEfN8VLGno0Z8I0+1k51QtiGq4RV1eWTMpCc570TtrxINW/3wFG4AF\n pw0IL5CEMvFA==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9752\"; a=\"148492030\"", "E=Sophos;i=\"5.77,293,1596524400\";\n d=\"scan'208\";a=\"148492030\"", "E=Sophos;i=\"5.77,293,1596524400\";\n d=\"scan'208\";a=\"338590656\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Voon Weifeng <weifeng.voon@intel.com>", "To": "\"David S . Miller\" <davem@davemloft.net>,\n Maxime Coquelin <mcoquelin.stm32@gmail.com>", "Cc": "netdev@vger.kernel.org, linux-kernel@vger.kernel.org,\n Jose Abreu <joabreu@synopsys.com>,\n Giuseppe Cavallaro <peppe.cavallaro@st.com>,\n Andrew Lunn <andrew@lunn.ch>,\n Alexandre Torgue <alexandre.torgue@st.com>,\n Ong Boon Leong <boon.leong.ong@intel.com>,\n Voon Weifeng <weifeng.voon@intel.com>,\n Seow Chen Yong <chen.yong.seow@intel.com>,\n Mark Gross <mgross@linux.intel.com>", "Subject": "[PATCH v1 net] net: stmmac: removed enabling eee in EEE set callback", "Date": "Wed, 23 Sep 2020 16:56:14 +0800", "Message-Id": "<20200923085614.8147-1-weifeng.voon@intel.com>", "X-Mailer": "git-send-email 2.17.1", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "EEE should be only be enabled during stmmac_mac_link_up() when the\nlink are up and being set up properly. set_eee should only do settings\nconfiguration and disabling the eee.\n\nWithout this fix, turning on EEE using ethtool will return\n\"Operation not supported\". This is due to the driver is in a dead loop\nwaiting for eee to be advertised in the for eee to be activated but the\ndriver will only configure the EEE advertisement after the eee is\nactivated.\n\nEthtool should only return \"Operation not supported\" if there is no EEE\ncapbility in the MAC controller.\n\nFixes: 8a7493e58ad6 (\"net: stmmac: Fix a race in EEE enable callback\")\n\nSigned-off-by: Voon Weifeng <weifeng.voon@intel.com>\n---\n .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 15 ++++-----------\n 1 file changed, 4 insertions(+), 11 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c\nindex ac5e8cc5fb9f..430a4b32ec1e 100644\n--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c\n+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c\n@@ -675,23 +675,16 @@ static int stmmac_ethtool_op_set_eee(struct net_device *dev,\n \tstruct stmmac_priv *priv = netdev_priv(dev);\n \tint ret;\n \n-\tif (!edata->eee_enabled) {\n+\tif (!priv->dma_cap.eee)\n+\t\treturn -EOPNOTSUPP;\n+\n+\tif (!edata->eee_enabled)\n \t\tstmmac_disable_eee_mode(priv);\n-\t} else {\n-\t\t/* We are asking for enabling the EEE but it is safe\n-\t\t * to verify all by invoking the eee_init function.\n-\t\t * In case of failure it will return an error.\n-\t\t */\n-\t\tedata->eee_enabled = stmmac_eee_init(priv);\n-\t\tif (!edata->eee_enabled)\n-\t\t\treturn -EOPNOTSUPP;\n-\t}\n \n \tret = phylink_ethtool_set_eee(priv->phylink, edata);\n \tif (ret)\n \t\treturn ret;\n \n-\tpriv->eee_enabled = edata->eee_enabled;\n \tpriv->tx_lpi_timer = edata->tx_lpi_timer;\n \treturn 0;\n }\n", "prefixes": [ "v1", "net" ] }