Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/542544/?format=api
{ "id": 542544, "url": "http://patchwork.ozlabs.org/api/patches/542544/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1447177230-21312-1-git-send-email-jeffrey.t.kirsher@intel.com/", "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": "<1447177230-21312-1-git-send-email-jeffrey.t.kirsher@intel.com>", "list_archive_url": null, "date": "2015-11-10T17:40:30", "name": "[next,v2,3/5] fm10k: Cleanup exception handling for changing queues", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "dd77e482eda23eacb50f7ea86bc73e4edc8aecd1", "submitter": { "id": 473, "url": "http://patchwork.ozlabs.org/api/people/473/?format=api", "name": "Kirsher, Jeffrey T", "email": "jeffrey.t.kirsher@intel.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/1447177230-21312-1-git-send-email-jeffrey.t.kirsher@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/542544/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/542544/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 silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ozlabs.org (Postfix) with ESMTP id C5206140213\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 11 Nov 2015 04:40:37 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id E43D626DD4;\n\tTue, 10 Nov 2015 17:40:36 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id N6VgRQrxvX44; Tue, 10 Nov 2015 17:40:35 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 2024B1FDF5;\n\tTue, 10 Nov 2015 17:40:35 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 9AF1B1C1F5B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 10 Nov 2015 17:40:33 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 969B08729C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 10 Nov 2015 17:40:33 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id CVPFz4vDZY0q for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 10 Nov 2015 17:40:32 +0000 (UTC)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id C24CF87293\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 10 Nov 2015 17:40:32 +0000 (UTC)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga101.jf.intel.com with ESMTP; 10 Nov 2015 09:40:32 -0800", "from jtkirshe-linux.jf.intel.com ([134.134.3.91])\n\tby orsmga001.jf.intel.com with ESMTP; 10 Nov 2015 09:40:32 -0800" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.20,271,1444719600\"; d=\"scan'208\";a=\"816463206\"", "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Tue, 10 Nov 2015 09:40:30 -0800", "Message-Id": "<1447177230-21312-1-git-send-email-jeffrey.t.kirsher@intel.com>", "X-Mailer": "git-send-email 2.5.0", "Cc": "Alexander Duyck <aduyck@mirantis.com>", "Subject": "[Intel-wired-lan] [next PATCH v2 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>", "MIME-Version": "1.0", "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": "From: Alexander Duyck <aduyck@mirantis.com>\n\nThis 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---\nv2: cleaned up trailing whitespace\n\n drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 17 ++++++--\n drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 53 +++++++++++++++++++------\n 2 files changed, 54 insertions(+), 16 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c\nindex 4307f18..1be8083 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 464a64d..72f782c 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+\terr = netif_running(netdev) ? fm10k_open(netdev) : 0;\n+\tif (err)\n+\t\tgoto err_open;\n \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@@ -2116,16 +2131,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+\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@@ -2143,6 +2164,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", "v2", "3/5" ] }