• Adrian Hunter's avatar
    mmc: block: Introduce queue semantics · cdf8a6fb
    Adrian Hunter authored
    Change from viewing the requests in progress as 'current' and 'previous',
    to viewing them as a queue. The current request is allocated to the first
    free slot. The presence of incomplete requests is determined from the
    count (mq->qcnt) of entries in the queue. Non-read-write requests (i.e.
    discards and flushes) are not added to the queue at all and require no
    special handling. Also no special handling is needed for the
    MMC_BLK_NEW_REQUEST case.
    
    As well as allowing an arbitrarily sized queue, the queue thread function
    is significantly simpler.
    Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
    Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    cdf8a6fb
queue.h 1.72 KB