NetBSD Problem Report #30236
From bernd@arresum.veego.de Sun May 15 20:18:18 2005
Return-Path: <bernd@arresum.veego.de>
Received: from sklave3.rackland.de (sklave3.rackland.de [213.133.101.23])
by narn.netbsd.org (Postfix) with ESMTP id 4102263B116
for <gnats-bugs@gnats.NetBSD.org>; Sun, 15 May 2005 20:18:17 +0000 (UTC)
Message-Id: <200505152018.j4FKI9vt003541@arresum.veego.de>
Date: Sun, 15 May 2005 22:18:09 +0200 (CEST)
From: Bernd Ernesti <pr200502-2@veego.de>
Reply-To: Bernd Ernesti <pr200502-2@veego.de>
To: gnats-bugs@netbsd.org, bouyer@NetBSD.org
Subject: HighPoint 1540 doesn't find connected drives and freezes the system
X-Send-Pr-Version: 3.95
>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
>Last-Modified: Mon May 21 09:24:29 +0000 2018
>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:
>Release-Note:
>Audit-Trail:
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: port-i386-maintainer@NetBSD.org, gnats-admin@NetBSD.org,
netbsd-bugs@NetBSD.org
Subject: Re: port-i386/30236: HighPoint 1540 doesn't find connected drives and freezes the system
Date: Sun, 15 May 2005 22:52:57 +0200
On Sun, May 15, 2005 at 08:19:00PM +0000, Bernd Ernesti wrote:
> [...]
>
> 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
The HighPoint 1540 isn't supported by NetBSD, and probably requires a different
driver from hptide. hptide shouldn't attach, though. It looks like they
reused the PCI ID of the 374.
Can you send me the output of pcictl for this device ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: port-i386-maintainer@NetBSD.org, gnats-admin@NetBSD.org,
netbsd-bugs@NetBSD.org
Subject: Re: port-i386/30236: HighPoint 1540 doesn't find connected drives and freezes the system
Date: Mon, 16 May 2005 13:29:24 +0200
--82I3+IH0IqGh5yIs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Can you try the first attached patch ? If this doesn't help, please try
diff2, but note that this one will break any drive configured as
slave.
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
--82I3+IH0IqGh5yIs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff
Index: src/sys/dev/ic/wdc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/wdc.c,v
retrieving revision 1.221
diff -u -r1.221 wdc.c
--- src/sys/dev/ic/wdc.c 28 Mar 2005 22:08:51 -0000 1.221
+++ src/sys/dev/ic/wdc.c 16 May 2005 11:24:09 -0000
@@ -1161,12 +1161,12 @@
* or some userland thread context
*/
for (i = 0; i < timeout_hz; i++) {
+ tsleep(&chp, PRIBIO, "atapoll", 1);
if (__wdcwait(chp, mask, bits,
WDCDELAY_POLL) == 0) {
error = 0;
break;
}
- tsleep(&chp, PRIBIO, "atapoll", 1);
}
} else {
/*
--82I3+IH0IqGh5yIs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff2
Index: src/sys/dev/ic/wdc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/wdc.c,v
retrieving revision 1.221
diff -u -r1.221 wdc.c
--- src/sys/dev/ic/wdc.c 28 Mar 2005 22:08:51 -0000 1.221
+++ src/sys/dev/ic/wdc.c 16 May 2005 11:27:02 -0000
@@ -1161,12 +1161,13 @@
* or some userland thread context
*/
for (i = 0; i < timeout_hz; i++) {
+ tsleep(&chp, PRIBIO, "atapoll", 1);
+ bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_sdh], 0, WDSD_IBM | 0 /* (xfer->c_drive << 4) */);
if (__wdcwait(chp, mask, bits,
WDCDELAY_POLL) == 0) {
error = 0;
break;
}
- tsleep(&chp, PRIBIO, "atapoll", 1);
}
} else {
/*
--82I3+IH0IqGh5yIs--
From: Bernd Ernesti <pr200502@veego.de>
To: Manuel Bouyer <bouyer@antioche.eu.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-i386/30236: HighPoint 1540 doesn't find connected drives and freezes the system
Date: Mon, 16 May 2005 14:06:56 +0200
--J2SCkAp4GZ/dPZZf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Mon, May 16, 2005 at 01:29:24PM +0200, Manuel Bouyer wrote:
> Can you try the first attached patch ? If this doesn't help, please try
> diff2, but note that this one will break any drive configured as
> slave.
No difference with both diffs, where I had to modify diff2 so this was
the version I did test instead of diff2.
Bernd
--J2SCkAp4GZ/dPZZf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff3
--- sys/dev/ic/wdc.c.orig 2005-05-06 10:55:38.000000000 +0200
+++ sys/dev/ic/wdc.c 2005-05-16 13:59:23.000000000 +0200
@@ -1147,6 +1147,8 @@
wdcwait(struct ata_channel *chp, int mask, int bits, int timeout, int flags)
{
int error, i, timeout_hz = mstohz(timeout);
+ struct wdc_softc *wdc = CHAN_TO_WDC(chp);
+ struct wdc_regs *wdr = &wdc->regs[chp->ch_channel];
if (timeout_hz == 0 ||
(flags & (AT_WAIT | AT_POLL)) == AT_POLL)
@@ -1161,12 +1163,13 @@
* or some userland thread context
*/
for (i = 0; i < timeout_hz; i++) {
+ tsleep(&chp, PRIBIO, "atapoll", 1);
+ bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_sdh], 0, WDSD_IBM | 0 /* (xfer->c_drive << 4) */);
if (__wdcwait(chp, mask, bits,
WDCDELAY_POLL) == 0) {
error = 0;
break;
}
- tsleep(&chp, PRIBIO, "atapoll", 1);
}
} else {
/*
--J2SCkAp4GZ/dPZZf--
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: Bernd Ernesti <pr200502@veego.de>
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-i386/30236: HighPoint 1540 doesn't find connected drives and freezes the system
Date: Mon, 16 May 2005 21:22:10 +0200
On Mon, May 16, 2005 at 02:06:56PM +0200, Bernd Ernesti wrote:
> On Mon, May 16, 2005 at 01:29:24PM +0200, Manuel Bouyer wrote:
> > Can you try the first attached patch ? If this doesn't help, please try
> > diff2, but note that this one will break any drive configured as
> > slave.
>
> No difference with both diffs, where I had to modify diff2 so this was
> the version I did test instead of diff2.
Sorry, I didn't try to compile it :(
Well, the problem is serious. It seems that if we read the status register
2 times, the second time the chip will hang (which hangs the PCI bus, and thus
the machine). It's probably a bug in the parallel to serial bridge.
There is probably a workaround, but I don't know it yet.
It can only be found by trial and error.
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
From: Bernd Ernesti <pr200502@veego.de>
To: Manuel Bouyer <bouyer@antioche.eu.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-i386/30236: HighPoint 1540 doesn't find connected drives and freezes the system
Date: Mon, 16 May 2005 21:46:37 +0200
On Mon, May 16, 2005 at 09:22:10PM +0200, Manuel Bouyer wrote:
> On Mon, May 16, 2005 at 02:06:56PM +0200, Bernd Ernesti wrote:
> > On Mon, May 16, 2005 at 01:29:24PM +0200, Manuel Bouyer wrote:
> > > Can you try the first attached patch ? If this doesn't help, please try
> > > diff2, but note that this one will break any drive configured as
> > > slave.
> >
> > No difference with both diffs, where I had to modify diff2 so this was
> > the version I did test instead of diff2.
>
> Sorry, I didn't try to compile it :(
No real problem. That was easy to fix.
> Well, the problem is serious. It seems that if we read the status register
> 2 times, the second time the chip will hang (which hangs the PCI bus, and thus
> the machine). It's probably a bug in the parallel to serial bridge.
Oh :(
> There is probably a workaround, but I don't know it yet.
> It can only be found by trial and error.
Let me know if you have an idea what i could try.
Btw, which other 'real' sata controller, preferable SATA-II would you recommend
for the time beeing?
Bernd
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: Bernd Ernesti <pr200502@veego.de>
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-i386/30236: HighPoint 1540 doesn't find connected drives and freezes the system
Date: Tue, 17 May 2005 00:05:26 +0200
On Mon, May 16, 2005 at 09:46:37PM +0200, Bernd Ernesti wrote:
> > Well, the problem is serious. It seems that if we read the status register
> > 2 times, the second time the chip will hang (which hangs the PCI bus, and thus
> > the machine). It's probably a bug in the parallel to serial bridge.
>
> Oh :(
>
> > There is probably a workaround, but I don't know it yet.
> > It can only be found by trial and error.
>
> Let me know if you have an idea what i could try.
>
> Btw, which other 'real' sata controller, preferable SATA-II would you recommend
> for the time beeing?
Not really. I only have a Promise SATA150 myself (I don't remember the
exact model name). It seems that newer promise don't work with our
driver :(
It seems that peoples have had good success with Silicon Image SATALink
controllers (you probably want the 3114, which is the one with 4 ports).
There is also the Intel i31244 Serial ATA controller, but I don't know
if this one can be found as add-on card.
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.