From nobody Tue Jan 31 13:18:08 2023 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 4P5lwc70P6z3cVJq; Tue, 31 Jan 2023 13:18:08 +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 4P5lwc6SrJz3hDh; Tue, 31 Jan 2023 13:18:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675171088; 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=MZbCh9JwAKFU0kHUR7R52qIGU8tovfkk9INLVWD8+pU=; b=na9WHN+TENuiwyvuPAzrPnF3ARrQPBa0kPloOP7EfJhc4aIVFVzUDhPFOTRAknaQobEaVU xtAyXS0VTYRKi+4GWnFkytOHvs9RR2MEvnnOztJlNYQnBHqHFbgl3/NHFGYWUzKCvQeeS1 bz0rWOOm2ApiQrqnvPT8sGKL4Yz99QoZ3pDHHa9UbNQR5Pq1UqvsKxiaNPG0N+v1J8xMhN 0MxR27fqvei1WVsmQF9WLjz4wpuucpfZZLmE53tPn9mTdbQ2ElTiAWzTEqxZT4Q03I7aqZ 4HZaT3Qg1ETQVg3BC8YcZc6t15dQrIPfSpC/NMPUNWmT3hj64BFlgzhhpfBHyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675171088; 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=MZbCh9JwAKFU0kHUR7R52qIGU8tovfkk9INLVWD8+pU=; b=sh5O7N5fqXmsXwqK9evZfnPS428RLoEJaXBUcJugINTB2ZaXJDNCaAmk7prGhX2reFllNK yhFQNrhE/gLfOmpPswrcPXcvhQAOjCqeO0KS/c3qKAVstkjhmllOMncgaheKorZ1HIe+9V Zu/I38wjxfr1oXpEZsaw5zlpqrzzWtB5H6HvTbUJQ0ikqn0Ww+62qMUbWJcXKpOqNjV1yM oS4RlwWOW5KopAUaYtgRdkrWFrPO+0G/M+Sm55kAlWCuzdx4is637qbj+Xy8ET5TjVxqyK 31jRb0tbdKF9WEUvtH+Q2XFvmeSWvEDZYfbyLJmHeW1H0rHLVhgjfuEJMfWqUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675171088; a=rsa-sha256; cv=none; b=FpePn6tflbcgv4FoGAZcEsc9NmziUEN7694WMNNIufMwpL0D80rDF+6efY4CmC216phTic vip5n/mug+GJb+MsvdKcKDL24VzZbpzDv1KL6GrPLQvpxxf3WwXagvECMmyRDKREwR1Boo lqzVma3Wx29w/FgNnvwCXS4mYMDHiKyvwOww1AOucmfYOvWyKDUpNj/sIyr6NYqBOzizOQ qrApOzp3CHQmyn6AriJ+Kgdp1lNNIlTcbkLX3zb+R+d0EJTFDhh6uTAZPkpbfz60kUmUOr z4/ZJeFR9ipEIGLaeFximWEZEcjTBAUgxkjf/s6WBJ9pQzowedpLExc57cUSaw== 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 4P5lwc5ZYNzqhB; Tue, 31 Jan 2023 13:18:08 +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 30VDI8fx041044; Tue, 31 Jan 2023 13:18:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30VDI8hG041043; Tue, 31 Jan 2023 13:18:08 GMT (envelope-from git) Date: Tue, 31 Jan 2023 13:18:08 GMT Message-Id: <202301311318.30VDI8hG041043@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marcin Wojtas Subject: git: b1f4275bfe86 - stable/12 - ena: Remove timer service re-arm on ena_restore_device failure 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: mw X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: b1f4275bfe866345091d8e62a744d01295141370 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=b1f4275bfe866345091d8e62a744d01295141370 commit b1f4275bfe866345091d8e62a744d01295141370 Author: David Arinzon AuthorDate: 2022-12-04 10:37:32 +0000 Commit: Marcin Wojtas CommitDate: 2023-01-31 12:46:50 +0000 ena: Remove timer service re-arm on ena_restore_device failure In case the reset sequence fails (ena_destroy_device() followed by ena_restore_device() calls) during ena_restore_device(), the driver resources are being freed. After the clean-up, the timer service is re-armed in order to try and re-initialize the driver state. But, such an attempt would fail given that the resources are freed. Moreover, this would actually cause either the system to fail or a panic. When the driver fails in ena_restore_device() procedure, the only recovery is either unloading and loading the driver or instance reboot. This change removes the timer service re-arm in case of failure in ena_restore_device(). MFC after: 2 weeks Sponsored by: Amazon, Inc. Fixes: 78554d0c707c ("ena: start timer service on attach") (cherry picked from commit c4a85b8d684d3db9dc4d3d01d966130e21390529) --- sys/dev/ena/ena.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index fe9c411f125a..15c8d39d8fb5 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -3454,8 +3454,6 @@ err: ENA_FLAG_CLEAR_ATOMIC(ENA_FLAG_ONGOING_RESET, adapter); ena_log(dev, ERR, "Reset attempt failed. Can not reset the device\n"); - ENA_TIMER_RESET(adapter); - return (rc); }