Subject: Re: 'wdc0:0:0: lost interrupt' on tibook since PMAP changes
To: Markus W Kilbinger <kilbi@rad.rwth-aachen.de>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-macppc
Date: 06/20/2001 22:50:52
--u3/rZRmxL6MmkK24
Content-Type: text/plain; charset=us-ascii

On Wed, Jun 20, 2001 at 10:45:47PM +0200, Markus W Kilbinger wrote:
> >>>>> "Manuel" == Manuel Bouyer <bouyer@antioche.lip6.fr> writes:
> 
>     Manuel> How old it this machine ?
> 
> About 3 month. It's a PowerBook G4.
> 
>     Manuel> Maybe this controller support UltraDMA modes ? Do you have
>     Manuel> any way to check this ?
> 
> Doesn't dmesg report this?

It reports what the drive can do. About what the controller can do ...
if the driver doesn't know all capabilities of the chip it can't report
something accurate

> 
>     Manuel> With a working kernel, what speed does
>     Manuel> dd if=/dev/rwd0d of=/dev/null bs=64k count=2000
>     Manuel> gives ?
> 
>   # dd if=/dev/rwd0d of=/dev/null bs=64k count=2000
>   2000+0 records in
>   2000+0 records out
>   131072000 bytes transferred in 7.757 secs (16897254 bytes/sec)

16MB/s, it's the speed of DMA mode 2. I've never seen a drive running at
such a speed in DMA mode 2, so the controller may do UltraDMA
> 
>     Manuel> You can also try the small program attached, it'll give a
>     Manuel> better idea of the IDE bus speed.
> 
> Attachment!? Couldn't find one...

Ops, sorry. Here it is

--
Manuel Bouyer <bouyer@antioche.eu.org>
--

--u3/rZRmxL6MmkK24
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="tst.c"

#include <fcntl.h>
#include <unistd.h>

main(int argc, char **argv)
{
	static char buf[64*1024];
	int fd, i;

	fd = open(argv[1], O_RDONLY, 0);
	if (fd < 0) {
		perror("open");
		exit(1);
	}
	for (i = 0; i < atoi(argv[2]); i++) {
		if (read(fd, buf, sizeof(buf)) != sizeof(buf)) {
			perror("read");
			exit(1);
		}
		if (lseek(fd, 0, SEEK_SET) < 0) {
			perror("seek");
			exit(1);
		}
			
	}
	exit(0);
}

--u3/rZRmxL6MmkK24--