s390/pci: fix struct definition for set PCI function
Recent firmware will store PCI MIO information also when enabling MIO
instructions via set PCI function. We do not use this information but
currently calling enable MIO will fail because of insufficient response
block length. Fix this by putting a struct mio_info at the end of the
affected response block struct.
Fixes: 71ba41c9b1 ("s390/pci: provide support for MIO instructions")
Signed-off-by: Sebastian Ott <sebott@linux.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
This commit is contained in:
committed by
Heiko Carstens
parent
d83623c5ea
commit
1354b38b3d
@@ -165,11 +165,11 @@ static int clp_store_query_pci_fn(struct zpci_dev *zdev,
|
||||
}
|
||||
zdev->mio_capable = response->mio_addr_avail;
|
||||
for (i = 0; i < PCI_BAR_COUNT; i++) {
|
||||
if (!(response->mio_valid & (1 << (PCI_BAR_COUNT - i - 1))))
|
||||
if (!(response->mio.valid & (1 << (PCI_BAR_COUNT - i - 1))))
|
||||
continue;
|
||||
|
||||
zdev->bars[i].mio_wb = (void __iomem *) response->addr[i].wb;
|
||||
zdev->bars[i].mio_wt = (void __iomem *) response->addr[i].wt;
|
||||
zdev->bars[i].mio_wb = (void __iomem *) response->mio.addr[i].wb;
|
||||
zdev->bars[i].mio_wt = (void __iomem *) response->mio.addr[i].wt;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user