Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Jun 2003 11:06:50 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   RE: cvs commit: src/sys/dev/pci pci.c
Message-ID:  <XFMail.20030607110650.jhb@FreeBSD.org>
In-Reply-To: <XFMail.20030607110134.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030607110650.jhb>