{"id":807935,"url":"http://patchwork.ozlabs.org/api/patches/807935/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/patch/20170830222110.15737-2-saeedm@mellanox.com/","project":{"id":7,"url":"http://patchwork.ozlabs.org/api/projects/7/?format=json","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":"<20170830222110.15737-2-saeedm@mellanox.com>","list_archive_url":null,"date":"2017-08-30T22:21:00","name":"[net,01/11] net/mlx5e: Check for qos capability in dcbnl_initialize","commit_ref":null,"pull_url":null,"state":"accepted","archived":true,"hash":"4ae18a60e9fdba30c6c410de858398b6ea1f65f1","submitter":{"id":65299,"url":"http://patchwork.ozlabs.org/api/people/65299/?format=json","name":"Saeed Mahameed","email":"saeedm@mellanox.com"},"delegate":{"id":34,"url":"http://patchwork.ozlabs.org/api/users/34/?format=json","username":"davem","first_name":"David","last_name":"Miller","email":"davem@davemloft.net"},"mbox":"http://patchwork.ozlabs.org/project/netdev/patch/20170830222110.15737-2-saeedm@mellanox.com/mbox/","series":[{"id":707,"url":"http://patchwork.ozlabs.org/api/series/707/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/list/?series=707","date":"2017-08-30T22:21:00","name":"[net,01/11] net/mlx5e: Check for qos capability in dcbnl_initialize","version":1,"mbox":"http://patchwork.ozlabs.org/series/707/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/807935/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/807935/checks/","tags":{},"related":[],"headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjKjY3PbSz9s8w\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 08:21:37 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751416AbdH3WVf (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 30 Aug 2017 18:21:35 -0400","from mail-il-dmz.mellanox.com ([193.47.165.129]:53212 \"EHLO\n\tmellanox.co.il\" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org\n\twith ESMTP id S1750851AbdH3WVc (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 30 Aug 2017 18:21:32 -0400","from Internal Mail-Server by MTLPINE1 (envelope-from\n\tsaeedm@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 31 Aug 2017 01:21:28 +0300","from sws.mtl.labs.mlnx (reg-l-vrt-045-015.mtl.labs.mlnx\n\t[10.135.45.15])\n\tby labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v7UMLSAw009018;\n\tThu, 31 Aug 2017 01:21:28 +0300"],"From":"Saeed Mahameed <saeedm@mellanox.com>","To":"\"David S. Miller\" <davem@davemloft.net>","Cc":"netdev@vger.kernel.org, Huy Nguyen <huyn@mellanox.com>,\n\tSaeed Mahameed <saeedm@mellanox.com>","Subject":"[net 01/11] net/mlx5e: Check for qos capability in dcbnl_initialize","Date":"Thu, 31 Aug 2017 01:21:00 +0300","Message-Id":"<20170830222110.15737-2-saeedm@mellanox.com>","X-Mailer":"git-send-email 2.13.0","In-Reply-To":"<20170830222110.15737-1-saeedm@mellanox.com>","References":"<20170830222110.15737-1-saeedm@mellanox.com>","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"},"content":"From: Huy Nguyen <huyn@mellanox.com>\n\nqos capability is the master capability bit that determines\nif the DCBX is supported for the PCI function. If this bit is off,\ndriver cannot run any dcbx code.\n\nFixes: e207b7e99176 (\"net/mlx5e: ConnectX-4 firmware support for DCBX\")\nSigned-off-by: Huy Nguyen <huyn@mellanox.com>\nReviewed-by: Parav Pandit <parav@mellanox.com>\nSigned-off-by: Saeed Mahameed <saeedm@mellanox.com>\n---\n drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 3 +++\n 1 file changed, 3 insertions(+)","diff":"diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c\nindex 2eb54d36e16e..810b51029c7f 100644\n--- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c\n+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c\n@@ -754,6 +754,9 @@ void mlx5e_dcbnl_initialize(struct mlx5e_priv *priv)\n {\n \tstruct mlx5e_dcbx *dcbx = &priv->dcbx;\n \n+\tif (!MLX5_CAP_GEN(priv->mdev, qos))\n+\t\treturn;\n+\n \tif (MLX5_CAP_GEN(priv->mdev, dcbx))\n \t\tmlx5e_dcbnl_query_dcbx_mode(priv, &dcbx->mode);\n \n","prefixes":["net","01/11"]}