[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/11] ahci: remove cmd_fis argument from write_fis_d
From: |
John Snow |
Subject: |
[Qemu-devel] [PULL 10/11] ahci: remove cmd_fis argument from write_fis_d2h |
Date: |
Fri, 18 Sep 2015 11:04:40 -0400 |
It's no longer used. We used to generate a D2H FIS based
upon the command FIS that prompted the update, but in reality,
the D2H FIS is generated purely from register state.
cmd_fis is vestigial, so get rid of it.
Signed-off-by: John Snow <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
---
hw/ide/ahci.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index b86347d..ea87f5a 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -46,7 +46,7 @@ do { \
static void check_cmd(AHCIState *s, int port);
static int handle_cmd(AHCIState *s, int port, uint8_t slot);
static void ahci_reset_port(AHCIState *s, int port);
-static void ahci_write_fis_d2h(AHCIDevice *ad, uint8_t *cmd_fis);
+static void ahci_write_fis_d2h(AHCIDevice *ad);
static void ahci_init_d2h(AHCIDevice *ad);
static int ahci_dma_prepare_buf(IDEDMA *dma, int32_t limit);
static bool ahci_map_clb_address(AHCIDevice *ad);
@@ -538,12 +538,9 @@ static void ahci_check_cmd_bh(void *opaque)
static void ahci_init_d2h(AHCIDevice *ad)
{
- uint8_t init_fis[20];
IDEState *ide_state = &ad->port.ifs[0];
AHCIPortRegs *pr = &ad->port_regs;
- memset(init_fis, 0, sizeof(init_fis));
-
/* We're emulating receiving the first Reg H2D Fis from the device;
* Update the SIG register, but otherwise proceed as normal. */
pr->sig = (ide_state->hcyl << 24) |
@@ -551,7 +548,7 @@ static void ahci_init_d2h(AHCIDevice *ad)
(ide_state->sector << 8) |
(ide_state->nsector & 0xFF);
- ahci_write_fis_d2h(ad, init_fis);
+ ahci_write_fis_d2h(ad);
}
static void ahci_set_signature(AHCIDevice *ad, uint32_t sig)
@@ -753,7 +750,7 @@ static void ahci_write_fis_pio(AHCIDevice *ad, uint16_t len)
ahci_trigger_irq(ad->hba, ad, PORT_IRQ_PIOS_FIS);
}
-static void ahci_write_fis_d2h(AHCIDevice *ad, uint8_t *cmd_fis)
+static void ahci_write_fis_d2h(AHCIDevice *ad)
{
AHCIPortRegs *pr = &ad->port_regs;
uint8_t *d2h_fis;
@@ -1401,7 +1398,7 @@ static void ahci_cmd_done(IDEDMA *dma)
DPRINTF(ad->port_no, "cmd done\n");
/* update d2h status */
- ahci_write_fis_d2h(ad, NULL);
+ ahci_write_fis_d2h(ad);
if (!ad->check_bh) {
/* maybe we still have something to process, check later */
--
2.4.3
- [Qemu-devel] [PULL 00/11] Ide patches, John Snow, 2015/09/18
- [Qemu-devel] [PULL 08/11] ahci: remove dead reset code, John Snow, 2015/09/18
- [Qemu-devel] [PULL 05/11] ide-test: add cdrom dma test, John Snow, 2015/09/18
- [Qemu-devel] [PULL 01/11] ide: unify io_buffer_offset increments, John Snow, 2015/09/18
- [Qemu-devel] [PULL 02/11] qtest/ahci: use generate_pattern everywhere, John Snow, 2015/09/18
- [Qemu-devel] [PULL 10/11] ahci: remove cmd_fis argument from write_fis_d2h,
John Snow <=
- [Qemu-devel] [PULL 09/11] ahci: fix signature generation, John Snow, 2015/09/18
- [Qemu-devel] [PULL 07/11] atapi: abort transfers with 0 byte limits, John Snow, 2015/09/18
- [Qemu-devel] [PULL 06/11] ide: fix ATAPI command permissions, John Snow, 2015/09/18
- [Qemu-devel] [PULL 11/11] ahci: clean up initial d2h semantics, John Snow, 2015/09/18
- [Qemu-devel] [PULL 04/11] ide-test: add cdrom pio test, John Snow, 2015/09/18
- [Qemu-devel] [PULL 03/11] qtest/ahci: export generate_pattern, John Snow, 2015/09/18
- Re: [Qemu-devel] [PULL 00/11] Ide patches, Peter Maydell, 2015/09/18