From nobody@FreeBSD.ORG  Fri Aug 18 12:29:22 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id A756B37B423; Fri, 18 Aug 2000 12:29:22 -0700 (PDT)
Message-Id: <20000818192922.A756B37B423@hub.freebsd.org>
Date: Fri, 18 Aug 2000 12:29:22 -0700 (PDT)
From: visigoth@telemere.net
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: recent newbus mod's to dpt seem to have broken it.. 
X-Send-Pr-Version: www-1.0

>Number:         20706
>Category:       kern
>Synopsis:       recent newbus mod's to dpt seem to have broken it..
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    peter
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 18 12:30:00 PDT 2000
>Closed-Date:    Mon Aug 28 00:54:29 PDT 2000
>Last-Modified:  Mon Aug 28 00:55:42 PDT 2000
>Originator:     Damieon Stark
>Release:        FreeBSD 4.1-STABLE
>Organization:
Telemere Technologies Inc
>Environment:
Working: 4.1-STABLE (kernel and world) from ~Aug  5 2000
Broken: Kernel as of newbus commits on the 10th ( I think )
>Description:
When booting a "DPT PM3334UW FW Rev. 07M0, 2 channels, 64 CCBs" on
4.1-STABLE the bios asigns an irq and the kernel seems to think it is on
a different one.  Causing a kernel panic during boot. On my machine the
bios asigns an IRQ of 9, but the kernel comes up with 16.  In reading 
sys/dev/dpt/dpt.h I saw a comment about information read from the dpt 
being both Big endian, as well as in network byte order, This seems like
a reasonable place to think the problem may be.... But not YET being a 
wizard, I don't know. Plus I don't know anything about newbus yet.. ;)
>How-To-Repeat:
Compile a newbusified dpt kernel (after aug 10) and try to boot up a 
DPT PM3334UW. (pci)
>Fix:
possible endian-ness/byte order missmatch in dpt_read_conf? or in the
way newbus handles the data...  Again, don't know....

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->gibbs 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Mon Aug 21 05:35:42 PDT 2000 
Responsible-Changed-Why:  
Over to the maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20706 

From: Jonathan Chen <jon@spock.org>
To: freebsd-gnats-submit@FreeBSD.org, visigoth@telemere.net
Cc: sheldonh@FreeBSD.org, gibbs@FreeBSD.org
Subject: Re: kern/20706: recent newbus mod's to dpt seem to have broken it..
Date: Sat, 26 Aug 2000 18:07:15 -0400

 The following should fix the problem:
 
 Index: dpt_pci.c
 ===================================================================
 RCS file: /export/ncvs/src/sys/dev/dpt/dpt_pci.c,v
 retrieving revision 1.17.2.1
 diff -u -r1.17.2.1 dpt_pci.c
 --- dpt_pci.c	2000/08/07 18:48:14	1.17.2.1
 +++ dpt_pci.c	2000/08/26 21:40:26
 @@ -106,7 +106,7 @@
  	}
  
  	rid = 0;
 -	irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1, RF_ACTIVE);
 +	irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
  	if (!irq) {
  		device_printf(dev, "No irq?!\n");
  		error = ENOMEM;
 
 
 -- 
     (o_ 1-2-1-2-1-2-1-2-1-2-1-2-1-2-1-2-1-2-1-2-1-2-1-2-1-2-1-2-1-2 _o)
  \\\_\            Jonathan Chen              jon@spock.org           /_///
  <____)  No electrons were harmed during production of this message (____>
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Mon Aug 28 00:54:29 PDT 2000 
State-Changed-Why:  
Jonathan's patch was committed as rev 1.21 and merged onto the 
stable branch as rev 1.17.2.2. 


Responsible-Changed-From-To: gibbs->peter 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Mon Aug 28 00:54:29 PDT 2000 
Responsible-Changed-Why:  
Peter applied the patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20706 
>Unformatted:
