Re: filesystem corruption
"David S. Miller" <davem@redhat.com> writes:
>> On 12 Feb 2004 21:10:29 -0500
>> Marc Horowitz <marc@mit.edu> wrote:
>>
>> > Briefly: each time an IDE channel is reset, this code reads pci config
>> > register 0x58, and saves it. For channel 0, it clears bit 0x04,
>> > writes it back to the register, waits a millisecond, then writes the
>> > original saved value back. For channel 1, it does the same with bit
>> > 0x08.
>>
>> Register 0x58 specifies the primary channel address setup timing.
>>
>> Only bits 0-2 are supposed to mean anything, the rest are reserved.
>> This workaround you describe, therefore, doesn't make much sense.
I went back to my source, and he told me I was incorrect in my earlier
description. The register which is modified is pci config register
0x58 on the PCI-ISA bridge, not the ide controller.
>> > I'm not sure what this register does, but the algorithm is easy enough
>> > to implement. However the kernel build is blowing out early, so I
>> > can't test it out:
>>
>> Need to update your build tools probably. I never use the make-deb script
>> myself, I always just build a vanilla tree to do my work.
It turns out I had to set MAKEFLAGS=CC=sparc64-linux-gcc.egcs64 in the
environment before running make-kpkg. Perhaps the instructions at
http://www.debian.org/ports/sparc/ should be updated, since the
--subarch=sun4u flag also causes package generation to fail. For the
benefit of the archives, I used this command to build a sparc64 kernel
deb from kernel-source-2.4.21:
# MAKEFLAGS=CC=sparc64-linux-gcc.egcs64 make-kpkg --revision=marc.1 kernel_image
This kernel seems to work, but I haven't tested it heavily, nor have I
tried adding the pci config magic yet.
Going back to your earlier suggestion that I boot with ide=nodma, that
made the system reliable. However, surprisingly, what didn't work was
using hdparm to disable dma. The system wouldn't even boot:
The output from /etc/init.d/hdparm:
Setting disc parameters:hda: DMA disabled
/dev/hda,hdc: DMA disabled
/dev/hdc, done.
Then immediately after, a bunch of status errors:
hdc: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdc: drive not ready for command
/etc/init.d/rcS:hdc: status error: status=0x58 line 54: /etc/r { cS.d/S20modutilsDriveReady : Permission denSeekComplete ied
DataRequest }
hdc: drive not ready for command
/etc/init.d/rcS:hdc: status error: status=0x58 line 54: /etc/r { cS.d/S25raid2: PDriveReady ermission deniedSeekComplete
DataRequest }
hdc: drive not ready for command
/etc/init.d/rcS:hdc: status error: status=0x58 xmalloc: cannot { allocate 154730DriveReady 497 bytes (0 bytSeekComplete es allocated)
DataRequest }
Then a bunch of these: (the disk is an 80gb disk)
attempt to access beyond end of device
16:01: rw=0, want=774766593, limit=522112
attempt to access beyond end of device
16:01: rw=0, want=1768843568, limit=522112
attempt to access beyond end of device
16:01: rw=0, want=851982, limit=522112
Finally, this, with the "failed to exec..." repeating forever:
kmod: runaway modprobe loop assumed and stopped
kmod: runaway modprobe loop assumed and stopped
kmod: failed to exec /sbin/modprobe -s -k binfmt-7f45, errno = 8
kmod: runaway modprobe loop assumed and stopped
kmod: runaway modprobe loop assumed and stopped
kmod: failed to exec /sbin/modprobe -s -k binfmt-7f45, errno = 8
kmod: failed to exec /sbin/modprobe -s -k binfmt-7f45, errno = 8
kmod: runaway modprobe loop assumed and stopped
kmod: failed to exec /sbin/modprobe -s -k binfmt-7f45, errno = 8
kmod: failed to exec /sbin/modprobe -s -k binfmt-7f45, errno = 8
kmod: failed to exec /sbin/modprobe -s -k binfmt-7f45, errno = 8
kmod: failed to exec /sbin/modprobe -s -k binfmt-7f45, errno = 8
Marc
Reply to: