From nobody Wed Nov 29 01:55:34 2023 X-Original-To: dev-commits-src-main@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 4Sg2Tg1jVrz52tKF; Wed, 29 Nov 2023 01:55:35 +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 4Sg2Tg0xrhz4D3s; Wed, 29 Nov 2023 01:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701222935; 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=ZJxKWwb0N4rMIjBAPXl2hWHqJJSu+OpzpEh8btcgsx4=; b=GVBgGygY2vSyzPvTbaqmo754/iaqXGgcYOcjm9PospATCNMHingDaDXynNW7z7PQ+BbWpD Bk5q7XPqlRKtkPbvxtw3VzJhcNhP8Uh2ehaNj8/VqZQrSfdpymZrad+Bkv/i2BjPoc9tnC 93sHUP3qa8ximzdkXj+l/6g828N7uuyp5ItroW+OQQ4LTBYooey1K1aFhtfs2sycwTwH+5 CDaTT0U/HGficGlEqoSZxTH8xm/9Z0kr/+O/w8z2hdruQ1rTmxjwzzxvxugI2lkJZthC5b Go+Ii6hcOFiKaYd5O5KDTeelGUpKqXs8bEnhUjJkf2z6Khpf8hOkvuPrwXZuvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701222935; 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=ZJxKWwb0N4rMIjBAPXl2hWHqJJSu+OpzpEh8btcgsx4=; b=xD1fPVl1oIswAFg1HUi+1aCeBqRSpmNHP+u/DHSOy1U/PKdYeqKV9edr7Jdo/89/Cs42O2 IvFQusXYg3heJNcj3R8F0fzqvJDZjKrpX7MPiSQyhlQGemS+LZ3M0Fm+xW0Diob9Iaoal2 T93XrLGa8smluLdzOnZGSBoED/GUlzi1cSL4IeNKNeeTstioZqVizJuNnEcedRBjYUC/AJ PhHqA5ZeGOeDdUsmSCX+JqMwrZOAuhTuHPf8S79syu7HkqHD6c7b1pjMg6sbPCfpvpM38K rHXcrKnTLL5r4gu+Imysoab0QL/6BNf6SL8ixPe7G4INnhDwlxcyY9x0T+v22A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701222935; a=rsa-sha256; cv=none; b=sNbSgxjlruWwijtE7v2V+DSCN+4f2aUmUKVzl2pr4K3HPQt6bL3hf5b3n6icSbuZQgiLh4 0oo81OUsrUSg04kUdzs+ncQO71DXU/HjpW8VbKq1gGqajCU8VfwQv3rpz1GAxDGzsluA+u k5u4Sxpkzl2OLhQVk3bhDs5pw5es7O5OSRgke5EHpIZwZsse+QI7CBpHD1Ns08altHGOYd 8PoknCG+9Ltec5feWNyCPn+3cjOW7dnG943tYHqFV69msiV8nFCrBKkKdy9YATWGWE9K+6 EBqTW9RheEON8VpHFMNDAvnd2rZvzFmcv2K7YJdCSYVxLczvfuv1IeZyhM4ksQ== 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 4Sg2Tf6zrszmsL; Wed, 29 Nov 2023 01:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AT1tYjJ064356; Wed, 29 Nov 2023 01:55:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AT1tYdx064353; Wed, 29 Nov 2023 01:55:34 GMT (envelope-from git) Date: Wed, 29 Nov 2023 01:55:34 GMT Message-Id: <202311290155.3AT1tYdx064353@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1cfd01111eb6 - main - mpi3mr: Only set callout_owned when we create a timeout List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1cfd01111eb6a28ca5043e928aa8e9099064177a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1cfd01111eb6a28ca5043e928aa8e9099064177a commit 1cfd01111eb6a28ca5043e928aa8e9099064177a Author: Warner Losh AuthorDate: 2023-11-29 01:49:24 +0000 Commit: Warner Losh CommitDate: 2023-11-29 01:49:24 +0000 mpi3mr: Only set callout_owned when we create a timeout Since we assume there's a timeout to cancel when this is true, only set it true when we set the timeout. Otherwise we may try to cancel a timeout when there's been an error in submission. Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D42541 --- sys/dev/mpi3mr/mpi3mr_cam.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/mpi3mr/mpi3mr_cam.c b/sys/dev/mpi3mr/mpi3mr_cam.c index 430550e3edce..691be827cf89 100644 --- a/sys/dev/mpi3mr/mpi3mr_cam.c +++ b/sys/dev/mpi3mr/mpi3mr_cam.c @@ -1222,15 +1222,15 @@ mpi3mr_action_scsiio(struct mpi3mr_cam_softc *cam_sc, union ccb *ccb) mpi3mr_set_ccbstatus(ccb, CAM_RESRC_UNAVAIL); xpt_done(ccb); } else { - callout_reset_sbt(&cm->callout, SBT_1S * 90 , 0, - mpi3mr_scsiio_timeout, cm, 0); + callout_reset_sbt(&cm->callout, mstosbt(ccb->ccb_h.timeout), 0, + mpi3mr_scsiio_timeout, cm, 0); + cm->callout_owner = true; mpi3mr_atomic_inc(&sc->fw_outstanding); mpi3mr_atomic_inc(&targ->outstanding); if (mpi3mr_atomic_read(&sc->fw_outstanding) > sc->io_cmds_highwater) sc->io_cmds_highwater++; } - cm->callout_owner = true; return; }