Subject: port-i386/30236: HighPoint 1540 doesn't find connected drives and freezes the system
To: None <port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: Bernd Ernesti <pr200502@veego.de>
List: netbsd-bugs
Date: 05/15/2005 20:19:00
>Number:         30236
>Category:       port-i386
>Synopsis:       HighPoint 1540 doesn't find connected drives and freezes the system
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 15 20:19:00 +0000 2005
>Originator:     Bernd Ernesti
>Release:        NetBSD 3.99.3
>Organization:
	
>Environment:
System: NetBSD 3.99.3 
Architecture: i386
Machine: i386
Source: current as of 2005-05-15
>Description:
	The hpt driver doesn't find attached drives while booting
	and brings the system to an halt when i tries to probe drives.
>How-To-Repeat:
	Attach an SATA drive to an HighPoint 1540 and notice that the
	system freezes while trying to probe the drive.

	This is the output with an drive attached to it,
	atadebug_mask and wdcdebug_wd_mask set to 0x7f:

hptide0:0 wait DRDY st0 0x50 st1 0x0
ata_get_params
wdc_exec_command hptide0:0:0
ata_exec_xfer 0xc11a3000 channel 0 drive 0
atastart from ata_exec_xfer, flags 0x100
atastart: xfer 0xc11a3000 channel 0 drive 0
__wdccommand_start hptide0:0:0
__wdcwait hptide0:0
wdccommand hptide0:0:0 command=0xec cylin=0 head=0 sector=0 count=0 features=0
__wdccommand_intr hptide0:0:0
__wdcwait hptide0:0
__wdcwait: timeout (time=11), status d0 error 1 (mask 0x0 bits 0x0)
__wdcwait hptide0:0

	This is the normal output without an drive attached to it, where
	the system boots fine:

hptide0 at pci0 dev 13 function 0
hptide0: Triones/Highpoint HPT374 IDE Controller
hptide0: bus-master DMA support present
hptide0: primary channel wired to native-PCI mode
hptide0: using irq 5 for native-PCI interrupt
atabus2 at hptide0 channel 0
hptide0: secondary channel wired to native-PCI mode
atabus3 at hptide0 channel 1
hptide1 at pci0 dev 13 function 1
hptide1: Triones/Highpoint HPT374 IDE Controller
hptide1: bus-master DMA support present
hptide1: primary channel wired to native-PCI mode
hptide1: using irq 5 for native-PCI interrupt
atabus4 at hptide1 channel 0
hptide1: secondary channel wired to native-PCI mode
atabus5 at hptide1 channel 1

	This is the drive output while attached to an satalink card:

satalink0 at pci2 dev 10 function 0
satalink0: Silicon Image SATALink 3112 (rev. 0x02)
satalink0: SATALink BA5 register space disabled
satalink0: bus-master DMA support present
satalink0: primary channel wired to native-PCI mode
satalink0: using irq 5 for native-PCI interrupt
atabus2 at satalink0 channel 0
satalink0: secondary channel wired to native-PCI mode
atabus3 at satalink0 channel 1
satalink0: port 1: device present, speed: 1.5Gb/s
wd2 at atabus3 drive 0: <WDC WD2500JD-00FYB0>
wd2: drive supports 16-sector PIO transfers, LBA48 addressing
wd2: 232 GB, 484521 cyl, 16 head, 63 sec, 512 bytes/sect x 488397168 sectors
wd2: 32-bit data port
wd2: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd2(satalink0:1:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)

	Btw, this is an ECS K7S5A board with an SiS 735 chipset,
	but the same problem is exists on an P2B board too.
>Fix: