]> www.infradead.org Git - users/jedix/linux-maple.git/commit
megaraid_sas: Do not allow PCI access during OCR
authorSumit Saxena <sumit.saxena@avagotech.com>
Thu, 28 Jan 2016 15:34:22 +0000 (21:04 +0530)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 16 Mar 2016 13:36:38 +0000 (06:36 -0700)
commit8c59899d5e3440bde25156e3f087a22f8cba1fec
treedf096240328eadb9d3c7e0e74a1a743069a70c95
parent624531424751003ce12e0d72eb933ff9a3507014
megaraid_sas: Do not allow PCI access during OCR

Orabug: 22620626

This patch will do synhronization between OCR function and AEN function
using "reset_mutex" lock.  reset_mutex will be acquired only in the
first half of the AEN function which issues a DCMD. Second half of the
function which calls SCSI API (scsi_add_device/scsi_remove_device)
should be out of reset_mutex to avoid deadlock between scsi_eh thread
and driver.

During chip reset (inside OCR function), there should not be any PCI
access and AEN function (which is called in delayed context) may be
firing DCMDs (doing PCI writes) when chip reset is happening in parallel
which will cause FW fault. This patch will solve the problem by making
AEN thread and OCR thread mutually exclusive.

Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 11c71cb4ab7cd901b9d6f0ff267c102778c1c8ef)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid/megaraid_sas.h
drivers/scsi/megaraid/megaraid_sas_base.c