CMD649 driver in 2.5.5x
As of 2.5.59, the CMD649 IDE driver is still completely hosed. It reliably corrupts filesystems and trying to turn on DMA mode on a zx1-based machine will cause an I/O TLB error. The backtrace starts like this:
[<e0000000048c4b50>] sba_map_sg+0x410/0x7a0 sp=0xe00000003d6afc90 bsp=0xe00000003d6a94d0 [<e0000000047de490>] ide_build_dmatable+0x330/0x340 sp=0xe00000003d6afcb0 bsp=0xe00000003d6a9478 [<e0000000047defd0>] ide_start_dma+0x50/0x1a0 sp=0xe00000003d6afcb0 bsp=0xe00000003d6a9438 [<e0000000047df190>] __ide_dma_read+0x70/0x260 sp=0xe00000003d6afcb0 bsp=0xe00000003d6a9400 [<e0000000047c64e0>] do_rw_disk+0x4a0/0x1220 sp=0xe00000003d6afcb0 bsp=0xe00000003d6a9358
Someone want to take a look?
--david
Quoted 3 lines · David Mosberger
As of 2.5.59, the CMD649 IDE driver is still completely hosed. It reliably corrupts filesystems and trying to turn on DMA mode on a zx1-based machine will cause an I/O TLB error.
I'm pretty sure RH AS and 2.4.20 isn't seeing those kinds of problems. It's been passing stress testing and such. I suspect the problem is someone is rewriting the IDE subsystem and maybe some changes are needed to adopt cmd649 for that. Khalid would be the right person to look at this but he's back working on Telco stuff again.
Quoted 8 lines
The backtrace starts
like this:[<e0000000048c4b50>] sba_map_sg+0x410/0x7a0 sp=0xe00000003d6afc90 bsp=0xe00000003d6a94d0 [<e0000000047de490>] ide_build_dmatable+0x330/0x340 sp=0xe00000003d6afcb0 bsp=0xe00000003d6a9478 [<e0000000047defd0>] ide_start_dma+0x50/0x1a0 sp=0xe00000003d6afcb0 bsp=0xe00000003d6a9438 [<e0000000047df190>] __ide_dma_read+0x70/0x260 sp=0xe00000003d6afcb0 bsp=0xe00000003d6a9400 [<e0000000047c64e0>] do_rw_disk+0x4a0/0x1220 sp=0xe00000003d6afcb0 bsp=0xe00000003d6a9358
IIRC, cmd649 driver isn't involved with DMA table/DMA mapping and this stack trace suggests that's still true.
Quoted 1 line
Someone want to take a look?
I'll take a whack at it if we can get 2.5.59 to boot/run from our CVS linux-2.5 (which is merged to 2.5.59).
grant
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · On Thu, 30 Jan 2003 13:58:13 -0800, [email protected] (Grant Grundler) said:
Grant> I'm pretty sure RH AS and 2.4.20 isn't seeing those kinds of problems.
Yes, 2.4.xx is definitely fine.
Grant> It's been passing stress testing and such. I suspect the problem Grant> is someone is rewriting the IDE subsystem and maybe some changes Grant> are needed to adopt cmd649 for that.
No, the IDE subsystem is actually back to basically 2.4.xx with "some" changes. So it shouldn't be too bad.
Grant> I'll take a whack at it if we can get 2.5.59 to boot/run from our Grant> CVS linux-2.5 (which is merged to 2.5.59).
OK, that would be great. Thanks!
--david
Quoted 2 lines · David Mosberger
No, the IDE subsystem is actually back to basically 2.4.xx with "some" changes. So it shouldn't be too bad.
"some" is pretty loosely defined (ide-cd.c, 2.4.20 vs 2.5.59):
o substantial changes in the request_sense error handling,
o a new interrupt handler,
o some sort of new block merging code (blk_attempt_remerge()).
o just for ide-cd.c, "diff -up" output is 2988 lines
But primarily, I'm concerned about these type of changes:
if (info->cmd = READ) {
- info->dma = !HWIF(drive)->dmaproc(ide_dma_read, drive);
+ info->dma = !HWIF(drive)->ide_dma_read(drive);
} else if (info->cmd = WRITE) {
- info->dma = !HWIF(drive)->dmaproc(ide_dma_write, drive);
+ info->dma = !HWIF(drive)->ide_dma_write(drive);
} else {
printk("ide-cd: DMA set, but not allowed\n");It means someone had to rewrite cmd64x.c to match those changes. I was looking for one of the key changes to ide-cd (start DMA after sending the cmd) and it is in 2.5.59.
The new block merging code (if used for ide-disk.c) could introduce the kind of data corruption bug you saw.
I'll review cmd64x.c next.
Quoted 4 lines
Grant> I'll take a whack at it if we can get 2.5.59 to boot/run from our Grant> CVS linux-2.5 (which is merged to 2.5.59).
OK, that would be great. Thanks!
Well, as of this evening, I've hung my rx2600 (disabled offending features) several times and most recently mca'd my rx2600 4 times. I'm still am not clueful what is causing the MCA.
Anyone have a .config they know boots on rx2600?
I noticed I'm using CONFIG_IA64_HP_ZX1 and not CONFIG_IA64_DIG. I might switch to DIG for now.
grant
Quoted 2 lines · David Mosberger
No, the IDE subsystem is actually back to basically 2.4.xx with "some" changes. So it shouldn't be too bad.
The IDE core in 2.5 is basically that in 2.4-ac, which is in the 2.4.21 prepatches.
Signature · 3 lines
"It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk
Quoted 3 lines · David Mosberger
As of 2.5.59, the CMD649 IDE driver is still completely hosed. It reliably corrupts filesystems and trying to turn on DMA mode on a zx1-based machine will cause an I/O TLB error.
I finally got a 2.5.59 kernel to boot on the RX2600. I disabled CONFIG_IA64_HP_ZX1 and used CONFIG_IA64_DIG instead. Something is broken with ZX1 specific support. :^(
Quoted 11 lines
[<e0000000048c4b50>] sba_map_sg+0x410/0x7a0 sp=0xe00000003d6afc90 bsp=0xe000 00003d6a94d0 [<e0000000047de490>] ide_build_dmatable+0x330/0x340 sp=0xe00000003d6afcb0 bs p=0xe00000003d6a9478 [<e0000000047defd0>] ide_start_dma+0x50/0x1a0 sp=0xe00000003d6afcb0 bsp=0xe0 0000003d6a9438 [<e0000000047df190>] __ide_dma_read+0x70/0x260 sp=0xe00000003d6afcb0 bsp=0xe 00000003d6a9400 [<e0000000047c64e0>] do_rw_disk+0x4a0/0x1220 sp=0xe00000003d6afcb0 bsp=0xe00 000003d6a9358
Quoted 1 line
Someone want to take a look?
Given this was read path showing the symptom, I expected I could reproduce this with CD-ROM Rx2600. not the case. :^(
gsyprf3:~# dd if=/dev/hda of=/tmp/debian-ia32.iso bs=2k
hda: cdrom_decode_status: status=0x51 { DriveReady SeekComplete Error }
hda: cdrom_decode_status: error=0x34Aborted Command LastFailedSense 0x03
hda: cdrom_decode_status: status=0x51 { DriveReady SeekComplete Error }
hda: cdrom_decode_status: error=0x34Aborted Command LastFailedSense 0x03
hda: cdrom_decode_status: status=0x51 { DriveReady SeekComplete Error }
...
hda: cdrom_decode_status: error=0x34Aborted Command LastFailedSense 0x03
hda: ide_intr: huh? expected NULL handler on exit
hda: ATAPI reset complete
ide-cd: hard_nr_sectors differs from nr_sectors! 4 8
end_request: I/O error, dev hda, sector 1174400
Buffer I/O error on device ide0(3,0), logical block 146800
dd: reading `/dev/hda': Input/output error
293600+0 records in
293600+0 records out
601292800 bytes transferred in 353.510907 seconds (1700917 bytes/sec)
gsyprf3:~# hdparm /dev/hda/dev/hda:
HDIO_GET_MULTCOUNT failed: Inappropriate ioctl for device
I/O support = 0 (default 16-bit) unmaskirq = 0 (off) using_dma = 0 (off) keepsettings = 0 (off)
HDIO_GET_NOWERR failed: Inappropriate ioctl for device
readonly = 1 (on)
readahead = 256 (on)
HDIO_GETGEO failed: Inappropriate ioctl for device
busstate = 1 (on)
gsyprf3:~#
While it had problem reading the CD drive, it completed without crashing the box. hmm...seems DMA was disabled at some point since I started with DMA enabled (default):
gsyprf3:~# hdparm /dev/hda
/dev/hda:
HDIO_GET_MULTCOUNT failed: Inappropriate ioctl for device
I/O support = 0 (default 16-bit) unmaskirq = 0 (off) using_dma = 1 (on) keepsettings = 0 (off)
HDIO_GET_NOWERR failed: Inappropriate ioctl for device
readonly = 1 (on)
readahead = 256 (on)
HDIO_GETGEO failed: Inappropriate ioctl for device
busstate = 1 (on)
gsyprf3:~#
Details:
2.5.59 kernel + linux-2.5.59-ia64-030124.diff.gz + a few minor changes gcc version 3.2.1 20020924 (Debian prerelease) GNU assembler version 2.13.90 (ia64-unknown-linux-gnu) using BFD version 2.13.90 20030125
I'll make a patch that contains the "few minor changes" shortly. Need to get all the source tree on one machine.
grant
Quoted 3 lines · Grant Grundler
While it had problem reading the CD drive, it completed without crashing the box. hmm...seems DMA was disabled at some point since I started with DMA enabled (default):
AIUI that's normal -- if an error occurs during DMA, the spec says we drop down to PIO. But I thought that was only for the retry, not for subsequent operations.
Signature · 3 lines
"It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk