Subject: Re: mc0: underflow / how to apply patch?
To: Phil Brodd <philip-brodd@uiowa.edu>
From: Bill Studenmund <wrstuden@zembu.com>
List: port-macppc
Date: 04/13/2001 17:15:55
On Fri, 13 Apr 2001, Phil Brodd wrote:

> mc0 has started generating underflow messages on my 8600 running 1.5.  A
> search of the bug database brought up the report and patch here:
> 
> http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=12088
> 
> How do I go about patching the kernel to remedy this?  I have the kernel
> sources, but I've never done this before.  Also, does anyone know why this
> would start to happen after nearly two months of smooth operation?

First off, you need to be able to compile a kernel. Among other things,
that means you need to have source.

Then download the patch. Using save from your browser should work. Then
trim everything before "Index: am79c950.c" and everything starting with
and including Ben's .sig.

Look at the patch. You'll see it has:

RCS file: /cvsroot/syssrc/sys/arch/macppc/dev/am79c950.c,v
retrieving revision 1.7
diff -u -r1.7 am79c950.c
--- am79c950.c 1999/05/18 23:52:53     1.7
+++ am79c950.c 2001/02/07 14:54:39

I happen to know the "RCS file:" bit means this patch came from cvs, and
covered sys/arch/macppc/dev/am79c950.c.

The second entry on the line with the +++ is the file the patch program
will patch. So you need to be in the directory containing "am79c950.c".
i.e. sys/arch/macppc/dev. Then run patch < <patch_file_name> .

The point of the above is that if it'd instead said:

RCS file: /cvsroot/syssrc/sys/arch/macppc/dev/am79c950.c,v
retrieving revision 1.7
diff -u -r1.7 am79c950.c
--- dev/am79c950.c 1999/05/18 23:52:53     1.7
+++ dev/am79c950.c 2001/02/07 14:54:39

then you would have needed to be in sys/arch/macppc when you applied the
patch.

Take care,

Bill