• Ivan Kokshaysky's avatar
    [PATCH] Fix restore of 64-bit PCI BAR's · cf7bee5a
    Ivan Kokshaysky authored
    For 64-bit BAR[i] only pci_dev->resource[i] is valid, ->resource[i+1]
    slot is unused and contains zeroes in all fields.
    
    So when we update a PCI BAR, all we need is just to check that we're
    going to update a _valid_ resource.
    
    Also make sure to write high bits - use "x >> 16 >> 16" (rather than the
    simpler ">> 32") to avoid warnings on 32-bit architectures where we're
    not going to have any high bits.
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    cf7bee5a
setup-res.c 5.34 KB