Subject: Re: 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/16/2005 12:08:01
The following reply was made to PR port-i386/30236; it has been noted by GNATS.
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--