Revision 7165448a hw/rtl8139.c

b/hw/rtl8139.c
1189 1189

  
1190 1190
    rtl8139_update_irq(s);
1191 1191

  
1192
    /* prepare eeprom */
1193
    s->eeprom.contents[0] = 0x8129;
1194
#if 1
1195
    // PCI vendor and device ID should be mirrored here
1196
    s->eeprom.contents[1] = PCI_VENDOR_ID_REALTEK;
1197
    s->eeprom.contents[2] = PCI_DEVICE_ID_REALTEK_8139;
1198
#endif
1199

  
1200
    s->eeprom.contents[7] = s->conf.macaddr.a[0] | s->conf.macaddr.a[1] << 8;
1201
    s->eeprom.contents[8] = s->conf.macaddr.a[2] | s->conf.macaddr.a[3] << 8;
1202
    s->eeprom.contents[9] = s->conf.macaddr.a[4] | s->conf.macaddr.a[5] << 8;
1203

  
1204 1192
    /* mark all status registers as owned by host */
1205 1193
    for (i = 0; i < 4; ++i)
1206 1194
    {
......
3392 3380

  
3393 3381
    qemu_macaddr_default_if_unset(&s->conf.macaddr);
3394 3382

  
3383
    /* prepare eeprom */
3384
    s->eeprom.contents[0] = 0x8129;
3385
#if 1
3386
    /* PCI vendor and device ID should be mirrored here */
3387
    s->eeprom.contents[1] = PCI_VENDOR_ID_REALTEK;
3388
    s->eeprom.contents[2] = PCI_DEVICE_ID_REALTEK_8139;
3389
#endif
3390
    s->eeprom.contents[7] = s->conf.macaddr.a[0] | s->conf.macaddr.a[1] << 8;
3391
    s->eeprom.contents[8] = s->conf.macaddr.a[2] | s->conf.macaddr.a[3] << 8;
3392
    s->eeprom.contents[9] = s->conf.macaddr.a[4] | s->conf.macaddr.a[5] << 8;
3393

  
3395 3394
    s->nic = qemu_new_nic(&net_rtl8139_info, &s->conf,
3396 3395
                          dev->qdev.info->name, dev->qdev.id, s);
3397 3396
    qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);

Also available in: Unified diff