aboutsummaryrefslogtreecommitdiff
path: root/hw/ide
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-08-14 10:28:40 +0200
committerLaurent Vivier <laurent@vivier.eu>2020-09-01 11:27:26 +0200
commit4a13980b10c3858a92a974d9158b5bec36990e33 (patch)
treefb17cfe5a92424cb2854449e7cebcb372b660015 /hw/ide
parenta71f2d22628cae4fcb3df6fcc44e63e213d6ee18 (diff)
downloadqemu-4a13980b10c3858a92a974d9158b5bec36990e33.zip
qemu-4a13980b10c3858a92a974d9158b5bec36990e33.tar.gz
qemu-4a13980b10c3858a92a974d9158b5bec36990e33.tar.bz2
hw/ide/pci: Replace magic '512' value by BDRV_SECTOR_SIZE
Use self-explicit definitions instead of magic '512' value. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Li Qiang <liq3ea@gmail.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Message-Id: <20200814082841.27000-7-f4bug@amsat.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/ide')
-rw-r--r--hw/ide/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 5e85c4ad..b50091b 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -138,7 +138,7 @@ static int32_t bmdma_prepare_buf(const IDEDMA *dma, int32_t limit)
int l, len;
pci_dma_sglist_init(&s->sg, pci_dev,
- s->nsector / (BMDMA_PAGE_SIZE / 512) + 1);
+ s->nsector / (BMDMA_PAGE_SIZE / BDRV_SECTOR_SIZE) + 1);
s->io_buffer_size = 0;
for(;;) {
if (bm->cur_prd_len == 0) {