mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: Thomas Chou <thomas@wytron.com.tw>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	Nios2 development list <nios2-dev@sopc.et.ntust.edu.tw>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Ian Abbott <ian.abbott@mev.co.uk>
Subject: Re: [PATCH v2] ata: New PATA driver for Altera CompactFlash.
Date: Thu, 8 Oct 2009 14:12:41 +0100	[thread overview]
Message-ID: <20091008141241.550a09bd@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <4ACDCB6E.4040905@mev.co.uk>

On Thu, 8 Oct 2009 12:22:22 +0100
Ian Abbott <abbotti@mev.co.uk> wrote:

> On 08/10/09 10:55, Alan Cox wrote:
> > On Thu,  8 Oct 2009 09:58:30 +0800
> > Thomas Chou <thomas@wytron.com.tw> wrote:
> > 
> >> This patch adds a new PATA driver to support the Altera SOPC Builder
> >> CompactFlash component as a PATA device with support for insertion
> >> and removal of CF cards.  It uses the platform driver model.
> > 
> > Can you explain why you remove the interface rather than the device on
> > the interface when you detect a card removal ?
> 
> As the originator of the driver, the only answer I have is "I don't know
> how."  I was hoping for inspiration from some of the other PATA CF
> drivers, but alas, I couldn't find it.  I admit that removing the whole
> ATA host is a bit on the extreme side.

I think the bit you want is something like:

	struct ata_eh_info *ehi = &ap->link->eh_info;
	if (mumblemumble & whatever) {
		ata_ehi_clear_desc(ehi);
		ata_ehi_hotplugged(ehi);
		ata_ehi_push_desc(ehi, "CF connection changed");
		ata_port_freeze(ap);
	}

The core code also assumes your freeze method will mask any further
connection change reports until the port is unfrozen (so you don't get
multiple parallel "in/out/in/out" events at once)

Alan

  reply	other threads:[~2009-10-08 13:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-08  1:58 Thomas Chou
2009-10-08  9:55 ` Alan Cox
2009-10-08 11:22   ` Ian Abbott
2009-10-08 13:12     ` Alan Cox [this message]
2009-11-19 23:27 ` Jeff Garzik

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=20091008141241.550a09bd@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=abbotti@mev.co.uk \
    --cc=ian.abbott@mev.co.uk \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nios2-dev@sopc.et.ntust.edu.tw \
    --cc=thomas@wytron.com.tw \
    /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

all inboxes | Powered by JetHome®