Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2195755/?format=api
{ "id": 2195755, "url": "http://patchwork.ozlabs.org/api/patches/2195755/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260211191855.1532226-1-poros@redhat.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": "<20260211191855.1532226-1-poros@redhat.com>", "list_archive_url": null, "date": "2026-02-11T19:18:55", "name": "[net,v3] iavf: fix incorrect reset handling in callbacks", "commit_ref": null, "pull_url": null, "state": "under-review", "archived": false, "hash": "b46211d3c35b68f15f4ce402de83417a79efe56a", "submitter": { "id": 74657, "url": "http://patchwork.ozlabs.org/api/people/74657/?format=api", "name": "Petr Oros", "email": "poros@redhat.com" }, "delegate": { "id": 109701, "url": "http://patchwork.ozlabs.org/api/users/109701/?format=api", "username": "anguy11", "first_name": "Anthony", "last_name": "Nguyen", "email": "anthony.l.nguyen@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260211191855.1532226-1-poros@redhat.com/mbox/", "series": [ { "id": 491897, "url": "http://patchwork.ozlabs.org/api/series/491897/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=491897", "date": "2026-02-11T19:18:55", "name": "[net,v3] iavf: fix incorrect reset handling in callbacks", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/491897/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2195755/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2195755/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=4noywx2m;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fB7Xz1f9Kz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 12 Feb 2026 06:19:45 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 01EEB41CD3;\n\tWed, 11 Feb 2026 19:19:43 +0000 (UTC)", "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id TCHYabt1rl7v; Wed, 11 Feb 2026 19:19:42 +0000 (UTC)", "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 1472441CCE;\n\tWed, 11 Feb 2026 19:19:42 +0000 (UTC)", "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n by lists1.osuosl.org (Postfix) with ESMTP id 911CCBE\n for <intel-wired-lan@lists.osuosl.org>; Wed, 11 Feb 2026 19:19:40 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id 72D2541CCE\n for <intel-wired-lan@lists.osuosl.org>; Wed, 11 Feb 2026 19:19:40 +0000 (UTC)", "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id UJ3kwVc1RRja for <intel-wired-lan@lists.osuosl.org>;\n Wed, 11 Feb 2026 19:19:39 +0000 (UTC)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by smtp4.osuosl.org (Postfix) with ESMTPS id 3C2D741CCD\n for <intel-wired-lan@lists.osuosl.org>; Wed, 11 Feb 2026 19:19:38 +0000 (UTC)", "from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-351-g5t3baavPnW_sZWYw8sXsw-1; Wed,\n 11 Feb 2026 14:19:34 -0500", "from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 772D5180025E; Wed, 11 Feb 2026 19:19:31 +0000 (UTC)", "from ShadowPeak.redhat.com (unknown [10.44.32.184])\n by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 6C7311956053; Wed, 11 Feb 2026 19:19:26 +0000 (UTC)" ], "X-Virus-Scanned": [ "amavis at osuosl.org", "amavis at osuosl.org" ], "X-Comment": "SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ", "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 smtp4.osuosl.org 1472441CCE", "OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3C2D741CCD" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1770837582;\n\tbh=2wTcipsz7Rnh5YeneES48xOkCKOGihJrZo1p4Ia4V3o=;\n\th=From:To:Date:In-Reply-To:References:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t Cc:From;\n\tb=4noywx2m44I+FbFF++fnb1ffWgmKY3HJVom9eu/NNdpThEQVfvIa/M0mqxqRLMsBP\n\t hEpXy2w1wdOa1JgOKdxxzNV7d/l0xh+pKjCAlIxYX5vkqqbPbrt4kbwHT9s3EBZy0d\n\t HjE1DqN/5WMCej9Ei7VGx+PC+c9vDEV+IOovX7/r/NKaqRy32Kz7otsT4ppHIvmva6\n\t apTioN0mKjo2cmrkq3KYKoo+xLS42zksTuOQNMzlb/OxrLWqyhy/EOvkVKzNvqSOfs\n\t 0CKYP0kwqBVFXWYC4IcJFL4zg06ZGKi9ScG8x+x4IlHClpSG1tXuIpxUl9yOdUUWQL\n\t oVgYB5EhlPNQw==", "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124;\n helo=us-smtp-delivery-124.mimecast.com; envelope-from=poros@redhat.com;\n receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp4.osuosl.org 3C2D741CCD", "X-MC-Unique": "g5t3baavPnW_sZWYw8sXsw-1", "X-Mimecast-MFC-AGG-ID": "g5t3baavPnW_sZWYw8sXsw_1770837572", "From": "Petr Oros <poros@redhat.com>", "To": "netdev@vger.kernel.org", "Date": "Wed, 11 Feb 2026 20:18:55 +0100", "Message-ID": "<20260211191855.1532226-1-poros@redhat.com>", "In-Reply-To": "<20260207102245.812795-1-poros@redhat.com>", "References": "<20260207102245.812795-1-poros@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.17", "X-Mimecast-MFC-PROC-ID": "452XsjHtTlPEHw95XmTLBaPZDSihuKvB2HgEEorHHlM_1770837572", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "content-type": "text/plain; charset=\"US-ASCII\"; x-default=true", "X-Mailman-Original-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com;\n s=mimecast20190719; t=1770837577;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=2wTcipsz7Rnh5YeneES48xOkCKOGihJrZo1p4Ia4V3o=;\n b=OurrYR+qnMy83ROMcEawrRVJZSwABDEbRppArU1iIY0ptMGITLDgd8ojuOlhIp9zKXONpS\n CwaTiZY9/e6ivKzI9OtxKtJqTJmhFvokZl/wEPbrQTVNM8sWTeRx8gaWSnWlc54cKQXrK+\n z2b2kh+kXis3J2Eapi1y2JWmOpBhKjA=", "X-Mailman-Original-Authentication-Results": [ "smtp4.osuosl.org;\n dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com", "smtp4.osuosl.org;\n dkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=OurrYR+q" ], "Subject": "[Intel-wired-lan] [PATCH net v3] iavf: fix incorrect reset handling\n in callbacks", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Cc": "ivecera@redhat.com, shaojijie@huawei.com,\n Przemek Kitszel <przemyslaw.kitszel@intel.com>,\n Eric Dumazet <edumazet@google.com>, linux-kernel@vger.kernel.org,\n aleksandr.loktionov@intel.com, Andrew Lunn <andrew+netdev@lunn.ch>,\n Stanislav Fomichev <sdf@fomichev.me>,\n Tony Nguyen <anthony.l.nguyen@intel.com>,\n intel-wired-lan@lists.osuosl.org, Jacob Keller <jacob.e.keller@intel.com>,\n Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,\n \"David S. Miller\" <davem@davemloft.net>", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "Three driver callbacks schedule a reset and wait for its completion:\nndo_change_mtu(), ethtool set_ringparam(), and ethtool set_channels().\n\nWaiting for reset in ndo_change_mtu() and set_ringparam() was added by\ncommit c2ed2403f12c (\"iavf: Wait for reset in callbacks which trigger\nit\") to fix a race condition where adding an interface to bonding\nimmediately after MTU or ring parameter change failed because the\ninterface was still in __RESETTING state. The same commit also added\nwaiting in iavf_set_priv_flags(), which was later removed by commit\n53844673d555 (\"iavf: kill \"legacy-rx\" for good\").\n\nWaiting in set_channels() was introduced earlier by commit 4e5e6b5d9d13\n(\"iavf: Fix return of set the new channel count\") to ensure the PF has\nenough time to complete the VF reset when changing channel count, and to\nreturn correct error codes to userspace.\n\nCommit ef490bbb2267 (\"iavf: Add net_shaper_ops support\") added\nnet_shaper_ops to iavf, which required reset_task to use _locked NAPI\nvariants (napi_enable_locked, napi_disable_locked) that need the netdev\ninstance lock.\n\nLater, commit 7e4d784f5810 (\"net: hold netdev instance lock during\nrtnetlink operations\") and commit 2bcf4772e45a (\"net: ethtool: try to\nprotect all callback with netdev instance lock\") started holding the\nnetdev instance lock during ndo and ethtool callbacks for drivers with\nnet_shaper_ops.\n\nFinally, commit 120f28a6f314 (\"iavf: get rid of the crit lock\")\nreplaced the driver's crit_lock with netdev_lock in reset_task, causing\nincorrect behavior: the callback holds netdev_lock and waits for\nreset_task, but reset_task needs the same lock:\n\n Thread 1 (callback) Thread 2 (reset_task)\n ------------------- ---------------------\n netdev_lock() [blocked on workqueue]\n ndo_change_mtu() or ethtool op\n iavf_schedule_reset()\n iavf_wait_for_reset() iavf_reset_task()\n waiting... netdev_lock() <- blocked\n\nThis does not strictly deadlock because iavf_wait_for_reset() uses\nwait_event_interruptible_timeout() with a 5-second timeout. The wait\neventually times out, the callback returns an error to userspace, and\nafter the lock is released reset_task completes the reset. This leads to\nincorrect behavior: userspace sees an error even though the configuration\nchange silently takes effect after the timeout.\n\nFix this by extracting the reset logic from iavf_reset_task() into a new\niavf_reset_step() function that expects netdev_lock to be already held.\nThe three callbacks now call iavf_reset_step() directly instead of\nscheduling the work and waiting, performing the reset synchronously in\nthe caller's context which already holds netdev_lock. This eliminates\nboth the incorrect error reporting and the need for\niavf_wait_for_reset(), which is removed along with the now-unused\nreset_waitqueue.\n\nThe workqueue-based iavf_reset_task() becomes a thin wrapper that\nacquires netdev_lock and calls iavf_reset_step(), preserving its use\nfor PF-initiated resets.\n\nThe callbacks may block for several seconds while iavf_reset_step()\npolls hardware registers, but this is acceptable since netdev_lock is a\nper-device mutex and only serializes operations on the same interface.\n\nv3:\n- Remove netif_running() guard from iavf_set_channels(). Unlike\n set_ringparam where descriptor counts are picked up by iavf_open()\n directly, num_req_queues is only consumed during\n iavf_reinit_interrupt_scheme() in the reset path. Skipping the reset\n on a down device would silently discard the channel count change.\n- Remove dead reset_waitqueue code (struct field, init, and all\n wake_up calls) since iavf_wait_for_reset() was the only consumer.\n\nFixes: 120f28a6f314 (\"iavf: get rid of the crit lock\")\nReviewed-by: Jacob Keller <jacob.e.keller@intel.com>\nSigned-off-by: Petr Oros <poros@redhat.com>\n---\n drivers/net/ethernet/intel/iavf/iavf.h | 3 +-\n .../net/ethernet/intel/iavf/iavf_ethtool.c | 19 ++---\n drivers/net/ethernet/intel/iavf/iavf_main.c | 77 ++++++-------------\n .../net/ethernet/intel/iavf/iavf_virtchnl.c | 1 -\n 4 files changed, 31 insertions(+), 69 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/iavf/iavf.h b/drivers/net/ethernet/intel/iavf/iavf.h\nindex a87e0c6d4017ad..e9fb0a0919e376 100644\n--- a/drivers/net/ethernet/intel/iavf/iavf.h\n+++ b/drivers/net/ethernet/intel/iavf/iavf.h\n@@ -260,7 +260,6 @@ struct iavf_adapter {\n \tstruct work_struct adminq_task;\n \tstruct work_struct finish_config;\n \twait_queue_head_t down_waitqueue;\n-\twait_queue_head_t reset_waitqueue;\n \twait_queue_head_t vc_waitqueue;\n \tstruct iavf_q_vector *q_vectors;\n \tstruct list_head vlan_filter_list;\n@@ -626,5 +625,5 @@ void iavf_add_adv_rss_cfg(struct iavf_adapter *adapter);\n void iavf_del_adv_rss_cfg(struct iavf_adapter *adapter);\n struct iavf_mac_filter *iavf_add_filter(struct iavf_adapter *adapter,\n \t\t\t\t\tconst u8 *macaddr);\n-int iavf_wait_for_reset(struct iavf_adapter *adapter);\n+void iavf_reset_step(struct iavf_adapter *adapter);\n #endif /* _IAVF_H_ */\ndiff --git a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c\nindex 2cc21289a70779..6ff3842a1ff1f0 100644\n--- a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c\n+++ b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c\n@@ -492,7 +492,6 @@ static int iavf_set_ringparam(struct net_device *netdev,\n {\n \tstruct iavf_adapter *adapter = netdev_priv(netdev);\n \tu32 new_rx_count, new_tx_count;\n-\tint ret = 0;\n \n \tif ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))\n \t\treturn -EINVAL;\n@@ -537,13 +536,11 @@ static int iavf_set_ringparam(struct net_device *netdev,\n \t}\n \n \tif (netif_running(netdev)) {\n-\t\tiavf_schedule_reset(adapter, IAVF_FLAG_RESET_NEEDED);\n-\t\tret = iavf_wait_for_reset(adapter);\n-\t\tif (ret)\n-\t\t\tnetdev_warn(netdev, \"Changing ring parameters timeout or interrupted waiting for reset\");\n+\t\tadapter->flags |= IAVF_FLAG_RESET_NEEDED;\n+\t\tiavf_reset_step(adapter);\n \t}\n \n-\treturn ret;\n+\treturn 0;\n }\n \n /**\n@@ -1723,7 +1720,6 @@ static int iavf_set_channels(struct net_device *netdev,\n {\n \tstruct iavf_adapter *adapter = netdev_priv(netdev);\n \tu32 num_req = ch->combined_count;\n-\tint ret = 0;\n \n \tif ((adapter->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADQ) &&\n \t adapter->num_tc) {\n@@ -1745,13 +1741,10 @@ static int iavf_set_channels(struct net_device *netdev,\n \n \tadapter->num_req_queues = num_req;\n \tadapter->flags |= IAVF_FLAG_REINIT_ITR_NEEDED;\n-\tiavf_schedule_reset(adapter, IAVF_FLAG_RESET_NEEDED);\n+\tadapter->flags |= IAVF_FLAG_RESET_NEEDED;\n+\tiavf_reset_step(adapter);\n \n-\tret = iavf_wait_for_reset(adapter);\n-\tif (ret)\n-\t\tnetdev_warn(netdev, \"Changing channel count timeout or interrupted waiting for reset\");\n-\n-\treturn ret;\n+\treturn 0;\n }\n \n /**\ndiff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c\nindex 4b0fc8f354bc90..9fd414800bca7a 100644\n--- a/drivers/net/ethernet/intel/iavf/iavf_main.c\n+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c\n@@ -185,31 +185,6 @@ static bool iavf_is_reset_in_progress(struct iavf_adapter *adapter)\n \treturn false;\n }\n \n-/**\n- * iavf_wait_for_reset - Wait for reset to finish.\n- * @adapter: board private structure\n- *\n- * Returns 0 if reset finished successfully, negative on timeout or interrupt.\n- */\n-int iavf_wait_for_reset(struct iavf_adapter *adapter)\n-{\n-\tint ret = wait_event_interruptible_timeout(adapter->reset_waitqueue,\n-\t\t\t\t\t!iavf_is_reset_in_progress(adapter),\n-\t\t\t\t\tmsecs_to_jiffies(5000));\n-\n-\t/* If ret < 0 then it means wait was interrupted.\n-\t * If ret == 0 then it means we got a timeout while waiting\n-\t * for reset to finish.\n-\t * If ret > 0 it means reset has finished.\n-\t */\n-\tif (ret > 0)\n-\t\treturn 0;\n-\telse if (ret < 0)\n-\t\treturn -EINTR;\n-\telse\n-\t\treturn -EBUSY;\n-}\n-\n /**\n * iavf_allocate_dma_mem_d - OS specific memory alloc for shared code\n * @hw: pointer to the HW structure\n@@ -3100,18 +3075,16 @@ static void iavf_reconfig_qs_bw(struct iavf_adapter *adapter)\n }\n \n /**\n- * iavf_reset_task - Call-back task to handle hardware reset\n- * @work: pointer to work_struct\n+ * iavf_reset_step - Perform the VF reset sequence\n+ * @adapter: board private structure\n *\n- * During reset we need to shut down and reinitialize the admin queue\n- * before we can use it to communicate with the PF again. We also clear\n- * and reinit the rings because that context is lost as well.\n- **/\n-static void iavf_reset_task(struct work_struct *work)\n+ * Requests a reset from PF, polls for completion, and reconfigures\n+ * the driver. Caller must hold the netdev instance lock.\n+ *\n+ * This can sleep for several seconds while polling HW registers.\n+ */\n+void iavf_reset_step(struct iavf_adapter *adapter)\n {\n-\tstruct iavf_adapter *adapter = container_of(work,\n-\t\t\t\t\t\t struct iavf_adapter,\n-\t\t\t\t\t\t reset_task);\n \tstruct virtchnl_vf_resource *vfres = adapter->vf_res;\n \tstruct net_device *netdev = adapter->netdev;\n \tstruct iavf_hw *hw = &adapter->hw;\n@@ -3122,7 +3095,7 @@ static void iavf_reset_task(struct work_struct *work)\n \tint i = 0, err;\n \tbool running;\n \n-\tnetdev_lock(netdev);\n+\tnetdev_assert_locked(netdev);\n \n \tiavf_misc_irq_disable(adapter);\n \tif (adapter->flags & IAVF_FLAG_RESET_NEEDED) {\n@@ -3167,7 +3140,6 @@ static void iavf_reset_task(struct work_struct *work)\n \t\tdev_err(&adapter->pdev->dev, \"Reset never finished (%x)\\n\",\n \t\t\treg_val);\n \t\tiavf_disable_vf(adapter);\n-\t\tnetdev_unlock(netdev);\n \t\treturn; /* Do not attempt to reinit. It's dead, Jim. */\n \t}\n \n@@ -3179,7 +3151,6 @@ static void iavf_reset_task(struct work_struct *work)\n \t\tiavf_startup(adapter);\n \t\tqueue_delayed_work(adapter->wq, &adapter->watchdog_task,\n \t\t\t\t msecs_to_jiffies(30));\n-\t\tnetdev_unlock(netdev);\n \t\treturn;\n \t}\n \n@@ -3320,9 +3291,6 @@ static void iavf_reset_task(struct work_struct *work)\n \n \tadapter->flags &= ~IAVF_FLAG_REINIT_ITR_NEEDED;\n \n-\twake_up(&adapter->reset_waitqueue);\n-\tnetdev_unlock(netdev);\n-\n \treturn;\n reset_err:\n \tif (running) {\n@@ -3331,10 +3299,21 @@ static void iavf_reset_task(struct work_struct *work)\n \t}\n \tiavf_disable_vf(adapter);\n \n-\tnetdev_unlock(netdev);\n \tdev_err(&adapter->pdev->dev, \"failed to allocate resources during reinit\\n\");\n }\n \n+static void iavf_reset_task(struct work_struct *work)\n+{\n+\tstruct iavf_adapter *adapter = container_of(work,\n+\t\t\t\t\t\t struct iavf_adapter,\n+\t\t\t\t\t\t reset_task);\n+\tstruct net_device *netdev = adapter->netdev;\n+\n+\tnetdev_lock(netdev);\n+\tiavf_reset_step(adapter);\n+\tnetdev_unlock(netdev);\n+}\n+\n /**\n * iavf_adminq_task - worker thread to clean the admin queue\n * @work: pointer to work_struct containing our data\n@@ -4600,22 +4579,17 @@ static int iavf_close(struct net_device *netdev)\n static int iavf_change_mtu(struct net_device *netdev, int new_mtu)\n {\n \tstruct iavf_adapter *adapter = netdev_priv(netdev);\n-\tint ret = 0;\n \n \tnetdev_dbg(netdev, \"changing MTU from %d to %d\\n\",\n \t\t netdev->mtu, new_mtu);\n \tWRITE_ONCE(netdev->mtu, new_mtu);\n \n \tif (netif_running(netdev)) {\n-\t\tiavf_schedule_reset(adapter, IAVF_FLAG_RESET_NEEDED);\n-\t\tret = iavf_wait_for_reset(adapter);\n-\t\tif (ret < 0)\n-\t\t\tnetdev_warn(netdev, \"MTU change interrupted waiting for reset\");\n-\t\telse if (ret)\n-\t\t\tnetdev_warn(netdev, \"MTU change timed out waiting for reset\");\n+\t\tadapter->flags |= IAVF_FLAG_RESET_NEEDED;\n+\t\tiavf_reset_step(adapter);\n \t}\n \n-\treturn ret;\n+\treturn 0;\n }\n \n /**\n@@ -5420,9 +5394,6 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \t/* Setup the wait queue for indicating transition to down status */\n \tinit_waitqueue_head(&adapter->down_waitqueue);\n \n-\t/* Setup the wait queue for indicating transition to running state */\n-\tinit_waitqueue_head(&adapter->reset_waitqueue);\n-\n \t/* Setup the wait queue for indicating virtchannel events */\n \tinit_waitqueue_head(&adapter->vc_waitqueue);\n \ndiff --git a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c\nindex 88156082a41da6..a52c100dcbc56d 100644\n--- a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c\n+++ b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c\n@@ -2736,7 +2736,6 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,\n \tcase VIRTCHNL_OP_ENABLE_QUEUES:\n \t\t/* enable transmits */\n \t\tiavf_irq_enable(adapter, true);\n-\t\twake_up(&adapter->reset_waitqueue);\n \t\tadapter->flags &= ~IAVF_FLAG_QUEUES_DISABLED;\n \t\tbreak;\n \tcase VIRTCHNL_OP_DISABLE_QUEUES:\n", "prefixes": [ "net", "v3" ] }