Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

kernel/2879: Adaptec AVA-1502 not supported.

From: <Anders(at)Arnholm.nu>
Date: Wed Aug 14 2002 - 05:45:15 EDT


>Number: 2879
>Category: kernel
>Synopsis: Adaptec AVA-1502 not supported.
>Confidential: no

      o_   Anders Arnholm,               HiQ - Consultant
 o/  /\    anders@arnholm.nu             Phone  : +46-703-160969
/|_, \\    
http://anders.arnholm.nu/     
http://www.hiq.se
/
`
>Environment:
        
	System      : OpenBSD 3.1 and -current
	Architecture: OpenBSD.i386
	Machine     : i386

>Description:
The scsi-interface card AVA-1502 from Adaptec (yes I know they don't have it on there homepage). Isn't recogniced by the OpenBSD kernel. The card is almost the same as AVA-1505 but an special variants sold to OEM products makers. It's a cheep isa-pnp card, and as this card isn't supported by adaptect getting a configure program for this old card is almost inpossible. On the card is the same scsi chip as on AVA1505 (aic6360, or atleasta chip that looks a loot like that chip) adding a configuration for the card so thatr the aic interface probes on the efault isa-pnp values for the card does make the aic-driver find the card and configure it. But then the isapnp driver dosn't know about this and reconfigures the card to a secondary configuration.
>How-To-Repeat:
Insert an AVA-1502 scsi iterface card in an old machine. The kernel will boot but the interface card isn't recogniced.
>Fix:
Make the aic driver isa-pnp aware and add the signature of the card to pnp configured devices. I'm trying to add a patch against currect that does this in this mail. The patch is also availible from: http://tika.arnholm.nu/~balp/aic-isapnp-bugreport.diff

Index: sys/dev/isa/isapnp.c



RCS file: /cvs/src/sys/dev/isa/isapnp.c,v retrieving revision 1.34
diff -c -r1.34 isapnp.c
*** sys/dev/isa/isapnp.c	2002/07/07 18:20:00	1.34
--- sys/dev/isa/isapnp.c	2002/08/14 09:00:01

  • 617,632 **** --- 617,643 ---- for (i = 0; i < sizeof(isapnp_knowndevs)/sizeof(isapnp_knowndevs[0]); i++) { dname = NULL;
+ #if 0
+ 		DPRINTF(("isapnp: known %s and %s (or %s)\n",
+ 			 isapnp_knowndevs[i].pnpid, ipa->ipa_devlogic,
+ 			 ipa->ipa_devcompat));
+ #endif
  		if (strcmp(isapnp_knowndevs[i].pnpid, ipa->ipa_devlogic) == 0)
  			dname = isapnp_knowndevs[i].driver;
  		else if (strcmp(isapnp_knowndevs[i].pnpid, ipa->ipa_devcompat) == 0)
  			dname = isapnp_knowndevs[i].driver;
Do you need help?X
+ #if 0 + DPRINTF(("isapnp0: compare %s and %s\n", + dname, cf->cf_driver->cd_name)); + #endif if (dname && strcmp(dname, cf->cf_driver->cd_name) == 0) { /* * We found a match. Configure the card and call the * ISA probe... */ + DPRINTF(("isapnp: Config card %s using %s\n", + ipa->ipa_devlogic, dname)); if (isapnp_config(ipa->ia_iot, ipa->ia_memt, ipa)) { printf("%s: error in region allocation\n", cf->cf_driver->cd_name);

Index: sys/dev/isa/aic_isa.c

RCS file: /cvs/src/sys/dev/isa/aic_isa.c,v retrieving revision 1.4
diff -c -r1.4 aic_isa.c
*** sys/dev/isa/aic_isa.c	2002/03/14 01:26:56	1.4
--- sys/dev/isa/aic_isa.c	2002/08/14 09:00:01

  • 75,83 **** --- 75,89 ---- #include <dev/ic/aic6360reg.h> #include <dev/ic/aic6360var.h>
+ int	aic_isapnp_probe(struct device *, void *, void *);
+ void	aic_isapnp_attach(struct device *, struct device *, void *);
  int	aic_isa_probe(struct device *, void *, void *);
  void	aic_isa_attach(struct device *, struct device *, void *);
  
+ struct cfattach aic_isapnp_ca = {
+ 	sizeof(struct aic_softc), aic_isapnp_probe, aic_isapnp_attach
+ };
+
  struct cfattach aic_isa_ca = {

          sizeof(struct aic_softc), aic_isa_probe, aic_isa_attach   };


  • 85,91 **** /*
    • INITIALIZATION ROUTINES (probe, attach ++) */ ! /*
    • aicprobe: probe for AIC6360 SCSI-controller
    • returns non-zero value if a controller is found. --- 91,104 ---- /*
    • INITIALIZATION ROUTINES (probe, attach ++) */ ! int ! aic_isapnp_probe(parent, match, aux) ! struct device *parent; ! void *match, *aux; ! { ! AIC_TRACE(("aic: aic_isapnp_probe\n")); ! return(1); ! } /*
    • aicprobe: probe for AIC6360 SCSI-controller
    • returns non-zero value if a controller is found.
  • 119,124 **** --- 132,162 ----
    • Attach the AIC6360, fill out some high and low level data structures */ void + aic_isapnp_attach(parent, self, aux) + struct device *parent, *self; + void *aux; + { + struct aic_softc *sc = (void *)self; + struct isa_attach_args *ia = aux; + + AIC_TRACE(("aic: aic_isapnp_attach\n")); + + sc->sc_iot = ia->ia_iot; + sc->sc_ioh = ia->ia_ioh; + sc->sc_irq = ia->ia_irq; + sc->sc_drq = ia->ia_drq; + + AIC_TRACE(("aic: aic_isapnp_attach isa_intr_establish(...)\n")); + sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE, + IPL_BIO, aicintr, sc, sc->sc_dev.dv_xname); + AIC_TRACE(("aic: aic_isapnp_attach aicattach(0x%08x, 0x%08x, %d, %d)\n", + sc->sc_iot, sc->sc_ioh, sc->sc_irq, sc->sc_drq)); + aicattach(sc); + } + /* + * Attach the AIC6360, fill out some high and low level data structures + */ + void aic_isa_attach(parent, self, aux) struct device *parent, *self; void *aux;
  • 127,132 **** --- 165,171 ---- bus_space_tag_t iot = ia->ia_iot; bus_space_handle_t ioh; struct aic_softc *sc = (void *)self; + AIC_TRACE(("aic: aic_isa_attach\n"));
  	if (bus_space_map(iot, ia->ia_iobase, AIC_NPORTS, 0, &ioh))
  		panic("%s: could not map I/O-ports", sc->sc_dev.dv_xname);

  • 138,143 **** --- 177,183 ----
  	sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE,
  	    IPL_BIO, aicintr, sc, sc->sc_dev.dv_xname);
+ 	AIC_TRACE(("aic: aic_isapnp_attach\n"));
  
  	aicattach(sc);

  }
Index: sys/dev/isa/files.isapnp

RCS file: /cvs/src/sys/dev/isa/files.isapnp,v retrieving revision 1.23
diff -c -r1.23 files.isapnp
*** sys/dev/isa/files.isapnp	2001/12/08 15:33:46	1.23
--- sys/dev/isa/files.isapnp	2002/08/14 09:00:01

  • 28,33 **** --- 28,34 ---- file dev/isa/wdc_isapnp.c wdc_isapnp
  attach	aha at isapnp with aha_isapnp
+ attach	aic at isapnp with aic_isapnp
  
  attach	sb at isapnp with sb_isapnp
  file	dev/isa/sb_isapnp.c		sb_isapnp needs-flag
Index: sys/dev/isa/pnpdevs

RCS file: /cvs/src/sys/dev/isa/pnpdevs,v retrieving revision 1.106
diff -c -r1.106 pnpdevs
*** sys/dev/isa/pnpdevs	2002/01/02 19:41:11	1.106
--- sys/dev/isa/pnpdevs	2002/08/14 09:00:02

  • 14,19 **** --- 14,20 ---- #--Adaptec SCSI-- #aha ADP1542 # Adaptec AHA-154x series (PNP00A0) aha PNP00A0 # Adaptec AHA-154x series + aic ADP1502 # Adaptec AHA-152x series aic ADP1520 # Adaptec AHA-152x series aic ADP2015 # Adaptec AHA-1530P

Index: sys/dev/isa/pnpdevs.h



RCS file: /cvs/src/sys/dev/isa/pnpdevs.h,v retrieving revision 1.107
diff -c -r1.107 pnpdevs.h
*** sys/dev/isa/pnpdevs.h	2002/01/02 19:41:32	1.107
--- sys/dev/isa/pnpdevs.h	2002/08/14 09:00:02

  • 7,12 **** --- 7,13 ----

  const struct isapnp_knowndev isapnp_knowndevs[] = {

  	{ {"PNP00A0"}, {"aha"} },
+ 	{ {"ADP1502"}, {"aic"} },
  	{ {"ADP1520"}, {"aic"} },
Do you need more help?X
{ {"ADP2015"}, {"aic"} }, { {"PNP0500"}, {"com"} },

>Release-Note:
Received on Thu Nov 7 15:17:58 2002

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:36 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library