From nobody Fri Dec 17 10:37:14 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6B5E218FF3C5; Fri, 17 Dec 2021 10:37:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JFlmD3cZ0z4WZH; Fri, 17 Dec 2021 10:37:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB0D41A5C4; Fri, 17 Dec 2021 10:37:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BHAbEqU092575; Fri, 17 Dec 2021 10:37:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BHAbEdW092574; Fri, 17 Dec 2021 10:37:14 GMT (envelope-from git) Date: Fri, 17 Dec 2021 10:37:14 GMT Message-Id: <202112171037.1BHAbEdW092574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ram Kishore Vegesna Subject: git: 161148e61f5d - stable/13 - ocs_fc: Fix device lost timer where device is not getting deleted. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ram X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 161148e61f5dd98aba6b17ca90f396902a00d2b5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639737437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a5JwAVCHkt6iKXKZh2BSFORO4UHjlZbyw+fTMry/scs=; b=AdbQcVyOmpIuBjHTeF+j2fglwD+SHHnTaB1g0bzt/mc6C+Bby0SwIpcBnEpCUejPb14+An e1DE+LbcbnZqik6zQiQFJ8XpkRH4Jk2cbIYarbecbrWS23ygfex9ddkKmWgDfqRm5aJdNP ruGBa8ANwhiw67fmfoxq6WEKVnLnIrwPXeTvSyV0Z57i2p+27Yqy6rKpNenWKN7dDjItGF RE6PMUkNqf9Xr4GrWaL0WMOZlDnR2yv2I+1CD727VvmcPqj42COAwa/gMVUp/kJt1KlHZ6 DQSuYfS7fZTtbCZlkf+nglf0P3VmXQBRi5sfxnWPBv7tdizX0X0BN7koSVNt+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639737437; a=rsa-sha256; cv=none; b=Mx9jQ5jyMEqfyJYgQFg1HNW9a0HKCuuzznxbU/6pc6gcqPR/RHE+dr7nZdEINUvlKSqGpj oepWf083ZtFmRdRfaoQ1CAeqBGQPQ6SRohVgzvTDhOltId/DsBxKSrxhgBEk1jxcHhWvIB 3/POvP01fYwcbVbU6IeOsVCYfzf8chZkAo3fLvhd0xpACegkWAXukZgxh/6J5QW7HCN3o8 YXCXpkUgaBhkcijXkZYHPHSdDl2jm7U/Ebfo2pqYIsz2up1UZE1YvaKx4N89xWC8izxYDK tu2HYediQ6ePkDZ1eoU47wy5h4rPJuFrlbtxMfnONT55+HU8SF6NngUmIqi3lg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by ram: URL: https://cgit.FreeBSD.org/src/commit/?id=161148e61f5dd98aba6b17ca90f396902a00d2b5 commit 161148e61f5dd98aba6b17ca90f396902a00d2b5 Author: Ram Kishore Vegesna AuthorDate: 2021-09-24 09:35:30 +0000 Commit: Ram Kishore Vegesna CommitDate: 2021-12-17 10:31:06 +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 (cherry picked from commit 41e946694333bcc6f64242f294312553f2ef2dcd) --- 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; }