[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 21/24] ahci: Change data types in preparation for mi
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 21/24] ahci: Change data types in preparation for migration |
Date: |
Fri, 25 Jan 2013 19:45:57 +0100 |
The size of an int depends on the host, so in order to be able to
migrate these fields, make them either int32_t or bool, depending on the
use.
Signed-off-by: Kevin Wolf <address@hidden>
---
hw/ide/ahci.c | 8 ++++----
hw/ide/ahci.h | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 2d185cb..f91cff2 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -241,7 +241,7 @@ static void ahci_port_write(AHCIState *s, int port, int
offset, uint32_t val)
if ((pr->cmd & PORT_CMD_FIS_ON) &&
!s->dev[port].init_d2h_sent) {
ahci_init_d2h(&s->dev[port]);
- s->dev[port].init_d2h_sent = 1;
+ s->dev[port].init_d2h_sent = true;
}
check_cmd(s, port);
@@ -494,7 +494,7 @@ static void ahci_reset_port(AHCIState *s, int port)
pr->scr_err = 0;
pr->scr_act = 0;
d->busy_slot = -1;
- d->init_d2h_sent = 0;
+ d->init_d2h_sent = false;
ide_state = &s->dev[port].port.ifs[0];
if (!ide_state->bs) {
@@ -946,7 +946,7 @@ static int handle_cmd(AHCIState *s, int port, int slot)
ide_state->hcyl = 0xeb;
debug_print_fis(ide_state->io_buffer, 0x10);
ide_state->feature = IDE_FEATURE_DMA;
- s->dev[port].done_atapi_packet = 0;
+ s->dev[port].done_atapi_packet = false;
/* XXX send PIO setup FIS */
}
@@ -991,7 +991,7 @@ static int ahci_start_transfer(IDEDMA *dma)
if (is_atapi && !ad->done_atapi_packet) {
/* already prepopulated iobuffer */
- ad->done_atapi_packet = 1;
+ ad->done_atapi_packet = true;
goto out;
}
diff --git a/hw/ide/ahci.h b/hw/ide/ahci.h
index 735b379..70d3b57 100644
--- a/hw/ide/ahci.h
+++ b/hw/ide/ahci.h
@@ -281,9 +281,9 @@ struct AHCIDevice {
QEMUBH *check_bh;
uint8_t *lst;
uint8_t *res_fis;
- int done_atapi_packet;
- int busy_slot;
- int init_d2h_sent;
+ bool done_atapi_packet;
+ int32_t busy_slot;
+ bool init_d2h_sent;
AHCICmdHdr *cur_cmd;
NCQTransferState ncq_tfs[AHCI_MAX_CMDS];
};
@@ -295,7 +295,7 @@ typedef struct AHCIState {
MemoryRegion idp; /* Index-Data Pair I/O port space */
unsigned idp_offset; /* Offset of index in I/O port space */
uint32_t idp_index; /* Current IDP index */
- int ports;
+ int32_t ports;
qemu_irq irq;
DMAContext *dma;
} AHCIState;
--
1.7.6.5
- [Qemu-devel] [PATCH 14/24] block: Use error code EMEDIUMTYPE for wrong format in some block drivers, (continued)
- [Qemu-devel] [PATCH 14/24] block: Use error code EMEDIUMTYPE for wrong format in some block drivers, Kevin Wolf, 2013/01/25
- [Qemu-devel] [PATCH 18/24] mirror: do nothing on zero-sized disk, Kevin Wolf, 2013/01/25
- [Qemu-devel] [PATCH 19/24] hbitmap: add assertion on hbitmap_iter_init, Kevin Wolf, 2013/01/25
- [Qemu-devel] [PATCH 17/24] block/vdi: Check for bad signature, Kevin Wolf, 2013/01/25
- [Qemu-devel] [PATCH 15/24] block/vdi: Improve debug output for signature, Kevin Wolf, 2013/01/25
- [Qemu-devel] [PATCH 16/24] block/vdi: Improved return values from vdi_open, Kevin Wolf, 2013/01/25
- [Qemu-devel] [PATCH 23/24] block: Create proper size file for disk mirror, Kevin Wolf, 2013/01/25
- [Qemu-devel] [PATCH 20/24] ahci: Remove unused AHCIDevice fields, Kevin Wolf, 2013/01/25
- [Qemu-devel] [PATCH 22/24] ahci: Add migration support, Kevin Wolf, 2013/01/25
- [Qemu-devel] [PATCH 24/24] ide: Add fall through annotations, Kevin Wolf, 2013/01/25
- [Qemu-devel] [PATCH 21/24] ahci: Change data types in preparation for migration,
Kevin Wolf <=