Commit c1e1a491906bd1d769edb16f2b2be7ff6833d26f
1 parent
253bd7f8
ETRAX: Always provide a valid net model.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6226 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
8 additions
and
2 deletions
hw/axis_dev88.c
@@ -303,9 +303,12 @@ void axisdev88_init (ram_addr_t ram_size, int vga_ram_size, | @@ -303,9 +303,12 @@ void axisdev88_init (ram_addr_t ram_size, int vga_ram_size, | ||
303 | } | 303 | } |
304 | 304 | ||
305 | /* Add the two ethernet blocks. */ | 305 | /* Add the two ethernet blocks. */ |
306 | + nd_table[0].model = nd_table[0].model ? nd_table[0].model : "fseth"; | ||
306 | eth[0] = etraxfs_eth_init(&nd_table[0], env, pic->irq + 25, 0x30034000); | 307 | eth[0] = etraxfs_eth_init(&nd_table[0], env, pic->irq + 25, 0x30034000); |
307 | - if (nb_nics > 1) | 308 | + if (nb_nics > 1) { |
309 | + nd_table[1].model = nd_table[1].model ? nd_table[1].model : "fseth"; | ||
308 | eth[1] = etraxfs_eth_init(&nd_table[1], env, pic->irq + 26, 0x30036000); | 310 | eth[1] = etraxfs_eth_init(&nd_table[1], env, pic->irq + 26, 0x30036000); |
311 | + } | ||
309 | 312 | ||
310 | /* The DMA Connector block is missing, hardwire things for now. */ | 313 | /* The DMA Connector block is missing, hardwire things for now. */ |
311 | etraxfs_dmac_connect_client(etraxfs_dmac, 0, eth[0]); | 314 | etraxfs_dmac_connect_client(etraxfs_dmac, 0, eth[0]); |
hw/etraxfs.c
@@ -94,9 +94,12 @@ void bareetraxfs_init (ram_addr_t ram_size, int vga_ram_size, | @@ -94,9 +94,12 @@ void bareetraxfs_init (ram_addr_t ram_size, int vga_ram_size, | ||
94 | } | 94 | } |
95 | 95 | ||
96 | /* Add the two ethernet blocks. */ | 96 | /* Add the two ethernet blocks. */ |
97 | + nd_table[0].model = nd_table[0].model ? nd_table[0].model : "fseth"; | ||
97 | eth[0] = etraxfs_eth_init(&nd_table[0], env, pic->irq + 25, 0x30034000); | 98 | eth[0] = etraxfs_eth_init(&nd_table[0], env, pic->irq + 25, 0x30034000); |
98 | - if (nb_nics > 1) | 99 | + if (nb_nics > 1) { |
100 | + nd_table[1].model = nd_table[1].model ? nd_table[1].model : "fseth"; | ||
99 | eth[1] = etraxfs_eth_init(&nd_table[1], env, pic->irq + 26, 0x30036000); | 101 | eth[1] = etraxfs_eth_init(&nd_table[1], env, pic->irq + 26, 0x30036000); |
102 | + } | ||
100 | 103 | ||
101 | /* The DMA Connector block is missing, hardwire things for now. */ | 104 | /* The DMA Connector block is missing, hardwire things for now. */ |
102 | etraxfs_dmac_connect_client(etraxfs_dmac, 0, eth[0]); | 105 | etraxfs_dmac_connect_client(etraxfs_dmac, 0, eth[0]); |