[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 6/8] hw/ide: Do ide_drive_get() within pci_ide_create_devs()
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH 6/8] hw/ide: Do ide_drive_get() within pci_ide_create_devs() |
Date: |
Sat, 14 Mar 2020 11:01:29 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 13/03/20 23:16, BALATON Zoltan wrote:
>>
>> + pci_dev = pci_create_simple(pci_bus, -1, "cmd646-ide");
>> + pci_ide_create_devs(pci_dev);
>
> Additionally, I think it may also make sense to move pci_ide_create_devs
> call into the realize methods of these IDE controllers so boards do not
> need to do it explicitely. These calls always follow the creation of the
> device immediately so could just be done internally in IDE device and
> simplify it further. I can attempt to prepare additional patches for
> that but first I'd like to hear if anyone has anything against that to
> avoid doing useless work.
No, it's better to do it separately. I think that otherwise you could
add another IDE controller with -device, and both controllers would try
to add the drives.
Basically, separating the call means that only automatically added
controllers obey "if=ide".
Paolo
- Re: [PATCH 2/8] hw/ide: Get rid of piix4_init function, (continued)
- [PATCH 8/8] hw/ide: Remove unneeded inclusion of hw/ide.h, BALATON Zoltan, 2020/03/13
- [PATCH 4/8] hw/ide: Move MAX_IDE_BUS define to one header, BALATON Zoltan, 2020/03/13
- [PATCH 3/8] hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h, BALATON Zoltan, 2020/03/13
- [PATCH 7/8] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h, BALATON Zoltan, 2020/03/13
- [PATCH 6/8] hw/ide: Do ide_drive_get() within pci_ide_create_devs(), BALATON Zoltan, 2020/03/13
Re: [PATCH 0/8] Misc hw/ide legacy clean up, Mark Cave-Ayland, 2020/03/14
Re: [PATCH 0/8] Misc hw/ide legacy clean up, Markus Armbruster, 2020/03/16
[PATCH v2] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h, BALATON Zoltan, 2020/03/16