Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJx9D-0006p5-55 for qemu-devel@nongnu.org; Sun, 13 Dec 2009 17:42:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJx98-0006ob-Mh for qemu-devel@nongnu.org; Sun, 13 Dec 2009 17:42:38 -0500 Received: from [199.232.76.173] (port=49152 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJx98-0006oY-Gl for qemu-devel@nongnu.org; Sun, 13 Dec 2009 17:42:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:63545) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NJx98-0006e7-44 for qemu-devel@nongnu.org; Sun, 13 Dec 2009 17:42:34 -0500 From: Juan Quintela In-Reply-To: (Igor Kovalenko's message of "Mon, 14 Dec 2009 00:14:10 +0300") References: <4B22461602000099000327DE@collaborate.seakr.com> Date: Sun, 13 Dec 2009 23:41:39 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: Bug in Sparc64/IDE Code List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Kovalenko Cc: Blue Swirl , qemu-devel@nongnu.org, Nick Couchman Igor Kovalenko wrote: > On Sun, Dec 13, 2009 at 10:06 PM, Juan Quintela wrote: > Looks good, but runtime aborts in register_ioport_read. > > You cannot install different opaque for read and write of the same i/o address. > Seems like every other device has the same driver for reading and writing, > but in cmd646 it calls out to ide/pci.c code for bmdma_cmd_writeb write > method, whereas it reads with own bmdma_readb_0 method. Grr, another _nice_ interface. I guess that qemu should have a single method for registering both read/write functions. > Probably bmdma_writeb_* should call out to bmdma_cmd_writeb for address 0 > and whole 4 byte is to be mapped to bmdma_writeb_* > > I tested the following fix on top of yours patch with my previous workaround > reverted. Both my workaround and these two combined show the same > qemu.log trace. Nice. Blue can we got this two patches integrated instead of getting back pci_dev? I removed pci_dev from PCIIDEState because it is only used by cmd646. This two new patches just register the right opaque, that is what we need in the first place. Igor, thanks for the testing. Later, Juan.