Messages in this thread | | | Date | Tue, 7 Mar 2000 05:59:15 -0800 (PST) | From | Matthew Jacob <> | Subject | Re: 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/
| |