diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-11-25 14:47:06 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-11-25 14:47:06 +0000 |
commit | 1a4dab849d5d06191ab5e5850f6b8bfcad8ceb47 (patch) | |
tree | 0f557eeb8112d06840c26dab9af56b014ea490a7 /hw | |
parent | e85dda8070b20dd8765d52daf64de70a9ccf395f (diff) | |
parent | 8c34d891b1594840d8394a3c9b92236c13254fd8 (diff) |
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches
# gpg: Signature made Wed 25 Nov 2015 13:33:14 GMT using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
* remotes/kevin/tags/for-upstream:
qemu-iotests: Add -nographic when starting QEMU in 119 and 120
block/qapi: Plug memory leak on query-block error path
raw-posix.c: Make GetBSDPath() handle caching options
nand: fix flash erase when oob is in memory
test-aio: Fix event notifier cleanup
tests/Makefile: Add more dependencies for test-timed-average
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/block/nand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/block/nand.c b/hw/block/nand.c index a68266f887..f0e34139fe 100644 --- a/hw/block/nand.c +++ b/hw/block/nand.c @@ -712,7 +712,7 @@ static void glue(nand_blk_erase_, PAGE_SIZE)(NANDFlashState *s) memset(s->storage + (PAGE(addr) << OOB_SHIFT), 0xff, OOB_SIZE << s->erase_shift); i = SECTOR(addr); - page = SECTOR(addr + (ADDR_SHIFT + s->erase_shift)); + page = SECTOR(addr + (1 << (ADDR_SHIFT + s->erase_shift))); for (; i < page; i ++) if (blk_write(s->blk, i, iobuf, 1) < 0) { printf("%s: write error in sector %" PRIu64 "\n", __func__, i); |