pci: interrupt pin documentation update
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 11 Sep 2011 10:40:23 +0000 (13:40 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 19 Sep 2011 18:22:29 +0000 (21:22 +0300)
Fix up some erroneous comments in code:
interrupt pins are named A-D, the
interrupt pin register is always readonly
and isn't zeroed out on reset.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/ac97.c
hw/e1000.c
hw/es1370.c
hw/lsi53c895a.c
hw/ne2000.c
hw/pcnet-pci.c
hw/rtl8139.c
hw/usb-ehci.c
hw/usb-ohci.c
hw/usb-uhci.c

index 541d9a4b97f321650effaa9b81b3e122f49eb19a..bc69d4e3452480fe6d6c42002224306143a8287a 100644 (file)
--- a/hw/ac97.c
+++ b/hw/ac97.c
@@ -1311,7 +1311,6 @@ static int ac97_initfn (PCIDevice *dev)
     c[PCI_SUBSYSTEM_ID + 1] = 0x00;
 
     c[PCI_INTERRUPT_LINE] = 0x00;      /* intr_ln interrupt line rw */
-    /* TODO: RST# value should be 0. */
     c[PCI_INTERRUPT_PIN] = 0x01;      /* intr_pn interrupt pin ro */
 
     memory_region_init_io (&s->io_nam, &ac97_io_nam_ops, s, "ac97-nam", 1024);
index a6d12c55fbbcb221d33367a25b60db452f7b3d17..6a3a941488fa3d431a82ee7b3b2f44aeee16b72c 100644 (file)
@@ -1156,8 +1156,7 @@ static int pci_e1000_init(PCIDevice *pci_dev)
     /* TODO: RST# value should be 0, PCI spec 6.2.4 */
     pci_conf[PCI_CACHE_LINE_SIZE] = 0x10;
 
-    /* TODO: RST# value should be 0 if programmable, PCI spec 6.2.4 */
-    pci_conf[PCI_INTERRUPT_PIN] = 1; // interrupt pin 0
+    pci_conf[PCI_INTERRUPT_PIN] = 1; /* interrupt pin A */
 
     e1000_mmio_setup(d);
 
index a9387d15cc25597321e0555e4c815a34a79674a4..2daadde0e6bdbfa4a09dcd2c552db45db0a062ae 100644 (file)
@@ -1003,7 +1003,6 @@ static int es1370_initfn (PCIDevice *dev)
     c[0xdc] = 0x00;
 #endif
 
-    /* TODO: RST# value should be 0. */
     c[PCI_INTERRUPT_PIN] = 1;
     c[PCI_MIN_GNT] = 0x0c;
     c[PCI_MAX_LAT] = 0x80;
index dbb3bdf2ceb07b071bb0f053af9518a64cbde073..75a03a74b956e0e124fcad9942b486b077b29f7b 100644 (file)
@@ -2106,8 +2106,7 @@ static int lsi_scsi_init(PCIDevice *dev)
 
     /* PCI latency timer = 255 */
     pci_conf[PCI_LATENCY_TIMER] = 0xff;
-    /* TODO: RST# value should be 0 */
-    /* Interrupt pin 1 */
+    /* Interrupt pin A */
     pci_conf[PCI_INTERRUPT_PIN] = 0x01;
 
     memory_region_init_io(&s->mmio_io, &lsi_mmio_ops, s, "lsi-mmio", 0x400);
index a035a852441a65ad664b8034fcc13bc12dda5090..62e082f8a93df7dcb6004deca269c53ea00367dc 100644 (file)
@@ -749,8 +749,7 @@ static int pci_ne2000_init(PCIDevice *pci_dev)
     uint8_t *pci_conf;
 
     pci_conf = d->dev.config;
-    /* TODO: RST# value should be 0. PCI spec 6.2.4 */
-    pci_conf[PCI_INTERRUPT_PIN] = 1; // interrupt pin 0
+    pci_conf[PCI_INTERRUPT_PIN] = 1; /* interrupt pin A */
 
     s = &d->ne2000;
     ne2000_setup_io(s, 0x100);
index 51e132050f2407832d8f60078cd3dcf4aeed5b32..fb2a00caad43cafd5e8b248ce05f087740c346af 100644 (file)
@@ -285,7 +285,7 @@ static int pci_pcnet_init(PCIDevice *pci_dev)
     pci_set_word(pci_conf + PCI_SUBSYSTEM_VENDOR_ID, 0x0);
     pci_set_word(pci_conf + PCI_SUBSYSTEM_ID, 0x0);
 
-    pci_conf[PCI_INTERRUPT_PIN] = 1; // interrupt pin 0
+    pci_conf[PCI_INTERRUPT_PIN] = 1; /* interrupt pin A */
     pci_conf[PCI_MIN_GNT] = 0x06;
     pci_conf[PCI_MAX_LAT] = 0xff;
 
index c5de5b48bad454cdd5e0c14459e24e11a4005c14..37539508c5957293256bfee5f5d1077e2e24ff97 100644 (file)
@@ -3464,7 +3464,7 @@ static int pci_rtl8139_init(PCIDevice *dev)
     uint8_t *pci_conf;
 
     pci_conf = s->dev.config;
-    pci_conf[PCI_INTERRUPT_PIN] = 1;    /* interrupt pin 0 */
+    pci_conf[PCI_INTERRUPT_PIN] = 1;    /* interrupt pin A */
     /* TODO: start of capability list, but no capability
      * list bit in status register, and offset 0xdc seems unused. */
     pci_conf[PCI_CAPABILITY_LIST] = 0xdc;
index e9e0789795e0d3d4509ed6ef736043d216400ab8..27376a2351b0d96490358ad2fe266643ba93a0d6 100644 (file)
@@ -2291,7 +2291,7 @@ static int usb_ehci_initfn(PCIDevice *dev)
     pci_set_byte(&pci_conf[PCI_CAPABILITY_LIST], 0x00);
     //pci_set_byte(&pci_conf[PCI_CAPABILITY_LIST], 0x50);
 
-    pci_set_byte(&pci_conf[PCI_INTERRUPT_PIN], 4); // interrupt pin 3
+    pci_set_byte(&pci_conf[PCI_INTERRUPT_PIN], 4); /* interrupt pin D */
     pci_set_byte(&pci_conf[PCI_MIN_GNT], 0);
     pci_set_byte(&pci_conf[PCI_MAX_LAT], 0);
 
index 503ca2d31f646455ac70b84dddc4f57f64203483..c3be65a2e9f34589331cbbdd6e61aa9af5522b77 100644 (file)
@@ -1780,8 +1780,7 @@ static int usb_ohci_initfn_pci(struct PCIDevice *dev)
     OHCIPCIState *ohci = DO_UPCAST(OHCIPCIState, pci_dev, dev);
 
     ohci->pci_dev.config[PCI_CLASS_PROG] = 0x10; /* OHCI */
-    /* TODO: RST# value should be 0. */
-    ohci->pci_dev.config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin 1 */
+    ohci->pci_dev.config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin A */
 
     if (usb_ohci_init(&ohci->state, &dev->qdev, ohci->num_ports, 0,
                       ohci->masterbus, ohci->firstport) != 0) {
index 64f7b36c00dd6d180cbc102b5c5db48c5ff274f8..17992cf003549e08e2555511e70d643d810ed725 100644 (file)
@@ -1131,7 +1131,7 @@ static int usb_uhci_common_initfn(PCIDevice *dev)
 
     pci_conf[PCI_CLASS_PROG] = 0x00;
     /* TODO: reset value should be 0. */
-    pci_conf[PCI_INTERRUPT_PIN] = 4; // interrupt pin 3
+    pci_conf[PCI_INTERRUPT_PIN] = 4; /* interrupt pin D */
     pci_conf[USB_SBRN] = USB_RELEASE_1; // release number
 
     if (s->masterbus) {