kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: ngwilliams@gmail.com (Nathan Williams)
To: kernelnewbies@lists.kernelnewbies.org
Subject: ATA link errors in custom PATA driver
Date: Thu, 6 Sep 2018 01:08:56 +1000	[thread overview]
Message-ID: <20180905150856.GA2173@linux.localdomain> (raw)

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

                 reply	other threads:[~2018-09-05 15:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180905150856.GA2173@linux.localdomain \
    --to=ngwilliams@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).