* [Qemu-devel] [PATCH v2] nic: zap obsolote romloading bits from ne2k + pcnet
@ 2012-02-08 15:02 Gerd Hoffmann
2012-02-24 10:33 ` Gerd Hoffmann
2012-02-24 19:48 ` Anthony Liguori
0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2012-02-08 15:02 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
These days one just needs to specify the romfile in PCiDeviceInfo and
everything magically works. It also allows to disable pxe rom loading
via "romfile=<emptystring>" like it is possible for all other nics.
[ v2: rebased & adapted to qom changes ]
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/ne2000.c | 9 +--------
hw/pcnet-pci.c | 9 +--------
2 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/hw/ne2000.c b/hw/ne2000.c
index 080811e..c4b574d 100644
--- a/hw/ne2000.c
+++ b/hw/ne2000.c
@@ -763,14 +763,6 @@ static int pci_ne2000_init(PCIDevice *pci_dev)
object_get_typename(OBJECT(pci_dev)), pci_dev->qdev.id, s);
qemu_format_nic_info_str(&s->nic->nc, s->c.macaddr.a);
- if (!pci_dev->qdev.hotplugged) {
- static int loaded = 0;
- if (!loaded) {
- rom_add_option("pxe-ne2k_pci.rom", -1);
- loaded = 1;
- }
- }
-
add_boot_device_path(s->c.bootindex, &pci_dev->qdev, "/ethernet-phy@0");
return 0;
@@ -798,6 +790,7 @@ static void ne2000_class_init(ObjectClass *klass, void *data)
k->init = pci_ne2000_init;
k->exit = pci_ne2000_exit;
+ k->romfile = "pxe-ne2k_pci.rom",
k->vendor_id = PCI_VENDOR_ID_REALTEK;
k->device_id = PCI_DEVICE_ID_REALTEK_8029;
k->class_id = PCI_CLASS_NETWORK_ETHERNET;
diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c
index 439f32c..6f4755d 100644
--- a/hw/pcnet-pci.c
+++ b/hw/pcnet-pci.c
@@ -330,14 +330,6 @@ static int pci_pcnet_init(PCIDevice *pci_dev)
s->phys_mem_write = pci_physical_memory_write;
s->dma_opaque = pci_dev;
- if (!pci_dev->qdev.hotplugged) {
- static int loaded = 0;
- if (!loaded) {
- rom_add_option("pxe-pcnet.rom", -1);
- loaded = 1;
- }
- }
-
return pcnet_common_init(&pci_dev->qdev, s, &net_pci_pcnet_info);
}
@@ -360,6 +352,7 @@ static void pcnet_class_init(ObjectClass *klass, void *data)
k->init = pci_pcnet_init;
k->exit = pci_pcnet_uninit;
+ k->romfile = "pxe-pcnet.rom",
k->vendor_id = PCI_VENDOR_ID_AMD;
k->device_id = PCI_DEVICE_ID_AMD_LANCE;
k->revision = 0x10;
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] nic: zap obsolote romloading bits from ne2k + pcnet
2012-02-08 15:02 [Qemu-devel] [PATCH v2] nic: zap obsolote romloading bits from ne2k + pcnet Gerd Hoffmann
@ 2012-02-24 10:33 ` Gerd Hoffmann
2012-02-24 19:48 ` Anthony Liguori
1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2012-02-24 10:33 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On 02/08/12 16:02, Gerd Hoffmann wrote:
> These days one just needs to specify the romfile in PCiDeviceInfo and
> everything magically works. It also allows to disable pxe rom loading
> via "romfile=<emptystring>" like it is possible for all other nics.
>
> [ v2: rebased & adapted to qom changes ]
ping?
cheers,
Gerd
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] nic: zap obsolote romloading bits from ne2k + pcnet
2012-02-08 15:02 [Qemu-devel] [PATCH v2] nic: zap obsolote romloading bits from ne2k + pcnet Gerd Hoffmann
2012-02-24 10:33 ` Gerd Hoffmann
@ 2012-02-24 19:48 ` Anthony Liguori
1 sibling, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2012-02-24 19:48 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On 02/08/2012 09:02 AM, Gerd Hoffmann wrote:
> These days one just needs to specify the romfile in PCiDeviceInfo and
> everything magically works. It also allows to disable pxe rom loading
> via "romfile=<emptystring>" like it is possible for all other nics.
>
> [ v2: rebased& adapted to qom changes ]
>
> Signed-off-by: Gerd Hoffmann<kraxel@redhat.com>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> hw/ne2000.c | 9 +--------
> hw/pcnet-pci.c | 9 +--------
> 2 files changed, 2 insertions(+), 16 deletions(-)
>
> diff --git a/hw/ne2000.c b/hw/ne2000.c
> index 080811e..c4b574d 100644
> --- a/hw/ne2000.c
> +++ b/hw/ne2000.c
> @@ -763,14 +763,6 @@ static int pci_ne2000_init(PCIDevice *pci_dev)
> object_get_typename(OBJECT(pci_dev)), pci_dev->qdev.id, s);
> qemu_format_nic_info_str(&s->nic->nc, s->c.macaddr.a);
>
> - if (!pci_dev->qdev.hotplugged) {
> - static int loaded = 0;
> - if (!loaded) {
> - rom_add_option("pxe-ne2k_pci.rom", -1);
> - loaded = 1;
> - }
> - }
> -
> add_boot_device_path(s->c.bootindex,&pci_dev->qdev, "/ethernet-phy@0");
>
> return 0;
> @@ -798,6 +790,7 @@ static void ne2000_class_init(ObjectClass *klass, void *data)
>
> k->init = pci_ne2000_init;
> k->exit = pci_ne2000_exit;
> + k->romfile = "pxe-ne2k_pci.rom",
> k->vendor_id = PCI_VENDOR_ID_REALTEK;
> k->device_id = PCI_DEVICE_ID_REALTEK_8029;
> k->class_id = PCI_CLASS_NETWORK_ETHERNET;
> diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c
> index 439f32c..6f4755d 100644
> --- a/hw/pcnet-pci.c
> +++ b/hw/pcnet-pci.c
> @@ -330,14 +330,6 @@ static int pci_pcnet_init(PCIDevice *pci_dev)
> s->phys_mem_write = pci_physical_memory_write;
> s->dma_opaque = pci_dev;
>
> - if (!pci_dev->qdev.hotplugged) {
> - static int loaded = 0;
> - if (!loaded) {
> - rom_add_option("pxe-pcnet.rom", -1);
> - loaded = 1;
> - }
> - }
> -
> return pcnet_common_init(&pci_dev->qdev, s,&net_pci_pcnet_info);
> }
>
> @@ -360,6 +352,7 @@ static void pcnet_class_init(ObjectClass *klass, void *data)
>
> k->init = pci_pcnet_init;
> k->exit = pci_pcnet_uninit;
> + k->romfile = "pxe-pcnet.rom",
> k->vendor_id = PCI_VENDOR_ID_AMD;
> k->device_id = PCI_DEVICE_ID_AMD_LANCE;
> k->revision = 0x10;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-24 19:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-08 15:02 [Qemu-devel] [PATCH v2] nic: zap obsolote romloading bits from ne2k + pcnet Gerd Hoffmann
2012-02-24 10:33 ` Gerd Hoffmann
2012-02-24 19:48 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).