Skip to content

Commit 6acdf7e

Browse files
lsgunthbjorn-helgaas
authored andcommitted
PCI/switchtec: Read all 64 bits of part_event_bitmap
The part_event_bitmap register is 64 bits wide, so read it with ioread64() instead of the 32-bit ioread32(). Fixes: 52eabba ("switchtec: Add IOCTLs to the Switchtec driver") Link: https://lore.kernel.org/r/[email protected] Reported-by: Doug Meyer <[email protected]> Signed-off-by: Logan Gunthorpe <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Cc: [email protected] # v4.12+ Cc: Kelvin Cao <[email protected]>
1 parent 54ecb8f commit 6acdf7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/switch/switchtec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ static int ioctl_event_summary(struct switchtec_dev *stdev,
675675
return -ENOMEM;
676676

677677
s->global = ioread32(&stdev->mmio_sw_event->global_summary);
678-
s->part_bitmap = ioread32(&stdev->mmio_sw_event->part_event_bitmap);
678+
s->part_bitmap = ioread64(&stdev->mmio_sw_event->part_event_bitmap);
679679
s->local_part = ioread32(&stdev->mmio_part_cfg->part_event_summary);
680680

681681
for (i = 0; i < stdev->partition_count; i++) {

0 commit comments

Comments
 (0)