From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MVTpS-0003Bf-Je for qemu-devel@nongnu.org; Mon, 27 Jul 2009 13:17:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MVTpN-00038Z-L2 for qemu-devel@nongnu.org; Mon, 27 Jul 2009 13:17:38 -0400 Received: from [199.232.76.173] (port=53628 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVTpN-00038O-DC for qemu-devel@nongnu.org; Mon, 27 Jul 2009 13:17:33 -0400 Received: from e6.ny.us.ibm.com ([32.97.182.146]:46381) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MVTpM-0001z6-Kz for qemu-devel@nongnu.org; Mon, 27 Jul 2009 13:17:33 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e6.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id n6RHL287024538 for ; Mon, 27 Jul 2009 13:21:02 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n6RHHQEE185558 for ; Mon, 27 Jul 2009 13:17:26 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n6RHEj8M023384 for ; Mon, 27 Jul 2009 13:14:45 -0400 Date: Mon, 27 Jul 2009 12:17:24 -0500 From: Ryan Harper Subject: Re: [Qemu-devel] [PATCH] call ide_reset when resetting the piix Message-ID: <20090727171724.GS21912@us.ibm.com> References: <4A6DD8F0.5060606@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A6DD8F0.5060606@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Naphtali Sprei Cc: qemu-devel@nongnu.org * Naphtali Sprei [2009-07-27 12:13]: > In some cases reboot sequence fails to detect the ide device in the rombios > sequence for ata_detect, since ioport writes are ignored when the > ide device status indicates busy or data request in progres. > The ide if must be reset when system reset. Does this fix any particular bugs? Is this a candidate for stable branch? > > Signed-off-by: Naphtali Sprei > --- > hw/ide.c | 14 ++++++++------ > 1 files changed, 8 insertions(+), 6 deletions(-) > > diff --git a/hw/ide.c b/hw/ide.c > index f3787f2..4bf0987 100644 > --- a/hw/ide.c > +++ b/hw/ide.c > @@ -3352,6 +3352,8 @@ static void piix3_reset(void *opaque) > > for (i = 0; i < 2; i++) > ide_dma_cancel(&d->bmdma[i]); > + for (i = 0; i < 4; i++) > + ide_reset(&d->ide_if[i]); > > pci_conf[0x04] = 0x00; > pci_conf[0x05] = 0x00; > @@ -3383,9 +3385,6 @@ void pci_piix3_ide_init(PCIBus *bus, BlockDriverState **hd_table, int devfn, > pci_config_set_class(pci_conf, PCI_CLASS_STORAGE_IDE); > pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; // header_type > > - qemu_register_reset(piix3_reset, 0, d); > - piix3_reset(d); > - > pci_register_bar((PCIDevice *)d, 4, 0x10, > PCI_ADDRESS_SPACE_IO, bmdma_map); > > @@ -3398,6 +3397,9 @@ void pci_piix3_ide_init(PCIBus *bus, BlockDriverState **hd_table, int devfn, > if (hd_table[i]) > hd_table[i]->private = &d->dev; > > + qemu_register_reset(piix3_reset, 0, d); > + piix3_reset(d); > + > register_savevm("ide", 0, 2, pci_ide_save, pci_ide_load, d); > } > > @@ -3423,9 +3425,6 @@ void pci_piix4_ide_init(PCIBus *bus, BlockDriverState **hd_table, int devfn, > pci_config_set_class(pci_conf, PCI_CLASS_STORAGE_IDE); > pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; // header_type > > - qemu_register_reset(piix3_reset, 0, d); > - piix3_reset(d); > - > pci_register_bar((PCIDevice *)d, 4, 0x10, > PCI_ADDRESS_SPACE_IO, bmdma_map); > > @@ -3434,6 +3433,9 @@ void pci_piix4_ide_init(PCIBus *bus, BlockDriverState **hd_table, int devfn, > ide_init_ioport(&d->ide_if[0], 0x1f0, 0x3f6); > ide_init_ioport(&d->ide_if[2], 0x170, 0x376); > > + qemu_register_reset(piix3_reset, 0, d); > + piix3_reset(d); > + > register_savevm("ide", 0, 2, pci_ide_save, pci_ide_load, d); > } > > -- > 1.5.5.6 > > -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh@us.ibm.com