From lee@st-lcremean.tidalwave.net  Mon Dec 21 00:47:38 1998
Received: from st-lcremean.tidalwave.net (st-lcremean.tidalwave.net [208.213.203.186])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA23616
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 21 Dec 1998 00:47:36 -0800 (PST)
          (envelope-from lee@st-lcremean.tidalwave.net)
Received: (from root@localhost)
	by st-lcremean.tidalwave.net (8.9.1/8.8.8) id DAA01164;
	Mon, 21 Dec 1998 03:47:31 -0500 (EST)
	(envelope-from lee)
Message-Id: <199812210847.DAA01164@st-lcremean.tidalwave.net>
Date: Mon, 21 Dec 1998 03:47:31 -0500 (EST)
From: Lee Cremeans <lcremean@tidalwave.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Bad unit handling in ide_pci.c
X-Send-Pr-Version: 3.2

>Number:         9153
>Category:       kern
>Synopsis:       Bad unit handling in ide_pci.c
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 21 00:50:00 PST 1998
>Closed-Date:    Wed Dec 23 01:04:14 PST 1998
>Last-Modified:  Wed Dec 23 01:04:46 PST 1998
>Originator:     Lee Cremeans
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
My room? Are you crazy? :)
>Environment:

	3.0-CURRENT CVSup'd tonight..

>Description:

	The IDE PCI code returns the wrong cookie for a given drive. 
 
>How-To-Repeat:

	N/A

>Fix:
	
*** ide_pci.c   Mon Dec 14 00:49:04 1998
--- ide_pci.c.new       Mon Dec 21 03:42:10 1998
***************
*** 1195,1201 ****

        cp = softc.cookies.lh_first;
        while(cp) {
!               if (cp->ctlr == unit &&
                        ((iobase_wd == 0) || (cp->iobase_wd == iobase_wd)))
                        break;
                cp = cp->le.le_next;
--- 1253,1259 ----

        cp = softc.cookies.lh_first;
        while(cp) {
!               if (cp->unit == unit &&
                        ((iobase_wd == 0) || (cp->iobase_wd == iobase_wd)))
                        break;
                cp = cp->le.le_next;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: msmith 
State-Changed-When: Wed Dec 23 01:04:14 PST 1998 
State-Changed-Why:  
Patch was committed before PR arrived 
>Unformatted:
