[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
- [Qemu-devel] [PULL 00/66] Memory API changes for 1.6: ownership, I/O ports, RCU preparation, Paolo Bonzini, 2013/07/04
- [Qemu-devel] [PATCH 04/66] adlib: replace register_ioport*, Paolo Bonzini, 2013/07/04
- [Qemu-devel] [PATCH 05/66] applesmc: replace register_ioport*, Paolo Bonzini, 2013/07/04
- [Qemu-devel] [PATCH 06/66] wdt_ib700: replace register_ioport*, Paolo Bonzini, 2013/07/04
- [Qemu-devel] [PATCH 07/66] i82374: replace register_ioport*, Paolo Bonzini, 2013/07/04
- [Qemu-devel] [PATCH 08/66] prep: replace register_ioport*, Paolo Bonzini, 2013/07/04
- [Qemu-devel] [PATCH 09/66] vt82c686: replace register_ioport*, Paolo Bonzini, 2013/07/04
- [Qemu-devel] [PATCH 10/66] Privatize register_ioport_read/write, Paolo Bonzini, 2013/07/04
- [Qemu-devel] [PATCH 11/66] isa: implement isa_is_ioport_assigned via memory_region_find, Paolo Bonzini, 2013/07/04
- [Qemu-devel] [PATCH 12/66] vmware-vga: Accept unaligned I/O accesses, Paolo Bonzini, 2013/07/04
- [Qemu-devel] [PATCH 13/66] xen: Mark fixed platform I/O as unaligned, Paolo Bonzini, 2013/07/04