Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/537143/?format=api
{ "id": 537143, "url": "http://patchwork.ozlabs.org/api/patches/537143/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20151027235924.30048.24399.stgit@localhost.localdomain/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20151027235924.30048.24399.stgit@localhost.localdomain>", "list_archive_url": null, "date": "2015-10-27T23:59:24", "name": "[next,3/5] fm10k: Cleanup exception handling for changing queues", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "0b09f67daa0df608db66ced80c04e2937caf8027", "submitter": { "id": 67293, "url": "http://patchwork.ozlabs.org/api/people/67293/?format=api", "name": "Alexander Duyck", "email": "aduyck@mirantis.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20151027235924.30048.24399.stgit@localhost.localdomain/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/537143/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/537143/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@lists.osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Received": [ "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ozlabs.org (Postfix) with ESMTP id 6554E1402B3\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 28 Oct 2015 10:59:30 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id AE69687D0B;\n\tTue, 27 Oct 2015 23:59:29 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id y0RamMFYrUtw; Tue, 27 Oct 2015 23:59:28 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id EEB8887A4B;\n\tTue, 27 Oct 2015 23:59:28 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 31D961C0FD1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 27 Oct 2015 23:59:27 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 0CD6287A4B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 27 Oct 2015 23:59:27 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 0iw47tNrI13q for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 27 Oct 2015 23:59:26 +0000 (UTC)", "from mail-pa0-f45.google.com (mail-pa0-f45.google.com\n\t[209.85.220.45])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 5262D87B01\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 27 Oct 2015 23:59:26 +0000 (UTC)", "by pasz6 with SMTP id z6so236687065pas.2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 27 Oct 2015 16:59:26 -0700 (PDT)", "from localhost.localdomain\n\t(static-50-53-21-5.bvtn.or.frontiernet.net. [50.53.21.5])\n\tby smtp.gmail.com with ESMTPSA id\n\tey17sm41850558pac.26.2015.10.27.16.59.25\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 27 Oct 2015 16:59:25 -0700 (PDT)" ], "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=mirantis.com header.i=@mirantis.com\n\theader.b=a0QCtXGj; dkim-atps=neutral", "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=mirantis.com;\n\ts=google; \n\th=subject:from:to:cc:date:message-id:in-reply-to:references\n\t:user-agent:mime-version:content-type:content-transfer-encoding;\n\tbh=q1eKm1SKe5zYx4OyliqQZo5gFDm8yPIMsxVcOF3v8I4=;\n\tb=a0QCtXGjBJtkuc1gCOh7FNZZv6oma9pY8/pmRQrp6ytrM5egkN+X3vnZcWgs0eH/m/\n\t+AnZEUI9EK/MZLv2a3y9YAHP6eQzKIIZh7yD5uGG7qE25ARdyK6xtqwYw/ldPXJgQH68\n\t7tDzx4Wb44SF7o1TpqbYfM2b9KSQsScbMY2IQ=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to\n\t:references:user-agent:mime-version:content-type\n\t:content-transfer-encoding;\n\tbh=q1eKm1SKe5zYx4OyliqQZo5gFDm8yPIMsxVcOF3v8I4=;\n\tb=Ut13uA57/e7G+v66/NbrnbRQMLlUNOocYi1RehF75yW8mVl/c1EXzA8WCXxsWXZvho\n\tQnmZyXHyAFOyqXCyXPnm/ubAUfuRbzTYRGLAQk3TjEDLotyu67iLsTPGEO7ovZx5vNhn\n\tWCWkY3YTGDzQ+pX8iNsY/HC67QiqfxASEQfwLiHNmu61uEIPeIXBZFi6FYqFrKEyrAiX\n\tMnfUJ7N8G6PpdDjdl5fgUNJUsw5KBWDtXNSRxm0JIVlAQAiW1+OTw+FQBvDijsYXkrwM\n\tk2EhHIDE9uydIYU/dLkNDoERE9Avf5OeM41NQ7fl/bryT74Vz+byQhPuUDxnKd8CsbHq\n\ta0Dg==", "X-Gm-Message-State": "ALoCoQkP5bRQyt9NX/Dtgf04jxEEy5yCxw4+KVb4ObAENnRbRjTlx0FG32clDy8zJ9V82zz2oU2G", "X-Received": "by 10.67.1.34 with SMTP id bd2mr29930012pad.45.1445990365986;\n\tTue, 27 Oct 2015 16:59:25 -0700 (PDT)", "From": "Alexander Duyck <aduyck@mirantis.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Tue, 27 Oct 2015 16:59:24 -0700", "Message-ID": "<20151027235924.30048.24399.stgit@localhost.localdomain>", "In-Reply-To": "<20151027235341.30048.46286.stgit@localhost.localdomain>", "References": "<20151027235341.30048.46286.stgit@localhost.localdomain>", "User-Agent": "StGit/0.17.1-dirty", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [next PATCH 3/5] fm10k: Cleanup exception\n\thandling for changing queues", "X-BeenThere": "intel-wired-lan@lists.osuosl.org", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>", "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>", "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>" }, "content": "This patch is meant to cleanup the exception handling for the paths where\nwe reset the interrupts and then reconfigure them. In all of these paths\nwe had very different levels of exception handling. I have updated the\ndriver so that all of the paths should result in a similar state if we\nfail.\n\nSpecifically the driver will now unload the mailbox interrupt, free the\nqueue vectors and MSI-X, and then detach the interface.\n\nIn addition for any of the PCIe related resets I have added a check with\nthe hw_ready function to just make sure the registers are in a readable\nstate prior to reopening the interface.\n\nSigned-off-by: Alexander Duyck <aduyck@mirantis.com>\n---\n drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 17 +++++--\n drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 55 ++++++++++++++++++-----\n 2 files changed, 55 insertions(+), 17 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c\nindex 38fe2d8c8388..4855686d2b4e 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c\n@@ -1176,19 +1176,28 @@ int fm10k_setup_tc(struct net_device *dev, u8 tc)\n \n \terr = fm10k_init_queueing_scheme(interface);\n \tif (err)\n-\t\treturn err;\n+\t\tgoto err_queueing_scheme;\n \n \terr = fm10k_mbx_request_irq(interface);\n \tif (err)\n-\t\treturn err;\n+\t\tgoto err_mbx_irq;\n \n-\tif (netif_running(dev))\n-\t\tfm10k_open(dev);\n+\terr = netif_running(dev) ? fm10k_open(dev) : 0;\n+\tif (err)\n+\t\tgoto err_open;\n \n \t/* flag to indicate SWPRI has yet to be updated */\n \tinterface->flags |= FM10K_FLAG_SWPRI_CONFIG;\n \n \treturn 0;\n+err_open:\n+\tfm10k_mbx_free_irq(interface);\n+err_mbx_irq:\n+\tfm10k_clear_queueing_scheme(interface);\n+err_queueing_scheme:\n+\tnetif_device_detach(dev);\n+\n+\treturn err;\n }\n \n static int fm10k_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\nindex 15327d274d72..7b33cddfc6be 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\n@@ -185,7 +185,13 @@ static void fm10k_reinit(struct fm10k_intfc *interface)\n \t}\n \n \t/* reassociate interrupts */\n-\tfm10k_mbx_request_irq(interface);\n+\terr = fm10k_mbx_request_irq(interface);\n+\tif (err)\n+\t\tgoto err_mbx_irq;\n+\n+\terr = fm10k_hw_ready(interface);\n+\tif (err)\n+\t\tgoto err_open;\n \n \t/* update hardware address for VFs if perm_addr has changed */\n \tif (hw->mac.type == fm10k_mac_vf) {\n@@ -205,14 +211,23 @@ static void fm10k_reinit(struct fm10k_intfc *interface)\n \t/* reset clock */\n \tfm10k_ts_reset(interface);\n \n-\tif (netif_running(netdev))\n-\t\tfm10k_open(netdev);\n-\n+\terr = netif_running(netdev) ? fm10k_open(netdev) : 0;\n+\tif (err)\n+\t\tgoto err_open;\n+\t\t\n \tfm10k_iov_resume(interface->pdev);\n \n+\trtnl_unlock();\n+\n+\tclear_bit(__FM10K_RESETTING, &interface->state);\n+\n+\treturn;\n+err_open:\n+\tfm10k_mbx_free_irq(interface);\n+err_mbx_irq:\n+\tfm10k_clear_queueing_scheme(interface);\n reinit_err:\n-\tif (err)\n-\t\tnetif_device_detach(netdev);\n+\tnetif_device_detach(netdev);\n \n \trtnl_unlock();\n \n@@ -2130,16 +2145,22 @@ static int fm10k_resume(struct pci_dev *pdev)\n \trtnl_lock();\n \n \terr = fm10k_init_queueing_scheme(interface);\n-\tif (!err) {\n-\t\tfm10k_mbx_request_irq(interface);\n-\t\tif (netif_running(netdev))\n-\t\t\terr = fm10k_open(netdev);\n-\t}\n+\tif (err)\n+\t\tgoto err_queueing_scheme;\n \n-\trtnl_unlock();\n+\terr = fm10k_mbx_request_irq(interface);\n+\tif (err)\n+\t\tgoto err_mbx_irq;\n \n+\terr = fm10k_hw_ready(interface);\n \tif (err)\n-\t\treturn err;\n+\t\tgoto err_open;\n+\n+\terr = netif_running(netdev) ? fm10k_open(netdev) : 0;\n+\tif (err)\n+\t\tgoto err_open;\n+\t\t\n+\trtnl_unlock();\n \n \t/* assume host is not ready, to prevent race with watchdog in case we\n \t * actually don't have connection to the switch\n@@ -2157,6 +2178,14 @@ static int fm10k_resume(struct pci_dev *pdev)\n \tnetif_device_attach(netdev);\n \n \treturn 0;\n+err_open:\n+\tfm10k_mbx_free_irq(interface);\n+err_mbx_irq:\n+\tfm10k_clear_queueing_scheme(interface);\n+err_queueing_scheme:\n+\trtnl_unlock();\n+\n+\treturn err;\n }\n \n /**\n", "prefixes": [ "next", "3/5" ] }