aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorSumit Saxena <[email protected]>2019-07-26 00:55:52 +0530
committerBjorn Helgaas <[email protected]>2019-08-08 15:12:17 -0500
commitd2182b2d4b71ff0549a07f414d921525fade707b (patch)
treec876eaf49b92b6bae715d9c0c093a93b5d13e077 /fs/btrfs/dev-replace.c
parent39098edbd79e5c9a4357eb924cb259d1c8a11346 (diff)
PCI: Restore Resizable BAR size bits correctly for 1MB BARs
In a Resizable BAR Control Register, bits 13:8 control the size of the BAR. The encoded values of these bits are as follows (see PCIe r5.0, sec 7.8.6.3): Value BAR size 0 1 MB (2^20 bytes) 1 2 MB (2^21 bytes) 2 4 MB (2^22 bytes) ... 43 8 EB (2^63 bytes) Previously we incorrectly set the BAR size bits for a 1 MB BAR to 0x1f instead of 0, so devices that support that size, e.g., new megaraid_sas and mpt3sas adapters, fail to initialize during resume from S3 sleep. Correctly calculate the BAR size bits for Resizable BAR control registers. Link: https://lore.kernel.org/r/[email protected] Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203939 Fixes: d3252ace0bc6 ("PCI: Restore resized BAR state on resume") Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Christian König <[email protected]> Cc: [email protected] # v4.19+
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions