All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@pmcs.com>
To: James.Bottomley@HansenPartnership.com,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org
Cc: Mahesh.Rajashekhara@pmcs.com, Murthy.Bhat@pmcs.com,
	Gana.Sridaran@pmcs.com, aacraid@pmc-sierra.com,
	Scott.Benesh@pmcs.com, jthumshirn@suse.de, thenzl@redhat.com,
	shane.seymour@hpe.com, David.Carroll@pmcs.com,
	RaghavaAditya.Renukunta@pmcs.com
Subject: [PATCH V3 5/9] aacraid: Set correct msix count for EEH recovery
Date: Thu, 14 Jan 2016 23:16:18 -0800	[thread overview]
Message-ID: <1452842182-684-6-git-send-email-RaghavaAditya.Renukunta@pmcs.com> (raw)
In-Reply-To: <1452842182-684-1-git-send-email-RaghavaAditya.Renukunta@pmcs.com>

From: Raghava Aditya Renukunta <raghavaaditya.renukunta@pmcs.com>

During EEH recovery number of online CPU's might change thereby changing
the number of MSIx vectors. Since each fib is allocated to a vector,
changes in the number of vectors causes fib to be sent thru invalid
vectors.In addition the correct number of MSIx vectors is not
updated in the INIT struct sent to the controller, when it is
reinitialized.

Fixed by reassigning vectors to fibs based on the updated number of MSIx
vectors and updating the INIT structure before sending to controller.

Changes in V2:
Replaced fib vector allocation code with aac_fib_vector_assign

Changes in V3:
None

Fixes: MSI-X vector calculation for suspend/resume
Cc: stable@vger.kernel.org

Signed-off-by: Raghava Aditya Renukunta <raghavaaditya.renukunta@pmcs.com>
Reviewed-by: Shane Seymour <shane.seymour@hpe.com>
---
 drivers/scsi/aacraid/linit.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 08c6835..6d79181 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -1410,8 +1410,18 @@ static int aac_acquire_resources(struct aac_dev *dev)
 
 	aac_adapter_enable_int(dev);
 
-	if (!dev->sync_mode)
+	/*max msix may change  after EEH
+	 * Re-assign vectors to fibs
+	 */
+	aac_fib_vector_assign(dev);
+
+	if (!dev->sync_mode) {
+		/* After EEH recovery or suspend resume, max_msix count
+		 * may change, therfore updating in init as well.
+		 */
 		aac_adapter_start(dev);
+		dev->init->Sa_MSIXVectors = cpu_to_le32(dev->max_msix);
+	}
 	return 0;
 
 error_iounmap:
-- 
1.9.1


  parent reply	other threads:[~2016-01-14 23:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15  7:16 [PATCH V3 0/9] aacraid: Patchset for aacraid driver version 41052 Raghava Aditya Renukunta
2016-01-15  7:16 ` [PATCH V3 1/9] aacraid: SCSI blk tag support Raghava Aditya Renukunta
2016-01-15  0:17   ` Seymour, Shane M
2016-01-18 11:13   ` Johannes Thumshirn
2016-01-19 15:33   ` Tomas Henzl
2016-01-15  7:16 ` [PATCH V3 2/9] aacraid: Fix RRQ overload Raghava Aditya Renukunta
2016-01-15  7:16 ` [PATCH V3 3/9] aacraid: Added EEH support Raghava Aditya Renukunta
2016-01-18 11:16   ` Johannes Thumshirn
2016-01-23 22:55   ` kbuild test robot
2016-01-15  7:16 ` [PATCH V3 4/9] aacraid: Fix memory leak in aac_fib_map_free Raghava Aditya Renukunta
2016-01-15  7:16 ` Raghava Aditya Renukunta [this message]
2016-01-18 11:18   ` [PATCH V3 5/9] aacraid: Set correct msix count for EEH recovery Johannes Thumshirn
2016-01-15  7:16 ` [PATCH V3 6/9] aacraid: Fundamental reset support for Series 7 Raghava Aditya Renukunta
2016-01-19 15:43   ` Tomas Henzl
2016-01-15  7:16 ` [PATCH V3 7/9] aacraid: Fix AIF triggered IOP_RESET Raghava Aditya Renukunta
2016-01-14 23:35   ` Seymour, Shane M
2016-01-18 11:56   ` Johannes Thumshirn
2016-01-19 16:14   ` Tomas Henzl
2016-01-20 20:32     ` Raghava Aditya Renukunta
2016-01-22 13:14       ` Tomas Henzl
2016-01-23  5:07         ` Raghava Aditya Renukunta
2016-01-27  2:31         ` Martin K. Petersen
2016-01-27 18:02           ` Raghava Aditya Renukunta
2016-01-15  7:16 ` [PATCH V3 8/9] aacraid: Fix character device re-initialization Raghava Aditya Renukunta
2016-01-18 11:58   ` Johannes Thumshirn
2016-01-20 13:41   ` Tomas Henzl
2016-01-20 20:43     ` Raghava Aditya Renukunta
2016-01-22 13:08       ` Tomas Henzl
2016-01-23  5:07         ` Raghava Aditya Renukunta
2016-01-15  7:16 ` [PATCH V3 9/9] aacraid: Update driver version Raghava Aditya Renukunta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452842182-684-6-git-send-email-RaghavaAditya.Renukunta@pmcs.com \
    --to=raghavaaditya.renukunta@pmcs.com \
    --cc=David.Carroll@pmcs.com \
    --cc=Gana.Sridaran@pmcs.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=Mahesh.Rajashekhara@pmcs.com \
    --cc=Murthy.Bhat@pmcs.com \
    --cc=Scott.Benesh@pmcs.com \
    --cc=aacraid@pmc-sierra.com \
    --cc=jthumshirn@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=shane.seymour@hpe.com \
    --cc=thenzl@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.