Subject: Re: scsi disk generic HBA error after reboot
To: Dan LaBell <dan4l-nospam@verizon.net>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-help
Date: 04/17/2005 17:39:30
--9jxsPFA5p3P2qPhR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Sun, Apr 17, 2005 at 04:31:36AM -0400, Dan LaBell wrote:
>
> It's pr #29813
> Filed after my first post to port-i386, about a month ago -- I really
> could have included more info in that.
OK, I closed it.
>
> >Yes, this is quite possible
> >But the kernel should spin up the drives and process with the normal
> >identification and negotiation then. I have a 1.6.2 system with drives
> >configured to not spin up at poweron, and it works as expected.
> Well, in 1.6 it right under waiting 2 seconds for devices to settle,
> in 2.0 It runs thru atabus drives, then atapi, then the scsi, I only
This is normal. It's related to a change to the IDE subsystem, not SCSI.
> see the initial abbreviated drive info, the Check Condition line etc,
> No: sd1: 17366 MB, 8154 cyl ...
> No: sd2: sync (50.00ns ) ... on the first boot, when spinup is needed
> -- the kernel
> is getting this info, but not displaying it?
No, it's probably not getting it, or it would print it.
Maybe it comes later, when the disk is first accessed ?
Can you try the attached program ?
Usage: ./tst /dev/rsd1d 10000
It will print the speed at which the bus can move data from the drive's cache.
Do you have an idea if the drive could initiate the negotiaition ?
There may be a jumper for this, but it depends on the drive model.
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
--9jxsPFA5p3P2qPhR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="tst.c"
#include <fcntl.h>
#include <unistd.h>
#include <sys/time.h>
main(int argc, char **argv)
{
static char buf[64*1024];
int fd, i;
struct timeval tv0, tv1;
int t;
fd = open(argv[1], O_RDONLY, 0);
if (fd < 0) {
perror("open");
exit(1);
}
if (gettimeofday(&tv0, NULL) < 0) {
perror("gettimeofday");
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);
}
}
if (gettimeofday(&tv1, NULL) < 0) {
perror("gettimeofday");
exit(1);
}
t = (tv1.tv_sec - tv0.tv_sec) * 1000000;
t = t + tv1.tv_usec - tv0.tv_usec;
printf("%d us, %f MB/s\n", t,
((double)64 * (double)i / 1024) / ((double)t / 1000000));
exit(0);
}
--9jxsPFA5p3P2qPhR--