qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 03/66] dma: keep a device alive while it has SGL


From: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH 03/66] dma: keep a device alive while it has SGLists
Date: Thu, 04 Jul 2013 18:17:03 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]