cvs commit: src/sys/dev/pci pci.c

John Baldwin jhb at FreeBSD.org
Sat Jun 7 08:06:55 PDT 2003


On 07-Jun-2003 John Baldwin wrote:
> 
> On 07-Jun-2003 John Baldwin wrote:
>> jhb         2003/06/07 08:00:19 PDT
>> 
>>   FreeBSD src repository
>> 
>>   Modified files:
>>     sys/dev/pci          pci.c 
>>   Log:
>>   - Adjust the comment about re-routing PCI interrupts to be less
>>     ia64-specific.
>>   - When trying to re-route interrupts, don't change cfg->intline if the
>>     re-route fails by returning an invalid vector.  This fixes machines
>>     without any way of routing interrupts such as older PC's without a
>>     $PIR table.
>>   
>>   We do not currently write the new intline value back to the hardware, but
>>   we should.  That will likely be added in a later commit.
> 
> I committed this now to fix machines w/o $PIR tables.  I will try to work
> on a patch to write the new interrupt back to the hardware.

Looks like this:

Index: pci.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/pci/pci.c,v
retrieving revision 1.217
diff -u -r1.217 pci.c
--- pci.c       7 Jun 2003 15:00:19 -0000       1.217
+++ pci.c       7 Jun 2003 15:06:25 -0000
@@ -806,9 +806,10 @@
                 * have.
                 */
                irq = PCIB_ROUTE_INTERRUPT(pcib, dev, cfg->intpin);
-               if (PCI_INTERRUPT_VALID(irq))
+               if (PCI_INTERRUPT_VALID(irq)) {
+                       pci_write_config(dev, PCIR_INTLINE, irq, 1);
                        cfg->intline = irq;
-               else
+               } else
 #endif
                        irq = cfg->intline;
                resource_list_add(rl, SYS_RES_IRQ, 0, irq, irq, 1);

-- 

John Baldwin <jhb at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


More information about the cvs-src mailing list