diff options
author | Logan Gunthorpe <logang@deltatee.com> | 2020-01-06 22:03:27 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-15 00:32:21 +0300 |
commit | b642fb092de14eb6ed760f5fb7ceb160ec6bee98 (patch) | |
tree | 4b4b09be8041b5a600b6db611db602489479c528 /drivers/pci | |
parent | 251601c93fd4615168607d2be37b7dfa7c9cfab4 (diff) | |
download | linux-b642fb092de14eb6ed760f5fb7ceb160ec6bee98.tar.xz |
PCI/switchtec: Fix vep_vector_number ioread width
commit 9375646b4cf03aee81bc6c305aa18cc80b682796 upstream.
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")
Link: https://lore.kernel.org/r/20200106190337.2428-3-logang@deltatee.com
Reported-by: Doug Meyer <dmeyer@gigaio.com>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/switch/switchtec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c index 73dba2739849..bf229b442e72 100644 --- a/drivers/pci/switch/switchtec.c +++ b/drivers/pci/switch/switchtec.c @@ -1399,7 +1399,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; |