Port-prep archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

panic if isapnp enabled



Hi! all,


I forgot to issue this patch...

I enabled isapnp for my kernel.  It kernel panics in sys/dev/isa/isadma.c
::_isa_dmainit().  This reason was called match/attach of pnpbus from
config_found_ia() for "cpu" in prep/mainbus.c::mainbus_attach().
# Sorry I'm beginning to forgot...  X-<

I apologize if already fixed.  :-)

Thanks,
--
kiyohara


Index: sys/arch/prep/pnpbus/pnpbus.c
===================================================================
RCS file: /cvsroot/src/sys/arch/prep/pnpbus/pnpbus.c,v
retrieving revision 1.7
diff -u -r1.7 pnpbus.c
--- sys/arch/prep/pnpbus/pnpbus.c       17 Oct 2007 19:56:52 -0000      1.7
+++ sys/arch/prep/pnpbus/pnpbus.c       2 Jan 2008 10:20:25 -0000
@@ -75,6 +75,10 @@
 static int
 pnpbus_match(struct device *parent, struct cfdata *cf, void *aux)
 {
+       struct pnpbus_attach_args *paa = aux;
+
+       if (strcmp(paa->paa_name, pnpbus_cd.cd_name) != 0)
+               return (0);
        return 1;
 }
 
Index: sys/arch/prep/pnpbus/pnpbusvar.h
===================================================================
RCS file: /cvsroot/src/sys/arch/prep/pnpbus/pnpbusvar.h,v
retrieving revision 1.4
diff -u -r1.4 pnpbusvar.h
--- sys/arch/prep/pnpbus/pnpbusvar.h    27 Oct 2006 19:52:51 -0000      1.4
+++ sys/arch/prep/pnpbus/pnpbusvar.h    2 Jan 2008 10:20:25 -0000
@@ -87,6 +87,7 @@
  * Bus attach arguments
  */
 struct pnpbus_attach_args {
+       const char *paa_name;
        bus_space_tag_t paa_iot;                /* i/o space tag */
        bus_space_tag_t paa_memt;               /* mem space tag */
        isa_chipset_tag_t paa_ic;               /* ISA chipset tag */
Index: sys/arch/prep/prep/mainbus.c
===================================================================
RCS file: /cvsroot/src/sys/arch/prep/prep/mainbus.c,v
retrieving revision 1.27
diff -u -r1.27 mainbus.c
--- sys/arch/prep/prep/mainbus.c        17 Oct 2007 19:56:54 -0000      1.27
+++ sys/arch/prep/prep/mainbus.c        2 Jan 2008 10:20:25 -0000
@@ -158,6 +158,8 @@
 
 /* scan pnpbus first */
 #if NPNPBUS > 0
+       memset(&genppc_ict, 0, sizeof(genppc_ict));
+       mba.mba_paa.paa_name = "pnpbus";
        mba.mba_paa.paa_iot = &genppc_isa_io_space_tag;
        mba.mba_paa.paa_memt = &genppc_isa_mem_space_tag;
        mba.mba_paa.paa_ic = &genppc_ict;


Home | Main Index | Thread Index | Old Index