Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2923424pxb; Tue, 24 Aug 2021 10:41:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWfFXORAfiG0amJlwaTh20Q4M3cfznUW13J+LkrADjldkz7YEl600OgwjgZyNIUDhKXiet X-Received: by 2002:a02:708f:: with SMTP id f137mr2496130jac.68.1629826908264; Tue, 24 Aug 2021 10:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629826908; cv=none; d=google.com; s=arc-20160816; b=aF0Ld4Quhw9sxwB5O2tmLPWv3qufA8jl6frLcODTv1Z7hctU9mGy00tFKopX/MphWD IQxtlQ61Iqs1VHFhBLIWCZ/dbXCRl3UVHactZdaLTjhr/Tp+XF2EWC2eBj7dQLPuhPqM XCwbGzeE4AfTJ/lWIcYO/pkVRY9mGLDI6dXMyF1l7FvmxZ7IWn2V4AIhc2Tx9QfkXDnz PFBRM4igtGu7IrpmVqJIC6hkRwFQOWvSSy7gKzhn22E8FZPs7hO3ljDcovaB12tOcx+k Xosgy5822Pn2NsRnMk9wpauojy0plHzImIDrGcsfjVUkwndAJuM1Bhq/v0FaBj18coQu emDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=D7O1ywLei0eKSa6hYz3smmD8ijESGy4/8YVbks2JsMk=; b=srONKg8vua/WMik3r5sDSYDzzyrJ0E3o/2T7f9wkmIrS56+yjiiTTyNixw4/yoRMNF POrdU41mBAV+dMefddlQYCrpiFtPXmmyrsAhUQ8OXPK/WLpCG5dCohlfN6SzdNwrRZy2 nz9qm9dypSawKmHCw8GHoFVpX2jOrYIFLf/CPwjRxA4U8GB4xjYELYM1IsyxFKWgxWd1 Ezgfu0Cb9jEirl54zrzmgajvjSq6kmQH9k72NVvtgewlihlVwKBx3/hByibzPq3kPIDU UnPW2mYFor2ERvsSlN/jL71B+zGtT7teBJXKcFnzlNmmD67WaDnrqDFwFyrTDlaGjsuX Kavw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BEiK97+U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r6si18093120ilb.145.2021.08.24.10.41.36; Tue, 24 Aug 2021 10:41:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BEiK97+U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242285AbhHXRlS (ORCPT + 99 others); Tue, 24 Aug 2021 13:41:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:41186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241741AbhHXRhJ (ORCPT ); Tue, 24 Aug 2021 13:37:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1AB0261BD2; Tue, 24 Aug 2021 17:07:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629824872; bh=IXMbqf3F/xNTBB+KFcsn8rN5Hg1chklx+FpW8mQsJ6Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BEiK97+U/Kq7Kh3R7PT6rfuj6+J5mAKu+7/sjIs3lbpnSf1TpwLCpWKnxPBltF4l0 T/O0/sSZdJRYKHjpJYMrl8DcVT/nGGGmMFZjod6fxh2js8ztqVj8rmKhegSjEYC8I+ +HN+H2EAV+L84wv6PKa3HHxsk2V85+xm3FTrV/sfDeKJwZinBpsdLQymT+LoB6oVVr xYwbt6rxQ7faUKzXoP9q8GmXb/r4SsxVZRmcAK2SG5zkm7trUsEpdcWP+W8DQw7kSI aFTlJFTvo4I5mTVKQlIx/PTHA+Rr9Q5K87uNWOsoI39fj+s9zhQWn3Fv0n5BVTIFOb DeglJgGi4zcug== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Thomas Gleixner , Marc Zyngier , Greg Kroah-Hartman Subject: [PATCH 4.4 08/31] PCI/MSI: Correct misleading comments Date: Tue, 24 Aug 2021 13:07:20 -0400 Message-Id: <20210824170743.710957-9-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210824170743.710957-1-sashal@kernel.org> References: <20210824170743.710957-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.282-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.4.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.4.282-rc1 X-KernelTest-Deadline: 2021-08-26T17:07+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Gleixner commit 689e6b5351573c38ccf92a0dd8b3e2c2241e4aff upstream. The comments about preserving the cached state in pci_msi[x]_shutdown() are misleading as the MSI descriptors are freed right after those functions return. So there is nothing to restore. Preparatory change. Signed-off-by: Thomas Gleixner Tested-by: Marc Zyngier Reviewed-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210729222542.621609423@linutronix.de Signed-off-by: Greg Kroah-Hartman --- drivers/pci/msi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 4680632b9e65..84ccff0f4b1b 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -890,7 +890,6 @@ void pci_msi_shutdown(struct pci_dev *dev) /* Return the device with MSI unmasked as initial states */ mask = msi_mask(desc->msi_attrib.multi_cap); - /* Keep cached state to be restored */ __pci_msi_desc_mask_irq(desc, mask, 0); /* Restore dev->irq to its default pin-assertion irq */ @@ -988,10 +987,8 @@ void pci_msix_shutdown(struct pci_dev *dev) return; /* Return the device with MSI-X masked as initial states */ - for_each_pci_msi_entry(entry, dev) { - /* Keep cached states to be restored */ + for_each_pci_msi_entry(entry, dev) __pci_msix_desc_mask_irq(entry, 1); - } pci_msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_ENABLE, 0); pci_intx_for_msi(dev, 1); -- 2.30.2