Methods, circuits, and disk drive that correct errors in data that is
temporarily stored in a memory buffer are disclosed. An error detection
code and an error correction code are generated for data. The data, the
error detection code, and the error correction code are stored in the
memory buffer. The data is retrieved from the memory buffer and error
detected using the error detection code. In response to detecting an
error, the error correction code is applied to the retrieved data to
generate corrected data.