Subject: Re: crash dump failing on machine with 4GB
To: Greg Oster <oster@cs.usask.ca>
From: Chris Ross <cross+netbsd@distal.com>
List: port-sparc64
Date: 09/29/2007 22:09:45
--Apple-Mail-26-210104525
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed


On Sep 29, 2007, at 22:04, Greg Oster wrote:
>>   Okay.  Cool.  So, in the case that XS_CTL_POLL is set, it would
>> make sense
>> that there isn't (or "shouldn't be" ?) a callout, right?  I'll whack
>> that into my
>> kernel, which will be the "more correct" way to stop that problem,
>> and let
>> me get back to the original problem of figuring out why the crash- 
>> dump
>> doesn't work.  :-)
>
> Try adding the line:
>
> 		callout_init(&xs->xs_callout, 0);
>
> after the line:
>
> 		xs->datalen = nwrt * sectorsize;
>
> in sd.c:sddump().
>
> That got rid of the panic for me...

   Martin and Manuel and I worked out a fix for the siop/esiop  
drivers, which
was to *not* call callout_stop() if xs_control contained  
XS_CTL_POLL.  Since
if it's polling, there's not likely to be a callout.

   See if you can make a similar change to ahc.  This change to siop  
and esiop
is to be committed by Martin, if it hasn't been already, and is  
approximately:


--Apple-Mail-26-210104525
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name=esiop.diff
Content-Disposition: attachment;
	filename=esiop.diff

Index: sys/dev/ic/esiop.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/esiop.c,v
retrieving revision 1.39
diff -u -r1.39 esiop.c
--- sys/dev/ic/esiop.c	4 Mar 2007 06:01:55 -0000	1.39
+++ sys/dev/ic/esiop.c	30 Sep 2007 02:06:00 -0000
@@ -1223,7 +1225,8 @@
 		    esiop_cmd->cmd_c.dmamap_data);
 	}
 	bus_dmamap_unload(sc->sc_c.sc_dmat, esiop_cmd->cmd_c.dmamap_cmd);
-	callout_stop(&esiop_cmd->cmd_c.xs->xs_callout);
+	if ((xs->xs_control & XS_CTL_POLL) == 0)
+		callout_stop(&xs->xs_callout);
 	esiop_cmd->cmd_c.status = CMDST_FREE;
 	TAILQ_INSERT_TAIL(&sc->free_list, esiop_cmd, next);
 #if 0

--Apple-Mail-26-210104525
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed


   Thanks...

                - Chris


--Apple-Mail-26-210104525--