Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21779757ybl; Mon, 6 Jan 2020 11:06:05 -0800 (PST) X-Google-Smtp-Source: APXvYqzZ0bu652o/vEhVvaYhB6PjlDEj5zA4wKkfHvCk8UPaI5OzQgbpvS5CayMayTNRxS7nw1aB X-Received: by 2002:a9d:7410:: with SMTP id n16mr105585663otk.23.1578337565640; Mon, 06 Jan 2020 11:06:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578337565; cv=none; d=google.com; s=arc-20160816; b=eekZl5ObOA97jOPQ/72oDosMWrUf6NbIRvp7PPTe/Nc61cD0gxXTTtJF4Wuw1YdKXV brYfk6HYuqmFY4CevFzFfIU2GEpHQAeDbuXqRdvEFKL+bjmKdKbYeVfhBWQ1rZOLs0ZU BPth14GiHCkyCQA4hPpJIRscxam18/oP7H48XaGMUtBvQOywD4wXbSICGRsNx7ehMxwo O5PyhinF1dL2+SLkVQabmwzf3ZrbBIPIBFfljkM9Hz3aaB6XF1RES1x8lJCi9flsr0aj cT4+m5UodhPERC/r72cxsbjkwKypJgfMZLSnQ8iuiyvigc09sGSNvAbYdGheo3fcX8TZ k2Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from; bh=q31iwyqN+7Jp/At1YrvCjpD/eSsraWRJNgnlk+iMybI=; b=XsI5vq/Qg5VDTb/h5RcGt6JwAlRApYkGgylRwaYlAls+RbNYtVDXqIuEqNpXIMWj14 /wev2rxEDSga72WoXV8rvPiPcGitk0NUQ9B1SKWPa0MorA4Uue9LwjDrpp0bcKUDjh6V feTK3akRdp/PekmqB2UW5HRp43GyILxdwHXQHPvhRD1rE3K8/2fuRKzdlM7RZ9KQCvNk zKnfqetm6wM8ASMFw7lpGiO+tQNWx6Zx4a0iu+gyNzTryogF/6qaObbnLacqx93blsLy DkARqI4HfC/sjH6aGanHNYj77DWk206O1Ejrv4R/i8JaYVZz/24Sv8wZAn0whMmni8ng e5rA== ARC-Authentication-Results: i=1; mx.google.com; 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 b4si23407995oib.70.2020.01.06.11.05.50; Mon, 06 Jan 2020 11:06:05 -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; 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 S1727217AbgAFTD4 (ORCPT + 99 others); Mon, 6 Jan 2020 14:03:56 -0500 Received: from ale.deltatee.com ([207.54.116.67]:54852 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727025AbgAFTDt (ORCPT ); Mon, 6 Jan 2020 14:03:49 -0500 Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ioXf9-0005m5-NT; Mon, 06 Jan 2020 12:03:47 -0700 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.92) (envelope-from ) id 1ioXf9-0000eA-7c; Mon, 06 Jan 2020 12:03:39 -0700 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Bjorn Helgaas Cc: Kelvin.Cao@microchip.com, Eric Pilmore , Doug Meyer , Logan Gunthorpe Date: Mon, 6 Jan 2020 12:03:27 -0700 Message-Id: <20200106190337.2428-3-logang@deltatee.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200106190337.2428-1-logang@deltatee.com> References: <20200106190337.2428-1-logang@deltatee.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, bhelgaas@google.com, Kelvin.Cao@microchip.com, epilmore@gigaio.com, dmeyer@gigaio.com, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,MYRULES_NO_TEXT autolearn=ham autolearn_force=no version=3.4.2 Subject: [PATCH 02/12] PCI/switchtec: Fix vep_vector_number ioread width X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org vep_vector_number is actually a 16 bit register which should be read with ioread16() instead of ioread32(). Fixes: 080b47def5e5 ("MicroSemi Switchtec management interface driver") Reported-by: Doug Meyer Signed-off-by: Logan Gunthorpe --- drivers/pci/switch/switchtec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c index 2bf670977b9c..9c3ad09d3022 100644 --- a/drivers/pci/switch/switchtec.c +++ b/drivers/pci/switch/switchtec.c @@ -1276,7 +1276,7 @@ static int switchtec_init_isr(struct switchtec_dev *stdev) if (nvecs < 0) return nvecs; - event_irq = ioread32(&stdev->mmio_part_cfg->vep_vector_number); + event_irq = ioread16(&stdev->mmio_part_cfg->vep_vector_number); if (event_irq < 0 || event_irq >= nvecs) return -EFAULT; -- 2.20.1