Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jul 1998 17:40:31 -0400 (EDT)
From:      "Robert G. Brown" <rgb@phy.duke.edu>
To:        "Patrick W. Bryant" <daspwb@Queequeg.Gsu.EDU>
Cc:        Doug Ledford <dledford@dialnet.net>, aic7xxx Mailing List <AIC7xxx@FreeBSD.ORG>
Subject:   Re: 2.0.35 and aic7xxx
Message-ID:  <Pine.LNX.3.96.980720161943.251H-100000@ganesh.phy.duke.edu>
In-Reply-To: <Pine.LNX.3.96.980720132721.251C-100000@ganesh.phy.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
I'm making progress down into the code with printk's.  I've found that
adding printk's (and a delay loop!) make a significant difference in
how far the MESSAGES get at the time of the crash -- the crash appears
to wipe out at least some of the printk messages pending but not yet
on the screen, which probably explains some of why we see slightly
different messages en route to the crash.

At the moment it looks like the crash occurs right after the sequencer
is loaded, but BEFORE aic7xxx_loadseq returns.  I'm going to try yet
another insmod in a second (I'm up to a rather large number of reboots
for the day, but I can work by just swinging my chair around so it is
ok).  This one MIGHT give me strong evidence that the problem is in
the outb() commands right after the sequencer download.  I now have
one of the world's noisiest aic7xxx modules, but I'm gradually
following the code as far as it executes.  As long as the problem
isn't caused by a problem that occurs asynchronously after a timer
expires (so that printk's in sequence won't tell where it happens)
I'll sooner or later get it narrowed down.

OK, while writing this I find that it is indeed in the last three
outb() commands.  Now to find which one.  We add a three more
printk's, each followed by a billion cycle dumb delay loop....

...and get the message:

aic7xxx: About to set some stuff on the device.
aic7xxx: Set FASTMODE|FASTMODE|PERRORDIS to SEQCTL.
(scsi0:-1:-1:-1) Data Parity Error... 
 ....system death and dump of messages/flags...

This means that this outb() command completed well enough to write the
FOLLOWING printk (note below that I put the printk after the command)
and a billion cycles of an k = i*j loop (to give the killing spurious
intr time to occur).  The last two outb()'s do not complete (I do NOT
see the trailing printk's).  The code:

  printk("aic7xxx: About to set some stuff on the device.\n");
  
  aic_outb(p, FASTMODE|FASTMODE|PERRORDIS, SEQCTL);
  printk("aic7xxx: Set FASTMODE|FASTMODE|PERRORDIS to SEQCTL.\n");
  /* Delay to allow crash to occur */
  for(i=0;i<=1000000;i++)
    for(j=0;j<=1000;j++) k=i*j;
  aic_outb(p, 0, SEQADDR0);
  printk("aic7xxx: Set 0 to SEQADDR0.\n");
  /* Delay to allow crash to occur */
  for(i=0;i<=1000000;i++)
    for(j=0;j<=1000;j++) k=i*j;
  aic_outb(p, 0, SEQADDR1);
  printk("aic7xxx: Set 0 to SEQADDR1.\n");
  /* Delay to allow crash to occur */
  for(i=0;i<=1000000;i++)
    for(j=0;j<=1000;j++) k=i*j;



Hope that this is some help to somebody.  I don't believe that I can
descend the maelstrom any further without guidance, although I will
look over Justin's freebsd code (I think I still have a copy around)
to see if I can identify the end of the sequence download and
determine if anything really different occurs.

   rgb

Robert G. Brown	                       http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb@phy.duke.edu




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe aic7xxx" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.96.980720161943.251H-100000>