scsi: be2iscsi: Add TPE recovery feature
After UE is detected, check for recoverable error by reading SLIPORT SEMAPHORE register. If transient parity error i.e. 0xExxx then schedule recovery work on driver wq. FLag this error to prevent any transactions for the duration of ue2rp to restart polling. After that, if FW becomes ready then recover port. Wake up processes in wq before going offline. Wait for process to execute before cleaning up. Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
f79929deb5
commit
d1d5ca887c
@@ -393,7 +393,7 @@ struct beiscsi_hba {
|
||||
} fw_config;
|
||||
|
||||
unsigned long state;
|
||||
#define BEISCSI_HBA_RUNNING 0
|
||||
#define BEISCSI_HBA_ONLINE 0
|
||||
#define BEISCSI_HBA_LINK_UP 1
|
||||
#define BEISCSI_HBA_BOOT_FOUND 2
|
||||
#define BEISCSI_HBA_BOOT_WORK 3
|
||||
@@ -417,6 +417,7 @@ struct beiscsi_hba {
|
||||
/* check for UE every 1000ms */
|
||||
#define BEISCSI_UE_DETECT_INTERVAL 1000
|
||||
u32 ue2rp;
|
||||
struct delayed_work recover_port;
|
||||
|
||||
bool mac_addr_set;
|
||||
u8 mac_address[ETH_ALEN];
|
||||
@@ -455,6 +456,9 @@ struct beiscsi_hba {
|
||||
};
|
||||
|
||||
#define beiscsi_hba_in_error(phba) ((phba)->state & BEISCSI_HBA_IN_ERR)
|
||||
#define beiscsi_hba_is_online(phba) \
|
||||
(!beiscsi_hba_in_error((phba)) && \
|
||||
test_bit(BEISCSI_HBA_ONLINE, &phba->state))
|
||||
|
||||
struct beiscsi_session {
|
||||
struct pci_pool *bhs_pool;
|
||||
|
Reference in New Issue
Block a user