[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v4 07/14] m25p80: Switch to byte-based block access
From: |
Eric Blake |
Subject: |
[Qemu-block] [PATCH v4 07/14] m25p80: Switch to byte-based block access |
Date: |
Fri, 29 Apr 2016 14:08:29 -0600 |
Sector-based blk_read() should die; switch to byte-based
blk_pread() instead.
Signed-off-by: Eric Blake <address@hidden>
---
Not compile tested - I'm not sure what else I'd need in my environment
to actually test this one. I have:
Fedora 23, dnf builddep qemu
./configure --enable-kvm --enable-system --disable-user
--target-list=x86_64-softmmu,ppc64-softmmu --enable-debug
---
hw/block/m25p80.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
index 906b712..01c51a2 100644
--- a/hw/block/m25p80.c
+++ b/hw/block/m25p80.c
@@ -907,8 +907,7 @@ static int m25p80_init(SSISlave *ss)
s->storage = blk_blockalign(s->blk, s->size);
/* FIXME: Move to late init */
- if (blk_read(s->blk, 0, s->storage,
- DIV_ROUND_UP(s->size, BDRV_SECTOR_SIZE))) {
+ if (blk_pread(s->blk, 0, s->storage, s->size)) {
fprintf(stderr, "Failed to initialize SPI flash!\n");
return 1;
}
--
2.5.5
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-block] [PATCH v4 07/14] m25p80: Switch to byte-based block access,
Eric Blake <=