mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
PCI/switchtec: Fix vep_vector_number ioread width
commit9375646b4cupstream. vep_vector_number is actually a 16 bit register which should be read with ioread16() instead of ioread32(). Fixes:080b47def5("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b72b8d0725
commit
df26f04f23
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user