Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2280379ybl; Thu, 19 Dec 2019 10:56:43 -0800 (PST) X-Google-Smtp-Source: APXvYqzzGUuAQ24m314oWDqubYs4aVRlc4mn/kp/3WuZ9nWLEzTTt4xDqN82dwKVM7z/F1MuX5j1 X-Received: by 2002:a9d:76c5:: with SMTP id p5mr10776175otl.61.1576781803163; Thu, 19 Dec 2019 10:56:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576781803; cv=none; d=google.com; s=arc-20160816; b=0Rz0Dc/YYlpr6SnV0LE2F8wd+N/8i+4WzhQrNp5jqVwaBQlTWM8Mq22lVbHZjIa1JA OTGCSaZoMnwlfd+f045j/kqUT50CkbfIDk5dcDAWaaWllyXoPF9BqgfGgE1TYveDvuKs m4kS7fq89SBu/t5GkR5OAs3N73gxfiFtkBsyaf5e8BFdHSDYKoWJOZW3XN008CwEoUZc VWdHR4Alf7t46w4OXDNcFM1DeRv48JfeJUcbEIV0fEoynibWJCGbImdyybY2vIJ0sVd9 sgc8ZSoIIAQm1g8eZsFb0cjb6Xil4pxUz9LHstKEuXY9cNEpiJyh4StkVBDQcfj5moCQ lA9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=o8aUeb98F8ONIgCe9+sNNVPwzE7pReyzOT8Ul8BctGc=; b=YpnvKGtX1Qkij5ycI44QgprpfIAH54wQZLij/dAzZ6OFV9hQaZtW8FpEvPMhBuy0g1 sCk2jtEhGFKdnO8vMsLYtN+qQQSj+ZTgBULLGUaGGXb0E2YKp4lO0A+4fYY83FU/FRIt ILAeRqpH3ObKjBnkzySeEED9K5mAmuJeEcO05kc0UqJJVzO279+TxL/HmRXleIduPLpl 6Gl1xWt4/sWqcoigLRxNAXGLeHCz5CJXnEqikwfZjn7IEUETTK+NvkzgrvRXzyXytyHk 2TPyMNlQu/BMXu4agm1+qvvJV/I9X29gmVF+uV0HVYm2iSp9LH0HyusqUF26YYf5Zaq/ Vxhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XZeMMBn9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7si3290105oie.196.2019.12.19.10.56.31; Thu, 19 Dec 2019 10:56:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XZeMMBn9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730539AbfLSSyj (ORCPT + 99 others); Thu, 19 Dec 2019 13:54:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:50174 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730531AbfLSSyi (ORCPT ); Thu, 19 Dec 2019 13:54:38 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 76A07206EC; Thu, 19 Dec 2019 18:54:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576781677; bh=dqupO76jGLS7AojuD8LNGxHXPHitJQ7TttMVQLFsQIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XZeMMBn9hLtpXc8MND+Mc2Vb3Kkg+IDGRt+owTQt3jr4dxahbPg1Ceh45d7TF7Hi+ 77dg7OnGyG/knMTkhHAn+gVzZQCfHlQHxXW+zshOmwIUVwtD7AdcuBIatujxzh35CR ohQJp8sx1oTAQTfnk6SH/snLoh0Tqu5Ib2S8UTn0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Doug Meyer , Logan Gunthorpe , Bjorn Helgaas , Kelvin Cao Subject: [PATCH 5.4 06/80] PCI/switchtec: Read all 64 bits of part_event_bitmap Date: Thu, 19 Dec 2019 19:33:58 +0100 Message-Id: <20191219183036.508108102@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183031.278083125@linuxfoundation.org> References: <20191219183031.278083125@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Logan Gunthorpe commit 6acdf7e19b37cb3a9258603d0eab315079c19c5e upstream. The part_event_bitmap register is 64 bits wide, so read it with ioread64() instead of the 32-bit ioread32(). Fixes: 52eabba5bcdb ("switchtec: Add IOCTLs to the Switchtec driver") Link: https://lore.kernel.org/r/20190910195833.3891-1-logang@deltatee.com Reported-by: Doug Meyer Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v4.12+ Cc: Kelvin Cao Signed-off-by: Greg Kroah-Hartman --- drivers/pci/switch/switchtec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pci/switch/switchtec.c +++ b/drivers/pci/switch/switchtec.c @@ -675,7 +675,7 @@ static int ioctl_event_summary(struct sw return -ENOMEM; s->global = ioread32(&stdev->mmio_sw_event->global_summary); - s->part_bitmap = ioread32(&stdev->mmio_sw_event->part_event_bitmap); + s->part_bitmap = ioread64(&stdev->mmio_sw_event->part_event_bitmap); s->local_part = ioread32(&stdev->mmio_part_cfg->part_event_summary); for (i = 0; i < stdev->partition_count; i++) {