From nobody Wed Apr 06 17:46:14 2022 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 9630B1AA6C93; Wed, 6 Apr 2022 17:46:15 +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 4KYX4R00qxz3DW2; Wed, 6 Apr 2022 17:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649267175; 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=pRqAX3bReWCuXGA1YDWELYYRob/O3oVuXAMLj/a9PJs=; b=HB4qraB1t/IEAL6f27Ppa8KKfF3Slq9VPx/9nBKYugycjSVTL7bF4/IyKp2VYniG+c56pU 77s3HMJquNKUZQFH5s6vHO7AMOiTsbdDmu0OT3cX1m7TvDcEE42xgiOgp3zUU+MmRXCzfn wkCzHzosfYfVQbCWMYGu1Ps8ifyrVY3WyLGIeAe6oNgDF2+LqlPmBP3xRHyVbxmF6teQ2v QKT0YqGhp3BsB1cuaJWD7SNH4I55OuihYnCe9Cg1pJANStuRmNBRnzPmB+SjvYnvnqvoAx qu7840mAZKyhQ11FvfdWTE3YaxapC2uG1fbe811uA2PZNRjjWgV+D6Fxq3Np3Q== 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 CD2881F651; Wed, 6 Apr 2022 17:46: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 236HkE0d022837; Wed, 6 Apr 2022 17:46:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 236HkEKC022836; Wed, 6 Apr 2022 17:46:14 GMT (envelope-from git) Date: Wed, 6 Apr 2022 17:46:14 GMT Message-Id: <202204061746.236HkEKC022836@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: c872d65b55aa - releng/13.1 - mrsas: if controller reset is in progress, refrain from firing DCMDs to firmware in shutdown 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.1 X-Git-Reftype: branch X-Git-Commit: c872d65b55aa3bf6c030276eb0c7933015b20801 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649267175; 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=pRqAX3bReWCuXGA1YDWELYYRob/O3oVuXAMLj/a9PJs=; b=E9HnVT6tn94Pgi895XWSDnL4WSRG0NhpmCdV5ARN9JZjfUhSv0qxo1Mk8nqufouG4bjFY3 q/cE5v/ZFWt5O54FfZqvOxCOpWHOYVEeV3DZVhaMM8Ng0kYfLNEBMjqDnvvGiejzVKoVZj XXtEtpj84SSJ1BtbTpqVH1UZi8KeDWD4OGWqsfQHaRv4iE3AWXMro+JH7xcbKc9PRUj+T1 QpbfRadZuFLcwlqhwPkkNf13UTF/95y+od6Vkpm1S/JOmEe4ztO5tpzZrEAzicVZv5iq41 AsO8U8MJMHwQ0yjQk1Oe2UkWZL5F2vHlK/sx3T1wREnf2UewRnEbM2kMR9AoUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649267175; a=rsa-sha256; cv=none; b=SfWguXjqWbRCdEee/wVEhri5zavVnR+ZxteAzPk7V82MZ4/XihyiWukn93cWRtyNdS6L5Y jANzMJELxrTA9VRQN+yFci5iAD6N/nHP6liLcU61to5jvzZ7IOtYek7j7fb9FPmUPuVF7D FxmCzAAFyeXNL9qb29y4F5pZ8pPHGxTpUqLtYAUr59mjEGVU9VTJrg7OHPhqgj9u0eLAyS ysLlkqUkfuluiZnddqcI32LJxKMzeXwuZMtYObZGmxgPsBADoOP826mZq3c1eSPLMLGBce owwQFFoYTmlyMeTHDjezLZXxlku9O03KcukqvsBizL8+kuYuWM7gmJEPs7q9QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.1 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c872d65b55aa3bf6c030276eb0c7933015b20801 commit c872d65b55aa3bf6c030276eb0c7933015b20801 Author: Chandrakanth Patil AuthorDate: 2022-01-21 09:24:37 +0000 Commit: Warner Losh CommitDate: 2022-04-06 17:46:00 +0000 mrsas: if controller reset is in progress, refrain from firing DCMDs to firmware in shutdown If controller reset is in progress, at same time if system shutdown is issued then corresponding shutdown function in driver will be invoked where driver is waiting 15 seconds to complete the controller reset. If the reset is not complteted within that time frame driver will go ahead and fire cache flush and shutdown DCMDs which will end up accessing the the queues which are not initialized due to undergoing reset leads to FMU error in firmware. Fix: In shutdown function, if controller reset is not finished within 15 seconds than driver will return to the OS without firing any DCMDs. Approved by: re@ (gjb) Reviewed by: imp PR: 261375 (cherry picked from commit 79c4c4be9618470711480f46ef2cd3a15c00cdd2) (cherry picked from commit 09e161a29ee5b0e52494c861f451de35b286e327) --- sys/dev/mrsas/mrsas.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/mrsas/mrsas.c b/sys/dev/mrsas/mrsas.c index 8814642fccd0..0055ddda8ce9 100644 --- a/sys/dev/mrsas/mrsas.c +++ b/sys/dev/mrsas/mrsas.c @@ -1198,6 +1198,7 @@ mrsas_shutdown(device_t dev) if (sc->reset_in_progress) { mrsas_dprint(sc, MRSAS_INFO, "gave up waiting for OCR to be finished\n"); + return (0); } }