Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Sep 2021 07:48:18 GMT
From:      Ram Kishore Vegesna <ram@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 41e946694333 - main - ocs_fc: Fix device lost timer where device is not getting deleted.
Message-ID:  <202109300748.18U7mI1C046535@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by ram:

URL: https://cgit.FreeBSD.org/src/commit/?id=41e946694333bcc6f64242f294312553f2ef2dcd

commit 41e946694333bcc6f64242f294312553f2ef2dcd
Author:     Ram Kishore Vegesna <ram@FreeBSD.org>
AuthorDate: 2021-09-24 09:35:30 +0000
Commit:     Ram Kishore Vegesna <ram@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: ken@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;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109300748.18U7mI1C046535>