]> www.infradead.org Git - users/jedix/linux-maple.git/commit
aacraid: Fix RRQ overload
authorRaghava Aditya Renukunta <raghavaaditya.renukunta@pmcs.com>
Wed, 3 Feb 2016 23:06:00 +0000 (15:06 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:46:06 +0000 (15:46 -0700)
commit62e3186eb0693cb3b8ebbfb45ad4390e499b6c81
tree28e48a4c62d8303bacdfcebb50038fc46d9e5d1c
parenta63f353754eb927000abdbb61c2edcf529bc6da3
aacraid: Fix RRQ overload

Orabug: 23331060

[ Upstream commit 3f4ce057d51a9c0ed9b01ba693df685d230ffcae ]

The driver utilizes an array of atomic variables to keep track of IO
submissions to each vector. To submit an IO multiple threads iterate
through the array to find a vector which has empty slots to send an
IO. The reading and updating of the variable is not atomic, causing race
conditions when a thread uses a full vector to submit an IO.

Fixed by mapping each FIB to a vector, the submission path then uses
said vector to submit IO thereby removing the possibly of a race
condition.The vector assignment is started from 1 since vector 0 is
reserved for the use of AIF management FIBS.If the number of MSIx
vectors is 1 (MSI or INTx mode) then all the fibs are allocated to
vector 0.

Fixes: 495c0217 "aacraid: MSI-x support"
Cc: stable@vger.kernel.org # v4.1
Signed-off-by: Raghava Aditya Renukunta <raghavaaditya.renukunta@pmcs.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 34bb7098221c2a37f5d9ef3591971a25719ae21a)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/scsi/aacraid/aacraid.h
drivers/scsi/aacraid/commsup.c
drivers/scsi/aacraid/src.c