SMP and the aic7xxx driver

Doug Ledford dledford at dialnet.net
Wed Apr 22 05:19:06 PDT 1998


Warren W. Thompson wrote:
> 
> Okay,
> 
> I obtained and compiled the 2.1.97 with the aic7xxx driver built into
> the kernel and SMP turned off by commenting out the "SMP = 1" line from
> the Linux source's root makefile. It worked just fine, below is the
> result of the driver loading under kernel 2.1.97 with SMP disabled:
> 
> (scsi0) <Adaptec AIC-7880 Ultra SCSI host adapter> found at PCI 12/0
> (scsi0) Narrow Channel, SCSI ID=7, 16/255 SCBs
> (scsi0) BIOS enabled, IO Port 0x6400, IRQ 11


> For the next build the only change I made was uncommenting the "SMP = 1"
> line from the makefile and recompiling. It did not work, it seems to
> have incorrectly gotten the IRQ of the scsi card again. The following is
> the result of the driver loading under kernel 2.1.97 with SMP enabled:
> 
> (scsi0) <Adaptec AIC-7880 Ultra SCSI host adapter> found at PCI 12/0
> (scsi0) Narrow Channel, SCSI ID=7, 16/255 SCBs
> (scsi0) BIOS enabled, IO Port 0x6400, IRQ 16
> (scsi0) IO Memory at 0xe4000000, MMAP Memory at 0xc8800000
> (scsi0) Resetting channel
> (scsi0) Downloading sequencer code... 413 instructions downloaded
> scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 5.0.13/3.2.4
>        <Adaptec AIC-7880 Ultra SCSI host adapter>
> scsi : 1 host.
> (scsi0:0:-1:-1) Scanning channel for devices.
> <At this point the system hangs indefinitely>
> 
> Notice that the IRQ location that works is 11 and the one detected by
> the SMP driver is 16...Hmmmm. Well, I hope you can give me some insight
> into why this may be occurring and what, if anything, can be done to fix
> it. I'm even up for hardcoding the scsi device's IRQ under SMP if that
> will get it up.
> 
> Thanks in advance!

OK...the reason for the IRQ difference is the IO-APIC code in 2.1.85 and
up.  There also is the change in the pci_* functions for versions 2.1.95 and
up.  In the aic7xxx driver, for version 2.1.97, the only difference between
SMP and UP compiles is that we include some extra header files for smp
operation, but the defines in those headers files aren't used at the
moment.  So, there currently is absolutely *0* difference in the aic7xxx
driver for SMP and UP compiles.  What this indicates to me is that we aren't
getting our interrupt on SMP kernels with your motherboard.  This can be for
one of two reasons, the IO-APIC code is mistakenly mapping the IO-APIC IRQ
to a pin that isn't connected, or because the pci_* functions and the
associated pci_device structure has the wrong IRQ number in it.  There are
two #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,95) lines in the aic7xxx.c
file that can be changed to test this idea.  The first one wraps a #include
<linux/bios32.h> directive, the other is found in aic7xxx_detect().  If you
can change those to something like

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,99)

to see if that makes a difference in the SMP case.  BTW, there are more than
just these two #if LINUX_VERSION_CODE statements for 2.1.95, but the others
shouldn't be changed, just the one around the bios32.h include and the one
in aic7xxx_detect().

Let me know if that helps, if it does, then it would indicate a problem in
the new pci_* functions as oppossed to the IO-APIC code, if it doesn't, then
it's probably in the IO_APIC code.

-- 

 Doug Ledford  <dledford at dialnet.net>
  Opinions expressed are my own, but
     they should be everybody's.

To Unsubscribe: send mail to majordomo at FreeBSD.org
with "unsubscribe aic7xxx" in the body of the message



More information about the aic7xxx mailing list