Adventures In Tech

Icon

A technology blog by Ross Macduff

DMA disk kernel errors

At work I was seeing the following errors in /var/log/messages on a RHEL5 box

 Nov  2 10:35:26 host kernel: hdc: dma_intr: status=0x51 { DriveReady SeekComplete Error }
 Nov  2 10:35:26 host kernel: hdc: dma_intr: error=0x84 { DriveStatusError BadCRC }
 Nov  2 10:35:26 host kernel: ide: failed opcode was: unknown

My initial thought was that this was a sign of a failing disk so I ran smartctl on it. The results of that showed that the drive was healthy.  A quick google indicated that these errors indicate an issue with incorrectly set DMA parameters.

When I set this box up I failed to notice that hdc was attached to the bus with a 40-pin cable.  For some reason the kernel was not seeing this limitation during boot and incorrectly set the drive to use UDMA mode 4, which as far as I know is not possible with a 40-pin cable.  I manually set the drive to use UDMA mode 2 with

 hdparm -X  udma2 /dev/hdc

After that, the errors were no longer showing up.

I wasn’t sure if the bus that this drive was on supported higher UDMA transfer rates so I put in an 80-pin cable.  The system came up and strangely enough the drive was seen as supporting only UDMA2.  That indicated to me that the bus could not support the higher UDMA rates so I put the 40-pin cable back in.

Now when the system came back up it was automatically setting it at UDMA3. Now this was the same setup I had when the drive was being seen as supporting UDMA4.  This time, though, there were none of the above errors in the logs, so I was happy.

Still I am not sure how UDMA3 was being supported on a 40-pin cable.  I thought that an 80-pin cable was required.  Need to read more on the ATA specs.

References

  1. AT Attachment, http://en.wikipedia.org/w/index.php?title=AT_Attachment&oldid=250645856 (last visited Nov. 13, 2008).
  2. man hdparm

Filed under: Hardware, Sysadmin, linux