lkml.org 
[lkml]   [2000]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: DMA mapping

    > I have a nice piece of hardware, that manages state (32-bit handle)
    > for me. It is just a shame that I will have to hack further state
    > tracking on top.

    I had the same problem for the Qlogic cards- they return, either in a
    response queue entry or in two 16 bit registers, a 32 bit handle that
    identifies a completing command. But this was always sorta busted for alpha &&
    ultrasparc to try and figure out from this what the real address of the
    original command block was, so I just began using the handle as an index into
    a an array of pointers- turns out this is much cleaner and safer because a lot
    of times the Qlogic f/w is confused and returns garbage instead of the correct
    handle- it's much easier to detect this when you have an index in the range of
    0 to 1024 rather than assume what you get back from the card is a valid
    pointer.

    Moral: it's a bad practice to take candy from strangers (i.e., trust
    CPU pointers as returned out of I/O cards).




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

    \
     
     \ /
      Last update: 2005-03-22 13:56    [W:0.020 / U:0.208 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site