The branch main has been updated by ram: URL: https://cgit.FreeBSD.org/src/commit/?id=41e946694333bcc6f64242f294312553f2ef2dcd
commit 41e946694333bcc6f64242f294312553f2ef2dcd Author: Ram Kishore Vegesna <r...@freebsd.org> AuthorDate: 2021-09-24 09:35:30 +0000 Commit: Ram Kishore Vegesna <r...@freebsd.org> CommitDate: 2021-09-30 07:31:17 +0000 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: k...@kdm.org Reviewed by: mav, ken --- sys/dev/ocs_fc/ocs.h | 4 ---- sys/dev/ocs_fc/ocs_cam.c | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/sys/dev/ocs_fc/ocs.h b/sys/dev/ocs_fc/ocs.h index cd212b628bd1..4d7671aa8fb6 100644 --- a/sys/dev/ocs_fc/ocs.h +++ b/sys/dev/ocs_fc/ocs.h @@ -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 */ diff --git a/sys/dev/ocs_fc/ocs_cam.c b/sys/dev/ocs_fc/ocs_cam.c index 6a9ef6160cee..b734880cefb8 100644 --- a/sys/dev/ocs_fc/ocs_cam.c +++ b/sys/dev/ocs_fc/ocs_cam.c @@ -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; } _______________________________________________ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"