From nobody Tue Apr 05 14:38:24 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 CD44B1A8D79E; Tue, 5 Apr 2022 14:38:24 +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 4KXqy850pdz4ZVX; Tue, 5 Apr 2022 14:38:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649169504; 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=xIzynDDshnDXwtmONd9FSL0sjiOZh5gjnNzE9+cXv68=; b=x4gJNZ67JM2TmLAB0anRlB52kHfAs2V0wABRyyHNStY9BywqpnD6MyCfiwgln10kDJxsvS 12/eKNWr8d/noI7fUo+dN9o2KUc4lqUJmvEETlrsvSKsU7cuYJH4IOv9FL1yQ6csSM9JQa ibmeKm799m/2jLi/TRucmIzjWOh6hov6NlY1ZYY11nWhXdTKHPpI45dvf0MYcNUHKqZbif ObaFW2XA5B4Q75YOTuUAJ+1THRu1/g1cDPE2WVP3u/+BaRsqwQAVu0aFBaV9ThvvzHr6X4 YbxEjfl3hFPUuNKSU4Xh823cBYS23wrYVG0a2D05akACkTySUjViqi0pPyNWUA== 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 85A6A449; Tue, 5 Apr 2022 14:38:24 +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 235EcOY6019467; Tue, 5 Apr 2022 14:38:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 235EcOLX019466; Tue, 5 Apr 2022 14:38:24 GMT (envelope-from git) Date: Tue, 5 Apr 2022 14:38:24 GMT Message-Id: <202204051438.235EcOLX019466@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: 79c4c4be9618 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 79c4c4be9618470711480f46ef2cd3a15c00cdd2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649169504; 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=xIzynDDshnDXwtmONd9FSL0sjiOZh5gjnNzE9+cXv68=; b=FGyUE/cZbkfPTU+s5ynNJtWZUJtovSgJZhqXIxmYEuwuIprvVquADgkoq6eib0tPfZj5zB V5JN2p1A28ZDtQUOMbtAy5qxhTvHFYaqiByARaNtcMLaopfO47Lf54nqj8sGebs7YySWSo kQyOSBYHkPnFSqg/NZo+cKGuOpJm6BrS8+3mI7Zf6/gyZiqbNVKe1zYQJlxvH+Qa2WBt8B 4d0Z3mR1yh9iMA4rFT6LcFEKt1QJ42lNol2wFoYHRVVWlmOuXk206yBJJuDUXJYtAhNDIo 4uJjJspdl6wfazQMz8j+JpIBPe7o9Tjk9jrB+u8GeJU/mEWgEE0TlVRxzKLBVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649169504; a=rsa-sha256; cv=none; b=P3nmgoutIrmzi0j4HBc4zcxVA9CfcRDXUlmaRm5glWxa/JVEkgHlkZK05wxto15ncIgaAk xVzUOLSZtOQVJiJJ05PXbh8wUl+aqsWv/m/zOO+FaJAyNV3tRg/3KusxZY+low8W29Kz7A NapLRm+AzNNr4XV6y/S6Wpzm2UFsdgm2p+eveVKldKIVHCtTLrkWOWPBNRm5poBjU2SiU8 T6j2/B1qT2FzRt0+9VYdhtGeaAVB1dr8vY3N5QmJEJfm/i01Afdvs1NtvpniIDZoVcYmxp KFJ1oBOJ9S/aNew+7zeVQdMOHnadMMC2H9qAYefhFS9xeyK0v8nG7hh4Y/6zSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=79c4c4be9618470711480f46ef2cd3a15c00cdd2 commit 79c4c4be9618470711480f46ef2cd3a15c00cdd2 Author: Chandrakanth Patil AuthorDate: 2022-01-21 09:24:37 +0000 Commit: Warner Losh CommitDate: 2022-04-05 14:38:15 +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. Reviewed by: imp PR: 261375 --- 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 595dc3e340ae..b271ce6264b4 100644 --- a/sys/dev/mrsas/mrsas.c +++ b/sys/dev/mrsas/mrsas.c @@ -1166,6 +1166,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); } }