]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] Fix restore of 64-bit PCI BAR's
authorIvan Kokshaysky <ink@jurassic.park.msu.ru>
Sun, 7 Aug 2005 09:49:59 +0000 (13:49 +0400)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 7 Aug 2005 16:50:56 +0000 (09:50 -0700)
commit42b31ee2a6dbb4092366595856c6f0c4c22c6a29
treef2df9af0c11dbc0411f628d709e60de46296d799
parent039da73ec06377343d36287918311dad7291873b
[PATCH] Fix restore of 64-bit PCI BAR's

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: Linus Torvalds <torvalds@osdl.org>
drivers/pci/setup-res.c