From 6270e5932a01d6536dbce27782e8adf2180598d8 Mon Sep 17 00:00:00 2001 From: Brian King Date: Tue, 21 Jan 2014 12:16:41 -0600 Subject: [SCSI] ipr: Handle early EEH If, when the ipr driver loads, the adapter is in an EEH error state, it will currently oops and not be able to recover, as it attempts to access memory that has not yet been allocated. We've seen this occur in some kexec scenarios. The following patch fixes the oops and also allows the driver to recover from these probe time EEH errors. [jejb: checkpatch fix] Signed-off-by: Wen Xiong Signed-off-by: Brian King Signed-off-by: James Bottomley --- drivers/scsi/ipr.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/scsi/ipr.h') diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h index c756ff0abc96..649d8f697147 100644 --- a/drivers/scsi/ipr.h +++ b/drivers/scsi/ipr.h @@ -231,6 +231,7 @@ #define IPR_WAIT_FOR_RESET_TIMEOUT (2 * HZ) #define IPR_CHECK_FOR_RESET_TIMEOUT (HZ / 10) #define IPR_WAIT_FOR_BIST_TIMEOUT (2 * HZ) +#define IPR_PCI_ERROR_RECOVERY_TIMEOUT (120 * HZ) #define IPR_PCI_RESET_TIMEOUT (HZ / 2) #define IPR_SIS32_DUMP_TIMEOUT (15 * HZ) #define IPR_SIS64_DUMP_TIMEOUT (40 * HZ) @@ -1443,6 +1444,7 @@ struct ipr_ioa_cfg { u8 dump_timeout:1; u8 cfg_locked:1; u8 clear_isr:1; + u8 probe_done:1; u8 revid; @@ -1521,6 +1523,7 @@ struct ipr_ioa_cfg { wait_queue_head_t reset_wait_q; wait_queue_head_t msi_wait_q; + wait_queue_head_t eeh_wait_q; struct ipr_dump *dump; enum ipr_sdt_state sdt_state; -- cgit v1.2.3