mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
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>
This commit is contained in:
parent
a71f2d2262
commit
4a13980b10
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@ static int32_t bmdma_prepare_buf(const IDEDMA *dma, int32_t limit)
|
||||||
int l, len;
|
int l, len;
|
||||||
|
|
||||||
pci_dma_sglist_init(&s->sg, pci_dev,
|
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;
|
s->io_buffer_size = 0;
|
||||||
for(;;) {
|
for(;;) {
|
||||||
if (bm->cur_prd_len == 0) {
|
if (bm->cur_prd_len == 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue