[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200106190337.2428-3-logang@deltatee.com>
Date: Mon, 6 Jan 2020 12:03:27 -0700
From: Logan Gunthorpe <logang@...tatee.com>
To: linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Kelvin.Cao@...rochip.com, Eric Pilmore <epilmore@...aio.com>,
Doug Meyer <dmeyer@...aio.com>,
Logan Gunthorpe <logang@...tatee.com>
Subject: [PATCH 02/12] PCI/switchtec: Fix vep_vector_number ioread width
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 <dmeyer@...aio.com>
Signed-off-by: Logan Gunthorpe <logang@...tatee.com>
---
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
Powered by blists - more mailing lists