From sja@tekla.fi  Mon Oct 12 01:05:05 1998
Received: from marathon.tekla.fi (marathon.tekla.fi [192.98.7.5])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA22985
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 Oct 1998 01:05:02 -0700 (PDT)
          (envelope-from sja@tekla.fi)
Received: from poveri.tekla.fi (poveri.tekla.fi [192.98.7.19])
	by marathon.tekla.fi (8.8.7/8.8.7) with SMTP id LAA03045
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 Oct 1998 11:04:47 +0300
Received: by poveri.tekla.fi; (5.65v3.2/1.1.8.2/20Aug96-0557PM)
	id AA01712; Mon, 12 Oct 1998 11:04:54 +0300
Message-Id: <9810120804.AA01712@poveri.tekla.fi>
Date: Mon, 12 Oct 1998 11:04:54 +0300
From: Sakari Jalovaara <sja@tekla.fi>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Typos in kernel: APM, matcd, UDMA+PIIX4
X-Send-Pr-Version: 3.2

>Number:         8280
>Category:       kern
>Synopsis:       Typos in kernel: APM, matcd, UDMA+PIIX4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 12 01:10:01 PDT 1998
>Closed-Date:    Fri Dec 4 13:52:36 PST 1998
>Last-Modified:  Fri Dec  4 13:53:06 PST 1998
>Originator:     Sakari Jalovaara
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
Ministry of Information, Information Retrieval
>Environment:

>Description:

These seem like typos to me.  I'm not sure, don't have the manuals,
and don't have the hardware for any of these.

One in advanced power management,
one in Matsushita/Panasonic CD-ROM driver,
one in UltraDMA+PIIX4 initialization.

--- sys/i386/apm/apm.c.orig	Sun Oct 11 22:39:54 1998
+++ sys/i386/apm/apm.c	Sun Oct 11 22:41:42 1998
@@ -793,7 +793,7 @@
 	sc->ds_base = (apm_ds_base << 4) + APM_KERNBASE;
 	sc->cs32_limit = apm_cs32_limit - 1;
 	if (apm_cs16_limit == 0)
-	    apm_cs16_limit == apm_cs32_limit;
+	    apm_cs16_limit = apm_cs32_limit;
 	sc->cs16_limit = apm_cs16_limit - 1;
 	sc->ds_limit = apm_ds_limit - 1;
 	sc->cs_entry = apm_cs_entry;


--- sys/i386/isa/matcd/audio.c.orig	Sun Oct 11 22:40:04 1998
+++ sys/i386/isa/matcd/audio.c	Sun Oct 11 22:42:38 1998
@@ -213,7 +213,7 @@
 	}				/*<14>*/
 	unlockbus(controller, ldrive);	/*<16>Release bus*/
 
-	if (z & MATCD_ST_AUDIOBSY==0 &&	/*<14>If drive is idle*/
+	if ((z & MATCD_ST_AUDIOBSY)==0 && /*<14>If drive is idle*/
 	    cd->status==CD_AS_PLAY_IN_PROGRESS) {	/*<14>but was playing*/
 		cd->status=CD_AS_PLAY_COMPLETED;	/*<14>then its done*/
 		return(0);


--- sys/pci/ide_pci.c.orig	Sun Oct 11 22:40:10 1998
+++ sys/pci/ide_pci.c	Sun Oct 11 22:43:09 1998
@@ -696,8 +696,8 @@
 
 		unitno = cookie->ctlr * 2 + cookie->unit;
 
-		mask = 1 << unitno + 3 << (16 + unitno * 4);
-		new = 1 << unitno + 2 << (16 + unitno * 4);
+		mask = (1 << unitno) + (3 << (16 + unitno * 4));
+		new = (1 << unitno) + (2 << (16 + unitno * 4));
 
 		pci_conf_write(cookie->tag, 0x48, 
 			(pci_conf_read(cookie->tag, 0x48) & ~mask) | new);

>How-To-Repeat:

RTFS.  I don't know what these really do.

>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: archie 
State-Changed-When: Fri Dec 4 13:52:36 PST 1998 
State-Changed-Why:  
Patches were applied.. thanks!! 
>Unformatted:
