Fixed the type of ahcintr(). The type of an ISA interrupt handler is

incompatible with the type of a PCI interrupt handler.  A new entry
point `ahc_pci_intr()' is used for PCI.  ISA and PCI interrupts are
penalized equally (:-) by calling a common handler `ahc_intr()'.  This
should be reorganized.  Some strings now name the wrong function...
This commit is contained in:
Bruce Evans 1995-11-04 14:43:30 +00:00
parent fff87b3946
commit 2e8300f1f6
3 changed files with 20 additions and 7 deletions

View File

@ -24,7 +24,7 @@
*
* commenced: Sun Sep 27 18:14:01 PDT 1992
*
* $Id: aic7xxx.c,v 1.41 1995/10/29 05:57:48 gibbs Exp $
* $Id: aic7xxx.c,v 1.42 1995/10/31 18:41:49 phk Exp $
*/
/*
* TODO:
@ -1051,8 +1051,8 @@ void ahc_add_waiting_scb (iobase, scb, where)
/*
* Catch an interrupt from the adaptor
*/
int
ahcintr(unit)
static int
ahc_intr(unit)
int unit;
{
int intstat;
@ -1694,6 +1694,19 @@ ahcintr(unit)
return 1;
}
void
ahcintr(unit)
int unit;
{
ahc_intr(unit);
}
int
ahc_pci_intr(vunit)
void *vunit;
{
return (ahc_intr((int)vunit));
}
static int
enable_seeprom(u_long offset,

View File

@ -20,7 +20,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
* $Id: aic7xxx.h,v 1.13 1995/09/05 23:52:03 gibbs Exp $
* $Id: aic7xxx.h,v 1.14 1995/10/26 23:57:18 gibbs Exp $
*/
#ifndef _AIC7XXX_H_
@ -176,6 +176,6 @@ extern struct ahc_data *ahcdata[NAHC];
int ahcprobe __P((int unit, u_long io_base, ahc_type type, ahc_flag flags));
int ahc_attach __P((int unit));
int ahcintr();
int ahc_pci_intr __P((void *vunit));
#endif /* _AIC7XXX_H_ */

View File

@ -19,7 +19,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
* $Id: aic7870.c,v 1.15 1995/10/08 17:46:11 gibbs Exp $
* $Id: aic7870.c,v 1.16 1995/10/26 23:58:59 gibbs Exp $
*/
#include <pci.h>
@ -176,7 +176,7 @@ aic7870_attach(config_id, unit)
* interrupt handler, we pass the unit number
* not a pointer to our per device structure.
*/
if(!(pci_map_int(config_id, ahcintr, (void *)unit,
if(!(pci_map_int(config_id, ahc_pci_intr, (void *)unit,
&bio_imask))) {
free(ahcdata[unit], M_TEMP);
ahcdata[unit] = NULL;