All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@pmcs.com>
To: JBottomley@odin.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,
	David.Carroll@pmcs.com, RaghavaAditya.Renukunta@pmcs.com
Subject: [PATCH V2 5/9] aacraid: Set correct msix count for EEH recovery
Date: Wed, 6 Jan 2016 23:22:20 -0800	[thread overview]
Message-ID: <1452151344-417-6-git-send-email-RaghavaAditya.Renukunta@pmcs.com> (raw)
In-Reply-To: <1452151344-417-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

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

Signed-off-by: Raghava Aditya Renukunta <raghavaaditya.renukunta@pmcs.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-06 23:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-07  7:22 [PATCH V2 0/9] aacraid: Patchset for aacraid driver version 41052 Raghava Aditya Renukunta
2016-01-07  7:22 ` [PATCH V2 1/9] aacraid: SCSI blk tag support Raghava Aditya Renukunta
2016-01-07  7:22 ` [PATCH V2 2/9] aacraid: Fix RRQ overload Raghava Aditya Renukunta
2016-01-07  7:22 ` [PATCH V2 3/9] aacraid: Added EEH support Raghava Aditya Renukunta
2016-01-09 23:23   ` kbuild test robot
2016-01-07  7:22 ` [PATCH V2 4/9] aacraid: Fix memory leak in aac_fib_map_free Raghava Aditya Renukunta
2016-01-07  7:22 ` Raghava Aditya Renukunta [this message]
2016-01-08  5:00   ` [PATCH V2 5/9] aacraid: Set correct msix count for EEH recovery Seymour, Shane M
2016-01-07  7:22 ` [PATCH V2 6/9] aacraid: Fundamental reset support for Series 7 Raghava Aditya Renukunta
2016-01-07  7:22 ` [PATCH V2 7/9] aacraid: Fix AIF triggered IOP_RESET Raghava Aditya Renukunta
2016-01-08  5:57   ` Seymour, Shane M
2016-01-08 23:37     ` Raghava Aditya Renukunta
2016-01-07  7:22 ` [PATCH V2 8/9] aacraid: Fix character device re-initialization Raghava Aditya Renukunta
2016-01-08  6:42   ` Seymour, Shane M
2016-01-07  7:22 ` [PATCH V2 9/9] aacraid: Update driver version Raghava Aditya Renukunta
  -- strict thread matches above, loose matches on Subject: below --
2015-12-10 18:45 [PATCH V2 0/9] aacraid: Patchset for aacraid driver version 41052 Raghava Aditya Renukunta
2015-12-10 18:45 ` [PATCH v2 5/9] aacraid: Set correct msix count for EEH recovery 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=1452151344-417-6-git-send-email-RaghavaAditya.Renukunta@pmcs.com \
    --to=raghavaaditya.renukunta@pmcs.com \
    --cc=David.Carroll@pmcs.com \
    --cc=Gana.Sridaran@pmcs.com \
    --cc=JBottomley@odin.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=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.