Doug White wrote:
On Sat, 26 Mar 2005, Graham Menhennitt wrote:
I just cvsupped to the latest RELENG_5 (as of yesterday) and built and
installed the world and a new kernel. When I boot the new kernel, I get
an error "ffs_mountroot: can't find rootvp". At the "mountroot>" prompt,
whatever I type (even '?') causes a crash and reboot. I can still boot
my old kernel without a problem. The dmesg from the old kernel and a
capture of the boot of the new kernel are below. Noticably absent from
the new one is the line "ad0: 76319MB <ST380011A/3.06> [155061/16/63] at
ata0-master UDMA100" which is my only disk drive.
Hm .. from the -v output it looks like the first ATA channel is not
resetting properly for the probe. We'll need to get a better idea of when
the problem appears since a lot has changed between January and now.
Doug,
I compared the output of "boot -v" for the working and broken kernels. It seems that the broken one does fewer loops around the disk probe and hence has less lines of
ata0-master: stat=0x90 err=0x90 lsb=0x90 msb=0x90
than the one that works. Since that line comes from ata-lowlevel.c, I cvs'ed versions of that file going back to around when I built the working kernel. The following seems to be the change that broke it.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
--- ata-lowlevel.c Mon Mar 28 15:59:57 2005
+++ ata-lowlevel.c_orig Wed Mar 23 19:17:46 2005
@@ -605,19 +605,26 @@
}
}
if (mask == 0x01) /* wait for master only */
- if (!(stat0 & ATA_S_BUSY) || (stat0 == 0xff && timeout > 5))
+ if (!(stat0 & ATA_S_BUSY) || (stat0 == 0xff && timeout > 5) ||
+ (stat0 == err && lsb == err && msb == err && timeout > 5))
break;
if (mask == 0x02) /* wait for slave only */
- if (!(stat1 & ATA_S_BUSY) || (stat1 == 0xff && timeout > 5))
+ if (!(stat1 & ATA_S_BUSY) || (stat1 == 0xff && timeout > 5) ||
+ (stat1 == err && lsb == err && msb == err && timeout > 5))
break;
if (mask == 0x03) { /* wait for both master & slave */
if (!(stat0 & ATA_S_BUSY) && !(stat1 & ATA_S_BUSY))
break;
- if (stat0 == 0xff && timeout > 5)
+ if ((stat0 == 0xff && timeout > 5) ||
+ (stat0 == err && lsb == err && msb == err && timeout > 5))
mask &= ~0x01;
- if (stat1 == 0xff && timeout > 5)
+ if ((stat1 == 0xff && timeout > 5) ||
+ (stat1 == err && lsb == err && msb == err && timeout > 5))
mask &= ~0x02;
}
+ if (mask == 0 && !(stat0 & ATA_S_BUSY) && !(stat1 & ATA_S_BUSY))
+ break;
+
ata_udelay(100000);
} <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Anyway, I now have a working kernel. I presume that I should file a PR on this.
Thanks again for your help. Graham
_______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"