Subject: Re: kernel panic on RiscPC
To: None <port-arm32@netbsd.org>
From: Stefan Voss <voss@yoda.in-berlin.de>
List: port-arm32
Date: 12/06/1998 18:49:15
> Stefan Voss wrote:
>
> > Richard Earnshaw wrote:
> >
> > wdc_pioc.c has been broken since it was changed to use the new wdc driver.
> > I posted a PR about this over a month ago (with a patch), but nothing has
> > been done about it. The patch no-longer applies cleanly to the current
> > version, but I managed to build a working kernel last weekend.
> > Unfortunately, my RPC is at home so I don't have the patch to hand at the
> > moment.
>
> Yes, I know that wdc_pioc.c has been broken. My last kernels that did not
> panic were current kernels with your patch applied. When sup'ing the kernel
> sources yesterday I noticed that wdc_pioc.c has been updated so I thought
> that this problem has been fixed.
>
> Why is a source file updated when a PR is open for that file? Was the update
> a (failed) attempt to fix the PR?
>
> I'll try and figure out how to apply your original patch to the updated
> wdc_pioc.c. Let's see if I manage to build a kernel that does not panic.
I managed to build a kernel from current (which is running as I write
this) by changing wdc_pioc.c according to Richard's original
patch. Here is the diff.
*** wdc_pioc.c Fri Dec 4 13:17:17 1998
--- wdc_pioc.c Sun Dec 6 18:24:06 1998
***************
*** 145,156 ****
&sc->wdc_channel.ctl_ioh))
panic("%s: couldn't map aux registers\n", self->dv_xname);
! sc->sc_ih = intr_claim(pa->pa_irq, IPL_BIO, "wdc", wdcintr, sc);
if (!sc->sc_ih)
panic("%s: Cannot claim IRQ %d\n", self->dv_xname, pa->pa_irq);
sc->sc_wdcdev.cap |= WDC_CAPABILITY_DATA16;
sc->sc_wdcdev.PIO_cap = 0;
sc->wdc_chanptr = &sc->wdc_channel;
sc->sc_wdcdev.channels = &sc->wdc_chanptr;
sc->sc_wdcdev.nchannels = 1;
sc->wdc_channel.channel = 0;
--- 145,158 ----
&sc->wdc_channel.ctl_ioh))
panic("%s: couldn't map aux registers\n", self->dv_xname);
! sc->sc_ih = intr_claim(pa->pa_irq, IPL_BIO, "wdc", wdcintr,
! &sc->wdc_channel);
if (!sc->sc_ih)
panic("%s: Cannot claim IRQ %d\n", self->dv_xname, pa->pa_irq);
sc->sc_wdcdev.cap |= WDC_CAPABILITY_DATA16;
sc->sc_wdcdev.PIO_cap = 0;
sc->wdc_chanptr = &sc->wdc_channel;
+ sc->wdc_channel.wdc = &sc->sc_wdcdev;
sc->sc_wdcdev.channels = &sc->wdc_chanptr;
sc->sc_wdcdev.nchannels = 1;
sc->wdc_channel.channel = 0;
You should probably wait for Richard's comments to this patch just in
case I screwed up.
Regards,
Stefan
--
Stefan Voss
(voss@yoda.in-berlin.de)