From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UumDV-0001k5-3Q for qemu-devel@nongnu.org; Thu, 04 Jul 2013 12:17:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UumDT-0004Q1-8w for qemu-devel@nongnu.org; Thu, 04 Jul 2013 12:17:08 -0400 Received: from david.siemens.de ([192.35.17.14]:26522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UumDS-0004OY-TM for qemu-devel@nongnu.org; Thu, 04 Jul 2013 12:17:07 -0400 Message-ID: <51D59FFF.7040701@siemens.com> Date: Thu, 04 Jul 2013 18:17:03 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1372950842-32422-1-git-send-email-pbonzini@redhat.com> <1372950842-32422-4-git-send-email-pbonzini@redhat.com> <51D599F1.8040700@siemens.com> <51D59C20.1070101@redhat.com> In-Reply-To: <51D59C20.1070101@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 03/66] dma: keep a device alive while it has SGLists List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: "qemu-devel@nongnu.org" , =?ISO-8859-15?Q?Andreas_F=E4rber?= , Gerd Hoffmann On 2013-07-04 18:00, Paolo Bonzini wrote: > Il 04/07/2013 17:51, Jan Kiszka ha scritto: >>>> diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c >>>> index 16d6356..65e6680 100644 >>>> --- a/hw/usb/hcd-ehci.c >>>> +++ b/hw/usb/hcd-ehci.c >>>> @@ -1245,7 +1245,7 @@ static int ehci_init_transfer(EHCIPacket *p) >>>> cpage = get_field(p->qtd.token, QTD_TOKEN_CPAGE); >>>> bytes = get_field(p->qtd.token, QTD_TOKEN_TBYTES); >>>> offset = p->qtd.bufptr[0] & ~QTD_BUFPTR_MASK; >>>> - qemu_sglist_init(&p->sgl, 5, p->queue->ehci->as); >>>> + qemu_sglist_init(&p->sgl, DEVICE(p->queue->ehci), 5, p->queue->ehci->as); >> I was just testing this from your current git tree, and it causes >> >> qemu/hw/usb/hcd-ehci.c:1248:ehci_init_transfer: Object 0x7f3eb39c6500 is >> not an instance of type device >> >> when booting a q35 machine (as it pulls in EHCI). The cast is obviously >> wrong, but I didn't spot yet what is required instead. > > EHCIState and AHCIDevice are not qdev structs. You need to go > through the bus to get the DeviceState. But I had fixed this once... > > /me checks > > Yes, I had fixed it at the same time I fixed Andreas's requested > BUS(). I thought I had fixed it _before_ posting this patch first. > > Pulling in the "Reviewed-by"s (as I just replied to the cover > letter) also pulled in the right version of the patch. So it > should be fixed _now_ in git (commit c7086b4a). > > I tested both AHCI and EHCI and they work. Yes, it's now fine here as well. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux