Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Nov 2000 14:23:26 +0100 (CET)
From:      Soren Schmidt <sos@freebsd.dk>
To:        avatar@mmlab.cse.yzu.edu.tw (Tai-hwa Liang)
Cc:        freebsd-stable@FreeBSD.org
Subject:   Re: 4.2-RELEASE ata0-master probe failed(solved)
Message-ID:  <200011261323.OAA38044@freebsd.dk>
In-Reply-To: <Pine.BSF.4.30.0011262012080.58870-100000@www.mmlab.cse.yzu.edu.tw> from Tai-hwa Liang at "Nov 26, 2000 08:14:38 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
It seems Tai-hwa Liang wrote:
> Hi,
> 
> 	According to my injected debugging message, the first time
> "inb(scp->altioaddr)" was executed in ata_intr(), it returns 0xd0(busy):

Uhm 0xd0 is SERVICE and READY and BUSY, which doesn't make sense...

>     /* if drive is busy it didn't interrupt */
>     if (inb(scp->altioaddr) & ATA_S_BUSY)
>         return;
> 
> 	The booting message then said: "ata0-master: ata_comand: timeout
> waiting for intr," and stopped to interact with my hard disk attached on
> ata0-master anymore. However, if I forced an interrupt clear before busy
> return, the timeout condition can be resolved & all further disk I/O
> operations went normally:
> 
>     /* if drive is busy it didn't interrupt */
>     if (inb(scp->altioaddr) & ATA_S_BUSY)
>     {
> 	/* clear interrupt */
> 	inb(scp->ioaddr + ATA_STATUS);
> 	return;
>     }

This effectively disables the whole purpose of using the "alternative
status" register. Using the alt reg does not clear the interrupt
and we do not want to if this drive didn't interrupt. So this hack
breaks the driver on systems with more than one controller on
an interrupt (which is quiet common nowadays).
Your problem might be that the altioaddr is not correct, so we get
bogus status from it...

> 	Include the above hacks, there are two other temporary "fixes"
> against ata-all.c, 1.50.2.14. All of them work in my 4.2-R box. The first
> is to replace the status checking routine in ata_intr() with the old one
> (in 1.50.2.7):

They are hard to read, they are mostly just whitespace pollution, the only
real changes I see is the above, which wont work unfortunately...

-Søren


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011261323.OAA38044>