[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091008141241.550a09bd@lxorguk.ukuu.org.uk>
Date: Thu, 8 Oct 2009 14:12:41 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Ian Abbott <abbotti@....co.uk>
Cc: Thomas Chou <thomas@...ron.com.tw>,
"linux-ide@...r.kernel.org" <linux-ide@...r.kernel.org>,
Nios2 development list <nios2-dev@...c.et.ntust.edu.tw>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ian Abbott <ian.abbott@....co.uk>
Subject: Re: [PATCH v2] ata: New PATA driver for Altera CompactFlash.
On Thu, 8 Oct 2009 12:22:22 +0100
Ian Abbott <abbotti@....co.uk> wrote:
> On 08/10/09 10:55, Alan Cox wrote:
> > On Thu, 8 Oct 2009 09:58:30 +0800
> > Thomas Chou <thomas@...ron.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists