From patchwork Wed Sep 25 16:29:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Damato X-Patchwork-Id: 1989469 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=ZUVOGbRA; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XDMfx3FwTz1xst for ; Thu, 26 Sep 2024 02:31:05 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 2609E846BE; Wed, 25 Sep 2024 16:31:02 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Vm4LYYnaSiw1; Wed, 25 Sep 2024 16:31:01 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 60F3084A2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1727281861; bh=SPn7NyA8EvFtDI+rj2RU3nMqRoNcoHgRdtft+sybg/g=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=ZUVOGbRAJBCqGlF2zjueHMNk90aCWJDmfShEB/FijJs7g84OD6cQcfoNlV/20oSJE kfq8Ka8NjkdcWN4JjvvaFTRdiPu+ovMvClDXM0ooeiEMYJ/pNg6WXfXXIB1qduziOY D3gwyggr33mEvGHa1RB9VHq1cXSCM2VuAcWMDJRVoyxdizN4fW71Y8k7HwJ/vBSRVy PWcSuvs+SVRN38ypyv8wV+H7a/17LjBY7w7Yor2TDaFO4JCJZpvW3u/QEdNaJC9PeB CvDqJw5Qp2XQ8QFapwpBrJ4VQaevm/sHdBqExZFJ4BEYpDspMabo9QoK8/wlbB+0my sWOuNeIKUBFVg== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 60F3084A2D; Wed, 25 Sep 2024 16:31:01 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 5ADC51BF35D for ; Wed, 25 Sep 2024 16:30:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 4A7CF84A2D for ; Wed, 25 Sep 2024 16:30:59 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id OiyOxtT3Uz8C for ; Wed, 25 Sep 2024 16:30:58 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::62e; helo=mail-pl1-x62e.google.com; envelope-from=jdamato@fastly.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 8A60B846BE DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8A60B846BE Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by smtp1.osuosl.org (Postfix) with ESMTPS id 8A60B846BE for ; Wed, 25 Sep 2024 16:30:58 +0000 (UTC) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-20570b42f24so77734255ad.1 for ; Wed, 25 Sep 2024 09:30:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727281858; x=1727886658; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SPn7NyA8EvFtDI+rj2RU3nMqRoNcoHgRdtft+sybg/g=; b=bkmQpHJjjqAt1qExj8RO3OgLJpBhNISqQr+J6ozyqJG0+xxWTMCCaWy4ttkqTgeYLt s8S3Jk84H/Ea4n59JOlhI9UkJULbvhbL/DYm2ltdGBjU/wW4jum4u9SKMrwzuRzWW98g B8y7608Rz7C6fiBXlV8keNSdAp+pUxWQoctb74DU7Q/mpvRP3+bmws6+LFYHOg7hs4he VJG5wg1w2TXL+AUADTajdMCbyL2U5gYp4p58hKgul5G0AOARPtJbPkPbt5WAx7wX7JO3 UwZTC60X6LKem5kgVolKwG34ooj5CgvQO4fXAhUAp84FzPZAhUixEupZkNuTt8SuCaW1 2BBQ== X-Forwarded-Encrypted: i=1; AJvYcCXHVVGinNG7+f4MekNyyQdaUGs3MTGktYi75+VoyKWTuHXn28kWXpsksRPNQXK7f+dlmJ5V6mnMVHoGQTzk4rI=@lists.osuosl.org X-Gm-Message-State: AOJu0YyTVNjeplIGBP61QjJq0ml1WpirAHpuD1jZ1VCctDkRtP5zDMwi wJvs1FNIXIZY+umOJydiGkNKaZkTD7sXg8AJvuqVo5xdnb1JqogdggNFCV7toAM= X-Google-Smtp-Source: AGHT+IEM3gPUtOxfd/W3Jnyzn6mZZ8mH6XO7SpWmV1e4jRBezuatggwjJ5DEzXqm0y0ZQlMXfIHvmg== X-Received: by 2002:a17:902:ecc8:b0:206:ac11:f3bb with SMTP id d9443c01a7336-20afc5ee705mr34902965ad.47.1727281857892; Wed, 25 Sep 2024 09:30:57 -0700 (PDT) Received: from localhost.localdomain (c-24-6-151-244.hsd1.ca.comcast.net. [24.6.151.244]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20af16e0702sm26345585ad.28.2024.09.25.09.30.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2024 09:30:57 -0700 (PDT) From: Joe Damato To: netdev@vger.kernel.org Date: Wed, 25 Sep 2024 16:29:36 +0000 Message-Id: <20240925162937.2218-2-jdamato@fastly.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240925162937.2218-1-jdamato@fastly.com> References: <20240925162937.2218-1-jdamato@fastly.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastly.com; s=google; t=1727281858; x=1727886658; darn=lists.osuosl.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SPn7NyA8EvFtDI+rj2RU3nMqRoNcoHgRdtft+sybg/g=; b=Gxo3FMvVaHBk9I1kP12aRu/QppSpO07jehusd4IPuSIukREJZgNnlyuQxUuYlIZNkX EPzQ3XatS0YPA/csLmth303r74Q6k8QTS060jLR2uSEzvf0V5sF1w0NRdibXkt+outk5 bdXgLn1vNRgZ1Y1ooSN+2jpdBFDdO1eXlzpJE= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=reject dis=none) header.from=fastly.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=fastly.com header.i=@fastly.com header.a=rsa-sha256 header.s=google header.b=Gxo3FMvV Subject: [Intel-wired-lan] [RFC v2 net-next 1/2] e1000e: link NAPI instances to queues and IRQs X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Przemek Kitszel , Joe Damato , open list , Eric Dumazet , Tony Nguyen , "moderated list:INTEL ETHERNET DRIVERS" , Jakub Kicinski , Paolo Abeni , "David S. Miller" Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Make e1000e compatible with the newly added netdev-genl APIs. $ cat /proc/interrupts | grep ens | cut -f1 --delimiter=':' 50 51 52 While e1000e allocates 3 IRQs (RX, TX, and other), it looks like e1000e only has a single NAPI, so I've associated the NAPI with the RX IRQ (50 on my system, seen above): $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --dump napi-get --json='{"ifindex": 2}' [{'id': 145, 'ifindex': 2, 'irq': 50}] $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --dump queue-get --json='{"ifindex": 2}' [{'id': 0, 'ifindex': 2, 'napi-id': 145, 'type': 'rx'}, {'id': 0, 'ifindex': 2, 'napi-id': 145, 'type': 'tx'}] Signed-off-by: Joe Damato --- drivers/net/ethernet/intel/e1000e/netdev.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index f103249b12fa..b527642c3a82 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -4613,6 +4613,7 @@ int e1000e_open(struct net_device *netdev) struct e1000_hw *hw = &adapter->hw; struct pci_dev *pdev = adapter->pdev; int err; + int irq; /* disallow open during test */ if (test_bit(__E1000_TESTING, &adapter->state)) @@ -4676,7 +4677,15 @@ int e1000e_open(struct net_device *netdev) /* From here on the code is the same as e1000e_up() */ clear_bit(__E1000_DOWN, &adapter->state); + if (adapter->int_mode == E1000E_INT_MODE_MSIX) + irq = adapter->msix_entries[0].vector; + else + irq = adapter->pdev->irq; + + netif_napi_set_irq(&adapter->napi, irq); napi_enable(&adapter->napi); + netif_queue_set_napi(netdev, 0, NETDEV_QUEUE_TYPE_RX, &adapter->napi); + netif_queue_set_napi(netdev, 0, NETDEV_QUEUE_TYPE_TX, &adapter->napi); e1000_irq_enable(adapter); @@ -4735,6 +4744,8 @@ int e1000e_close(struct net_device *netdev) netdev_info(netdev, "NIC Link is Down\n"); } + netif_queue_set_napi(netdev, 0, NETDEV_QUEUE_TYPE_RX, NULL); + netif_queue_set_napi(netdev, 0, NETDEV_QUEUE_TYPE_TX, NULL); napi_disable(&adapter->napi); e1000e_free_tx_resources(adapter->tx_ring); From patchwork Wed Sep 25 16:29:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Damato X-Patchwork-Id: 1989470 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=pKfk2nBb; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XDMfz6qZnz1xst for ; Thu, 26 Sep 2024 02:31:07 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 2948484A34; Wed, 25 Sep 2024 16:31:06 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ekrO44tm5wUe; Wed, 25 Sep 2024 16:31:04 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 4E88E84A49 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1727281863; bh=zqS3WLQRtJuGZ7n5fqIngVYCyukIdr8Yi9XEikosZZs=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=pKfk2nBbGP48IDOkuBjBnD8BGAWUtD06N8T2cgw09UR++CBod4bIXqzr36fRpWKLm LYjs4MAy5ICG2aF9IZYMHYTKu/1GxI5ydHlPiJvyPyvjidWmru8ADN4azKcGzgnOIj duMfHCeua8/cBoEubC+sb+fSf+98rQajz9ke9M1uOWnypwn6R3QdUzR+8ekJv1ise6 gtflFXtOxfwRuuuedJRgAKh4TXP10N9szkI4EO6ia/2DFdmc3kxNOiiOtqnOotm8X7 yAqwIiZrW0AGJUlcZd7A5O3ncEpAA/fQon+WgUnMgm22XDkfma2GiqZXOZ4hokmqeo nElFYbsog+oIw== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 4E88E84A49; Wed, 25 Sep 2024 16:31:03 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 3BAFE1BF35D for ; Wed, 25 Sep 2024 16:31:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 256B3846BE for ; Wed, 25 Sep 2024 16:31:01 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 2tGWYm8ZlZGT for ; Wed, 25 Sep 2024 16:31:00 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::52e; helo=mail-pg1-x52e.google.com; envelope-from=jdamato@fastly.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 717DC84A34 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 717DC84A34 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by smtp1.osuosl.org (Postfix) with ESMTPS id 717DC84A34 for ; Wed, 25 Sep 2024 16:31:00 +0000 (UTC) Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-7d916b6a73aso6830a12.1 for ; Wed, 25 Sep 2024 09:31:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727281860; x=1727886660; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zqS3WLQRtJuGZ7n5fqIngVYCyukIdr8Yi9XEikosZZs=; b=DjdqnfN+/9mQNBmJ+bSmOPJSgs6YNG/C+4qfv7KwxnL+OJS8Rzj6/MsuIbFa//1CYz ypSrOmW5en2kQn8CReCCey2ROdY8YgLUZZVUW7MEbpjXUe84Aeb96KMuho1RhTTxeMRW xPz+y8kTT+aGYej7sHEea+hvOmCmvzhZ2Fe8rd6qVD+g/Ry9SlXOj/bVRE4TtoZ12NUV +yKof4FnyP0TZc4PcAHcPLfT89u2OK90y0OrwIyvEr3o8NmLqE8L4/owP/fpPDxzFy1g AxgJz1wYiQ00IlBnKuPFN1t+A0h+EAKk2jcvBnV33G9w+D9AGU+HZaujExbK/Tf8kUt+ Pt/A== X-Forwarded-Encrypted: i=1; AJvYcCWzlFLX9/uubdvZ3itanPZhLj9ubnVlaw3J2Xz8Y1IHwgTbYLXdIcV8z5pRFg2PImK0wPxLD2vDwlU7owvcYiw=@lists.osuosl.org X-Gm-Message-State: AOJu0YxGtZ69806VcOlb3qGdgJ1+0AKmywKB8JyPYdrYaW5ENNntwmft LZKQ2kBhtrX6QzuCMRCzdOKh13uxkaAiYNdnTHqSLT8An/yWndnSFsBt/tEYI5g= X-Google-Smtp-Source: AGHT+IHkq6o5Ld2ygnxmPUAmwe4I6gQIsnCBKwiUvvIUWibnJ6eGpMuDVKGGABQBnTR8IJWaW9URVQ== X-Received: by 2002:a05:6a20:d526:b0:1c4:dfa7:d3b9 with SMTP id adf61e73a8af0-1d4d4b08946mr4079299637.28.1727281859597; Wed, 25 Sep 2024 09:30:59 -0700 (PDT) Received: from localhost.localdomain (c-24-6-151-244.hsd1.ca.comcast.net. [24.6.151.244]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20af16e0702sm26345585ad.28.2024.09.25.09.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2024 09:30:59 -0700 (PDT) From: Joe Damato To: netdev@vger.kernel.org Date: Wed, 25 Sep 2024 16:29:37 +0000 Message-Id: <20240925162937.2218-3-jdamato@fastly.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240925162937.2218-1-jdamato@fastly.com> References: <20240925162937.2218-1-jdamato@fastly.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastly.com; s=google; t=1727281860; x=1727886660; darn=lists.osuosl.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zqS3WLQRtJuGZ7n5fqIngVYCyukIdr8Yi9XEikosZZs=; b=eLQsB6mR+tAtMXL4wA2zaaWLoSe83KKcphfoJsOaGT1Uvb+XYh/rAdn4q13H0HYwwm U6SgykYuYtbRo9XBzpRUNbinOop8N2ThIV75+wHB0idacSRL7sf3wOMUWJvGJO38dXLq VUKcOhYWJAok1Y1qQY0mlRyZ3XpDjJlq+LSf0= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=reject dis=none) header.from=fastly.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=fastly.com header.i=@fastly.com header.a=rsa-sha256 header.s=google header.b=eLQsB6mR Subject: [Intel-wired-lan] [RFC v2 net-next 2/2] e1000: Link IRQs and queues to NAPIs X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Przemek Kitszel , Joe Damato , open list , Eric Dumazet , Tony Nguyen , "moderated list:INTEL ETHERNET DRIVERS" , Jakub Kicinski , Paolo Abeni , "David S. Miller" Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Add support for netdev-genl, allowing users to query IRQ, NAPI, and queue information. After this patch is applied, note the IRQ assigned to my NIC: $ cat /proc/interrupts | grep enp0s8 | cut -f1 --delimiter=':' 18 Note the output from the cli: $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --dump napi-get --json='{"ifindex": 2}' [{'id': 513, 'ifindex': 2, 'irq': 18}] This device supports only 1 rx and 1 tx queue, so querying that: $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --dump queue-get --json='{"ifindex": 2}' [{'id': 0, 'ifindex': 2, 'napi-id': 513, 'type': 'rx'}, {'id': 0, 'ifindex': 2, 'napi-id': 513, 'type': 'tx'}] Signed-off-by: Joe Damato --- drivers/net/ethernet/intel/e1000/e1000_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index ab7ae418d294..4de9b156b2be 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c @@ -513,6 +513,8 @@ void e1000_down(struct e1000_adapter *adapter) */ netif_carrier_off(netdev); + netif_queue_set_napi(netdev, 0, NETDEV_QUEUE_TYPE_RX, NULL); + netif_queue_set_napi(netdev, 0, NETDEV_QUEUE_TYPE_TX, NULL); napi_disable(&adapter->napi); e1000_irq_disable(adapter); @@ -1392,7 +1394,10 @@ int e1000_open(struct net_device *netdev) /* From here on the code is the same as e1000_up() */ clear_bit(__E1000_DOWN, &adapter->flags); + netif_napi_set_irq(&adapter->napi, adapter->pdev->irq); napi_enable(&adapter->napi); + netif_queue_set_napi(netdev, 0, NETDEV_QUEUE_TYPE_RX, &adapter->napi); + netif_queue_set_napi(netdev, 0, NETDEV_QUEUE_TYPE_TX, &adapter->napi); e1000_irq_enable(adapter);