Subject: kern/16954: initialize failed for the acer labs m5229 ide controller
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kawamoto@tenjin.org>
List: netbsd-bugs
Date: 05/22/2002 15:39:50
>Number:         16954
>Category:       kern
>Synopsis:       initialize failed and hang-up for the acer labs m5229 ide controller
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 21 23:40:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     KAWAMOTO Yosihisa
>Release:        NetBSD 1.5ZC (with the sources of May 21 2002)
>Organization:
tenjin.org
>Environment:
	SONY VAIO U1 (i386 Note PC)
System: NetBSD sally.tenjin.org 1.5ZC NetBSD 1.5ZC (SALLY) #13: Wed May 22 12:38:43 JST 2002 kawamoto@sally.tenjin.org:/var/src/sys/arch/i386/compile/SALLY i386
Architecture: i386
Machine: i386
>Description:
	The kernel hangs up at pciide device initizlize as follows:
...
pciide0 at pci0 dev 16 function 0: Acer Labs M5229 UDMA IDE Controller (rev. 0xc4)
pciide0: bus-master DMA support present
(system hangs up)

>How-To-Repeat:
	Boot -current kernel with SONY VAIO U1.  This note pc
	has ``Acer Labs M5229 UDMA IDE Controller (rev. 0xc4).''

>Fix:
	Apply a following patch.  This change is from pciide.c 1.128
	to pciide.c 1.129.

*** /var/usr/src/sys/dev/pci/pciide.c	Tue May 21 22:33:33 2002
--- /usr/src/sys/dev/pci/pciide.c	Wed May 22 11:48:09 2002
***************
*** 3086,3101 ****
  		} else {
  			if (rev == 0xC2)
  				/* 1543C-B0 (m1533, 0x79, bit 2) */
! 				pciide_pci_write(isa_pa.pa_pc, isa_pa.pa_tag,
  				    ACER_0x79,
! 				    pciide_pci_read(isa_pa.pa_pc, isa_pa.pa_tag,
  					ACER_0x79)
  				    | ACER_0x79_REVC2_EN);
  			else
  				/* 1553/1535 (m1533, 0x79, bit 1) */
! 				pciide_pci_write(isa_pa.pa_pc, isa_pa.pa_tag,
  				    ACER_0x79,
! 				    pciide_pci_read(isa_pa.pa_pc, isa_pa.pa_tag,
  					ACER_0x79)
  				    | ACER_0x79_EN);
  		}
--- 3086,3101 ----
  		} else {
  			if (rev == 0xC2)
  				/* 1543C-B0 (m1533, 0x79, bit 2) */
! 				pciide_pci_write(sc->sc_pc, sc->sc_tag,
  				    ACER_0x79,
! 				    pciide_pci_read(sc->sc_pc, sc->sc_tag,
  					ACER_0x79)
  				    | ACER_0x79_REVC2_EN);
  			else
  				/* 1553/1535 (m1533, 0x79, bit 1) */
! 				pciide_pci_write(sc->sc_pc, sc->sc_tag,
  				    ACER_0x79,
! 				    pciide_pci_read(sc->sc_pc, sc->sc_tag,
  					ACER_0x79)
  				    | ACER_0x79_EN);
  		}
>Release-Note:
>Audit-Trail:
>Unformatted: