Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Jan 1999 14:48:38 -0700 (MST)
From:      Steve Bauer <sbauer@hardrock.sdsmt.edu>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   kern/9408: parameter reversed to a pci_cfgwrite in pcisupport.c
Message-ID:  <199901092148.OAA09903@hardrock.sdsmt.edu>

next in thread | raw e-mail | index | archive | help

>Number:         9408
>Category:       kern
>Synopsis:       parameter reversed to a pci_cfgwrite in pcisupport.c
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan  9 13:50:00 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Steve Bauer
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
South Dakota School of Mines and Technology
>Environment:

	3.0-current as of 1-9-1998 on a PII 300

>Description:

	The 2 of the parameters passed to pci_cfgwrite in the function
fixwsc_natoma are reversed.  The data being written out vs the number of
bytes being written out have been reversed.

>How-To-Repeat:

	The bug appears not to cause any problems yet on my machine.

>Fix:
	
	Included below is a patch to fix the small problem.

*** pcisupport.c	Sun Dec 27 00:59:25 1998
--- pcisupport.c.save	Sat Jan  9 14:34:10 1999
***************
*** 213,225 ****
  	if (pmccfg & 0x8000) {
  		printf("Correcting Natoma config for SMP\n");
  		pmccfg &= ~0x8000;
! 		pci_cfgwrite(tag, 0x50, 2, pmccfg);
  	}
  #else
  	if ((pmccfg & 0x8000) == 0) {
  		printf("Correcting Natoma config for non-SMP\n");
  		pmccfg |= 0x8000;
! 		pci_cfgwrite(tag, 0x50, 2, pmccfg);
  	}
  #endif
  }
--- 213,225 ----
  	if (pmccfg & 0x8000) {
  		printf("Correcting Natoma config for SMP\n");
  		pmccfg &= ~0x8000;
! 		pci_cfgwrite(tag, 0x50, pmccfg, 2);
  	}
  #else
  	if ((pmccfg & 0x8000) == 0) {
  		printf("Correcting Natoma config for non-SMP\n");
  		pmccfg |= 0x8000;
! 		pci_cfgwrite(tag, 0x50, pmccfg, 2);
  	}
  #endif
  }
>Release-Note:
>Audit-Trail:
>Unformatted:

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901092148.OAA09903>