Revision 80a34d67

b/hw/rtl8139.c
461 461
    uint16_t CpCmd;
462 462
    uint8_t  TxThresh;
463 463

  
464
    int irq;
465 464
    PCIDevice *pci_dev;
466 465
    VLANClientState *vc;
467 466
    uint8_t macaddr[6];
......
685 684
    int isr;
686 685
    isr = (s->IntrStatus & s->IntrMask) & 0xffff;
687 686

  
688
    DEBUG_PRINT(("RTL8139: Set IRQ line %d to %d (%04x %04x)\n",
689
       s->irq, isr ? 1 : 0, s->IntrStatus, s->IntrMask));
687
    DEBUG_PRINT(("RTL8139: Set IRQ to %d (%04x %04x)\n",
688
       isr ? 1 : 0, s->IntrStatus, s->IntrMask));
690 689

  
691
    if (s->irq == 16) {
692
        /* PCI irq */
693
        pci_set_irq(s->pci_dev, 0, (isr != 0));
694
    } else {
695
        /* ISA irq */
696
        pic_set_irq(s->irq, (isr != 0));
697
    }
690
    pci_set_irq(s->pci_dev, 0, (isr != 0));
698 691
}
699 692

  
700 693
#define POLYNOMIAL 0x04c11db6
......
3173 3166
    qemu_put_be16s(f, &s->CpCmd);
3174 3167
    qemu_put_8s(f, &s->TxThresh);
3175 3168

  
3176
    qemu_put_be32s(f, &s->irq);
3169
    i = 0;
3170
    qemu_put_be32s(f, &i); /* unused.  */
3177 3171
    qemu_put_buffer(f, s->macaddr, 6);
3178 3172
    qemu_put_be32s(f, &s->rtl8139_mmio_io_addr);
3179 3173

  
......
3267 3261
    qemu_get_be16s(f, &s->CpCmd);
3268 3262
    qemu_get_8s(f, &s->TxThresh);
3269 3263

  
3270
    qemu_get_be32s(f, &s->irq);
3264
    qemu_get_be32s(f, &i); /* unused.  */
3271 3265
    qemu_get_buffer(f, s->macaddr, 6);
3272 3266
    qemu_get_be32s(f, &s->rtl8139_mmio_io_addr);
3273 3267

  
......
3447 3441
    pci_register_io_region(&d->dev, 1, 0x100, 
3448 3442
                           PCI_ADDRESS_SPACE_MEM, rtl8139_mmio_map);
3449 3443

  
3450
    s->irq = 16; /* PCI interrupt */
3451 3444
    s->pci_dev = (PCIDevice *)d;
3452 3445
    memcpy(s->macaddr, nd->macaddr, 6);
3453 3446
    rtl8139_reset(s);

Also available in: Unified diff