Alan Cox wrote:
>> That would be the cleanest way to do it but I'm not sure whether all
>> controllers can live with that.  If I understand correctly, Some
>> controllers just have to have the whole transfer done atomically.  I
>> think Alan knows much better about this.  Alan?
> 
> Those controllers already do a local IRQ disable in their private
> ->data_xfer method so ought to be ok.

I think what Albert is suggesting is...

        if (last_sector) {
                for (i = 0; i < WORDS_IN_SECTORS - 1; i++)
                        ops->data_xfer(word);
                /* HERE */
                spin_lock_irq(ap->lock);
                ops->data_xfer(last word);
                ap->pflags &= ~WQ_IN_PROGRESS_STAY_AWAY_IRQHNDL;
                spin_unlock_irq(ap->lock);
        }

So, it basically splits the last sector into two transfers and nothing
prevents the machine from taking an interrupt at HERE.

Am I understanding it correctly Albert?

-- 
tejun
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to