stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "[PATCH 025/135] fm10k: Cleanup exception handling for mailbox" has been added to the 4.4-stable tree
@ 2016-09-09 13:37 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-09-09 13:37 UTC (permalink / raw)
  To: aduyck, Krishneil.k.singh, alexander.levin, bruce.w.allan, gregkh,
	jeffrey.t.kirsher
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    [PATCH 025/135] fm10k: Cleanup exception handling for mailbox

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     0025-fm10k-Cleanup-exception-handling-for-mailbox-interru.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From c24ba4c3209f024567e1835cac517c92d7e528eb Mon Sep 17 00:00:00 2001
From: Alexander Duyck <aduyck@mirantis.com>
Date: Tue, 27 Oct 2015 16:59:18 -0700
Subject: [PATCH 025/135] fm10k: Cleanup exception handling for mailbox
 interrupt

[ Upstream commit e00e23bceba48a8f0c94fefe26948404cbd43d0a ]

This patch addresses two issues.

First is the fact that the fm10k_mbx_free_irq was assuming msix_entries was
valid and that will not always be the case.  As such we need to add a check
for if it is NULL.

Second is the fact that we weren't freeing the IRQ if the mailbox API
returned an error on trying to connect.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Reviewed-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/intel/fm10k/fm10k_pci.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -1122,6 +1122,10 @@ void fm10k_mbx_free_irq(struct fm10k_int
 	struct fm10k_hw *hw = &interface->hw;
 	int itr_reg;
 
+	/* no mailbox IRQ to free if MSI-X is not enabled */
+	if (!interface->msix_entries)
+		return;
+
 	/* disconnect the mailbox */
 	hw->mbx.ops.disconnect(hw, &hw->mbx);
 
@@ -1444,10 +1448,15 @@ int fm10k_mbx_request_irq(struct fm10k_i
 		err = fm10k_mbx_request_irq_pf(interface);
 	else
 		err = fm10k_mbx_request_irq_vf(interface);
+	if (err)
+		return err;
 
 	/* connect mailbox */
-	if (!err)
-		err = hw->mbx.ops.connect(hw, &hw->mbx);
+	err = hw->mbx.ops.connect(hw, &hw->mbx);
+
+	/* if the mailbox failed to connect, then free IRQ */
+	if (err)
+		fm10k_mbx_free_irq(interface);
 
 	return err;
 }


Patches currently in stable-queue which might be from aduyck@mirantis.com are

queue-4.4/0014-ixgbe-Fix-handling-of-NAPI-budget-when-multiple-queu.patch
queue-4.4/0025-fm10k-Cleanup-exception-handling-for-mailbox-interru.patch
queue-4.4/0020-fm10k-Fix-handling-of-NAPI-budget-when-multiple-queu.patch
queue-4.4/0024-fm10k-Cleanup-MSI-X-interrupts-in-case-of-failure.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-09 13:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-09 13:37 Patch "[PATCH 025/135] fm10k: Cleanup exception handling for mailbox" has been added to the 4.4-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).