From nobody Fri Dec 17 10:03:54 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 69BB418F78DE; Fri, 17 Dec 2021 10:03:57 +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 4JFl1l3r0sz3t4T; Fri, 17 Dec 2021 10:03:55 +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 62C2019D50; Fri, 17 Dec 2021 10:03:54 +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 1BHA3sHq052067; Fri, 17 Dec 2021 10:03:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BHA3snP052066; Fri, 17 Dec 2021 10:03:54 GMT (envelope-from git) Date: Fri, 17 Dec 2021 10:03:54 GMT Message-Id: <202112171003.1BHA3snP052066@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: ddf502de60be - stable/12 - 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/12 X-Git-Reftype: branch X-Git-Commit: ddf502de60be13ae55b54555234d00c3b3712aa8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639735436; 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=c+tvO7LZmNKcd7RGOmrEPPiR/rA8F0pcshOWHJYalRc=; b=IChoYbkIxg88E5+eS5Pf1YAPSTn5KN7fvd1fuB017UEQfGU6Jo0TjrlifleU7zV4Y5KLxB lJF4jmztomxpcpjoGVfGPMmaUx/i74OtqP6E/nClELbKjLLMTmS2n7K8Il6tKQ2OUBvc9q n+PN+k9CwW6XCmAhbiXa8ZJLVRZts5uzNZt0K1B1K9hejYod+FKMYhafqS5wmgBylUUucM i4Ufm1hXeQME0mS4MsXBmSF+x6BR0mv4Olk5ZFpb2Gox+c6EJdcyQ+oBBDjorvgJF4oQln yKS1wvLTzOxsXwd5IrpfY3Bxu0SRNQIfpbPbTmoa9W/lKX4z7iBo3DPXCwClrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639735436; a=rsa-sha256; cv=none; b=f0/8mJSnsetQsShx8f5dfIsauGYp5PAKtr8MuC+ktZk2mx3PF3Jt3U4OWteOslgQHs/8Uz YfGg07UeQQZv//pPQI2G+pzGDhDlvrTsb/bbgfC8xjMCd7dzE9XMRYhcjii6Gur+lK9bl6 Ah5rN+6xUTSpLzuglvzy+DSNUao5udHir9eMoG0DzSfoS8v5X+LnRQeJzG9yho5w8H9S82 0UaRbys8JDnb9/n/LwUAw8BBaRTswUnKSGT9FqL8XOSvEP4hQTxPp5LXo7k59YwZbclDpO 904D0vF6bRjQc8pLjdtnz8Ygv26uzCHMeY04/G+gFzDCou0UmZlY08vJdmoW1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by ram: URL: https://cgit.FreeBSD.org/src/commit/?id=ddf502de60be13ae55b54555234d00c3b3712aa8 commit ddf502de60be13ae55b54555234d00c3b3712aa8 Author: Ram Kishore Vegesna AuthorDate: 2021-09-24 09:35:30 +0000 Commit: Ram Kishore Vegesna CommitDate: 2021-12-17 09:57:50 +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 36d3bf35e27c..3a5fdd71f6b6 100644 --- a/sys/dev/ocs_fc/ocs.h +++ b/sys/dev/ocs_fc/ocs.h @@ -65,14 +65,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 c773eab105f0..1b5c73f163ef 100644 --- a/sys/dev/ocs_fc/ocs_cam.c +++ b/sys/dev/ocs_fc/ocs_cam.c @@ -1123,10 +1123,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; }