aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid/megaraid_sas.h
diff options
context:
space:
mode:
authorShivasharan S <shivasharan.srikanteshwara@broadcom.com>2019-05-07 10:05:34 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2019-06-18 19:46:19 -0400
commit78409d4b47b83d81d29450ef890e07d9ce629fdd (patch)
treec6073bd5b8c39aa7212e968e5f68aa932121ebb2 /drivers/scsi/megaraid/megaraid_sas.h
parentscsi: megaraid_sas: Rework code around controller reset (diff)
downloadlinux-dev-78409d4b47b83d81d29450ef890e07d9ce629fdd.tar.xz
linux-dev-78409d4b47b83d81d29450ef890e07d9ce629fdd.zip
scsi: megaraid_sas: Block PCI config space access from userspace during OCR
While an online controller reset(OCR) is in progress, there is short duration where all access to controller's PCI config space from the host needs to be blocked. This is due to a hardware limitation of MegaRAID controllers. With this patch, driver will block all access to controller's config space from userland applications by calling pci_cfg_access_lock() while OCR is in progress and unlocking after controller comes back to ready state. Added helper function which locks the config space before initiating OCR and wait for controller to become READY. Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas.h')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 902b11b97999..990ee23d7bc2 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -2636,4 +2636,7 @@ void megasas_fusion_stop_watchdog(struct megasas_instance *instance);
void megasas_set_dma_settings(struct megasas_instance *instance,
struct megasas_dcmd_frame *dcmd,
dma_addr_t dma_addr, u32 dma_len);
+int megasas_adp_reset_wait_for_ready(struct megasas_instance *instance,
+ bool do_adp_reset,
+ int ocr_context);
#endif /*LSI_MEGARAID_SAS_H */