2005-09-06 19:02:10

by Jim Ramsay

[permalink] [raw]
Subject: Re: [PATCH 3/3] Add disk hotswap support to libata RESEND #2

Regarding the sata_promise.c patch, I think I have found a bug in the
interrupt handler:

Just before the 'try_hotplug' label, you provide a check that will
kick us out of the interrupt handler if the interrupt was just handled
by a DMA command completing successfully.

However, I have seen the occasion where a single IRQ is used to signal
both a DMA completion AND a hotplug event. Of course in this case the
hotplug event itself would be ignored completely.

So I would recommend getting rid of that check entirely.

--
Jim Ramsay
"Me fail English? That's unpossible!"


2005-09-15 04:40:32

by Lukasz Kosewski

[permalink] [raw]
Subject: Re: [PATCH 3/3] Add disk hotswap support to libata RESEND #2

On 9/6/05, Jim Ramsay <[email protected]> wrote:
> However, I have seen the occasion where a single IRQ is used to signal
> both a DMA completion AND a hotplug event. Of course in this case the
> hotplug event itself would be ignored completely.
>
> So I would recommend getting rid of that check entirely.

Hey Jim,

Not that I disbelieve you, but do you have an example of a controller
where this happens? I've done a lot of testing and never seen this...

Luke Kosewski

2005-09-16 16:11:54

by Mark Lord

[permalink] [raw]
Subject: Re: [PATCH 3/3] Add disk hotswap support to libata RESEND #2

Lukasz Kosewski wrote:
> On 9/6/05, Jim Ramsay <[email protected]> wrote:
>
>>However, I have seen the occasion where a single IRQ is used to signal
>>both a DMA completion AND a hotplug event. Of course in this case the
>>hotplug event itself would be ignored completely.
>>
>>So I would recommend getting rid of that check entirely.
>
>
> Hey Jim,
>
> Not that I disbelieve you, but do you have an example of a controller
> where this happens? I've done a lot of testing and never seen this...

I missed the beginning of this discussion,
but here's a data point:

The QStor SATA/RAID controller hardware fully supports hotplug
(and NCQ, TCQ, Host-Queuing, RAID 0/1/10, PM, etc..).

It uses a single interrupt for all onboard events from the four channels.
An internal "status FIFO" provides a readout for the interrupt handler
of recent happenings, in sequence, mixing together DMA-completions
with hotplug-events (insert, removal) and various fault-conditions.

All of this is supported in the out-of-tree qstor driver,
but only simple single-IO is supported by sata_qstor at present.

Dunno if that info is of any use to you in hotplug considerations.
Once the libata infrastructure for hotplug is in place,
I *may* experiment with adding that functionality to sata_qstor.

Cheers