ATA link errors in custom PATA driver

Nathan Williams ngwilliams at gmail.com
Wed Sep 5 11:08:56 EDT 2018


Hi,

I have a Altera socfpga platform that implements a very basic ATA PIO0 Compact
Flash controller in the FPGA and I have a very basic PATA Linux driver that
does MMIO to the FPGA registers and configures 3 GPIOs for power, reset and
card detect. It's basically a copy of pata_platform.c with a check_status
function to read the card detect GPIO and if a card is detected, it switches
on the power GPIO and deasserts the reset GPIO.

The driver and FPGA CF controller work fine together for me except for an
intermittent issue where on boot I occasionally see the following:

[    5.836242] ata1: link is slow to respond, please be patient (ready=0)
[   10.816241] ata1: device not ready (errno=-16), forcing hardreset
[   16.016250] ata1: link is slow to respond, please be patient (ready=0)
[   20.876239] ata1: SRST failed (errno=-16)
[   26.076243] ata1: link is slow to respond, please be patient (ready=0)
[   30.936243] ata1: SRST failed (errno=-16)
[   36.136243] ata1: link is slow to respond, please be patient (ready=0)
[   65.956240] ata1: SRST failed (errno=-16)
[   70.976238] ata1: SRST failed (errno=-16)
[   70.981059] ata1: reset failed, giving up

This is occurs when there is no CF card plugged in, so I don't understand why
the driver appears to be trying to communicate with a Compact Flash device?

I'm a little stuck trying to figure out how to properly handle a hot pluggable
CF card, so any advice on this would be much appreciated.

Nathan



More information about the Kernelnewbies mailing list