Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11794187pjo; Thu, 2 Jan 2020 14:23:43 -0800 (PST) X-Google-Smtp-Source: APXvYqyJvhFLBBoqdqZeXZ8dLNEhMdVtxfoOeShSeFnjBSCmedvXdr8qb+1yf+9oB9yRUznL7kwR X-Received: by 2002:a9d:21f4:: with SMTP id s107mr96659958otb.102.1578003823337; Thu, 02 Jan 2020 14:23:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578003823; cv=none; d=google.com; s=arc-20160816; b=RBWUf+0Bx6RBkgrnvQpCxShy33sQjPq8y0T9oCsscX3xq4SV9trzMDYUGGh2aXmLZX 0BL9JjHFqW9jGoc/OTAtFRW+ALp2QVcyY+JXgDltjb0Y7Gr0NZM72DlRxse9IvALvEfP ksSHopqSLNDUEFFUM/hzJf73A3Lii2IsRF/AUqZa28du3FG7nPOHuKg27uJxP4jHbbN1 2EE4zGBjA0yVVEpRY+AdohrWuTcw+cKcYyjKYEN0E3Q8doNzl6LdL+0CQoV504zU5ZGy AGxFl4Fy48utKHPhRh5S7bzsvKggTCc9SOw+sX/KbHqWJlu7jVV2VPVRREAnDhDCDZt/ kGTw== 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=y8MLzHJVUKwnzsGTKQKuiUNZjXvIOiNgwwU3dGBL6GI=; b=bgZv2nCX7AMh0Ox8y0PwA6YED714ilK+PY40jgUc03FVt4UtgxmQpqm/frtgw74T8q rm5O3xG+uwodJsQEx6s8naPm5jgOmqOoMDzgtsEuND7SK73iV49G1tfdki20pJj8Bgcg OUkLdqyWfnn7HJGqI2fsH5RFXBc85o+1Xn+qi9abaDc4Qqk7lyusEna904UKuCivdnw3 o0kYGJNKaZxZf383gV0pkq7bArHRGVqp7djAKjJbq11/jGffUxPRVxos7NlBW4Y9YcHq cQYHjkCBCt4Qdd6puo/H7k+hbwceHZ0PUS26I8WFzsXA2xqYceeNhl+cJuVQl8J0Zksi qmdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dZiU1iu1; 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 w7si29574723otq.250.2020.01.02.14.23.31; Thu, 02 Jan 2020 14:23: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=dZiU1iu1; 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 S1728701AbgABWV5 (ORCPT + 99 others); Thu, 2 Jan 2020 17:21:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:41500 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729052AbgABWVt (ORCPT ); Thu, 2 Jan 2020 17:21:49 -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 5601224649; Thu, 2 Jan 2020 22:21:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003708; bh=ZVCY2T+T7NCCSdH+vNpHz/vAj3mGlseXINxTYyOQWHQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dZiU1iu1lY9pN0y/j1fqGz/1Jg4xMUuXI1cPPBr5Qn+wPKuNH9TyG5UdHoVa4aIC8 DdVb7jmhvtPjeqEcXmvBTbcbV5aQsS5fJeCo9ZOGVzTlbyKJYp+NZdt7VoDbkImoT6 NWdQt0TI2I+6Wifw5BR2tKf5YREM7k9hKUjUieZ4= 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 4.19 082/114] PCI/switchtec: Read all 64 bits of part_event_bitmap Date: Thu, 2 Jan 2020 23:07:34 +0100 Message-Id: <20200102220037.417938346@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220029.183913184@linuxfoundation.org> References: <20200102220029.183913184@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 @@ -633,7 +633,7 @@ static int ioctl_event_summary(struct sw u32 reg; s.global = ioread32(&stdev->mmio_sw_event->global_summary); - s.part_bitmap = ioread32(&stdev->mmio_sw_event->part_event_bitmap); + s.part_bitmap = readq(&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++) {