lkml.org 
[lkml]   [2002]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: 2.5.6: ide driver broken in PIO mode
    Andre Hedrick wrote:
    >
    > ...
    > Suparna understands the problem and it is a solution I have described,
    > and I have been working with her on a solution but I suspect you will not
    > take it. Because it requires an in process operation of traversing
    > several BIOS' in order to statisfy the hardware atomic.

    I think I understood the problem a couple of days ago. Let
    me try to express it:

    For a PIO-mode transfer, the driver needs to pump (say) 8192
    bytes under CPU control into the host controller. Later, an
    interrupt comes back from the device which says "that worked",
    or "I/O error".

    So clearly the driver has to not signal completion against those
    8192 bytes until the interrupt comes in.

    So the driver needs to hang on to those 8192 bytes.

    And those 8192 bytes may be represented by two vectors in a single
    BIO. That's OK. The problem occurs when those 8192 bytes are
    encapsulated in *mutliple* BIOs in a single request. This is the
    common case.

    Apparently, the interface which is offered to the device driver
    requires that the driver signal completion against the Nth BIO
    before the driver can advance onto the N+1th BIO in the request.
    As a consequence of this, the driver is accidentally signalling
    completion against the Nth BIO *before* that interrupt has come
    back. So we're telling userspace that the read or write was OK
    before we actually know that this is true.

    So it seems that the IDE driver currently has some non-working
    workarounds in place for this problem.

    Andre, is this an accurate description?

    If so, then it would seem that either

    a) Someone needs to tell Andre (in simple, storage-person terms :))
    what the recommended workaround is or

    b) The block layer needs to be extended so the driver can walk
    all the request's segments prior to signalling completion
    against any of them.

    -
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:24    [W:2.691 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site