So you're getting errors on your ATA device, how do you debug it? First, have a look at libata error messages to see what the error is. Second, if it's a SATA device, check the cables and power supply - SATA is notoriously susceptible to overloaded power supplies. Many new ATX PSUs have several 12V rails, see if you can put the device on a different rail, or a separate PSU altogether for testing.
Next, enable libata debug messages ...