ocs_fc: Fix device lost timer where device is not getting deleted.
Issue: Devices wont go away after the link down. Device lost timer functionality in ocs_fc is broken, `is_target` flag is not set in the target database and target delete is skipped. Fix: Remove unused flags and delete the device when timer expires. Reported by: ken@kdm.org Reviewed by: mav, ken
This commit is contained in:
parent
d063d1bc92
commit
41e9466943
@ -64,14 +64,10 @@ typedef struct ocs_intr_ctx_s {
|
||||
typedef struct ocs_fc_rport_db_s {
|
||||
uint32_t node_id;
|
||||
uint32_t state;
|
||||
uint8_t is_target;
|
||||
uint8_t is_initiator;
|
||||
|
||||
uint32_t port_id;
|
||||
uint64_t wwnn;
|
||||
uint64_t wwpn;
|
||||
uint32_t gone_timer;
|
||||
|
||||
} ocs_fc_target_t;
|
||||
|
||||
#define OCS_TGT_STATE_NONE 0 /* Empty DB slot */
|
||||
|
@ -1118,10 +1118,7 @@ ocs_ldt_task(void *arg, int pending)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tgt->is_target) {
|
||||
tgt->is_target = 0;
|
||||
ocs_delete_target(ocs, fcp, i);
|
||||
}
|
||||
ocs_delete_target(ocs, fcp, i);
|
||||
|
||||
tgt->state = OCS_TGT_STATE_NONE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user