• Bartlomiej Zolnierkiewicz's avatar
    [PATCH] fix rq->flags use in ide-tape.c · b4a427fe
    Bartlomiej Zolnierkiewicz authored
    Noticed by Stuart_Hayes@Dell.com:
    
    I've noticed that, in the 2.6 (test 9) kernel, the "cmd" field (of type int)
    in struct request has been removed, and it looks like all of the code in
    ide-tape has just had a find & replace run on it to replace any instance of
    rq.cmd or rq->cmd with rq.flags or rq->flags.
    
    The values being put into "cmd" in 2.4 (now "flags", in 2.6) by ide-tape are
    8-bit numbers, like 90, 91, etc... and the actual flags that are being used
    in "flags" cover the low 23 bits.  So, not only do the flags get wiped out
    when, say, ide-tape assigns, say, 90 to "flags", but also the 90 gets wiped
    out when one of the flags is modified.
    
    I noticed this, because ide-tape checks this value, and spews error codes
    when it isn't correct--continuously--as soon as you load the module, because
    ide-tape is calling ide_do_drive_cmd with an action of ide_preempt, which
    causes ide_do_drive_cmd to set the REQ_PREEMPT flag, so "flags" isn't the
    same when it gets back to idetape_do_request.
    b4a427fe
ll_rw_blk.c 73 KB