]> git.hungrycats.org Git - linux/commit
[PATCH] fix rq->flags use in ide-tape.c
authorBartlomiej Zolnierkiewicz <b.zolnierkiewicz@elka.pw.edu.pl>
Tue, 4 Nov 2003 00:01:30 +0000 (16:01 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 4 Nov 2003 00:01:30 +0000 (16:01 -0800)
commitb4a427fe5ed22fc1d64202303d6098463b4daf6c
tree0f4c78064a37ca7d644f489ce61f0572f1aa9b27
parent0d308a7943836128c5bf48cd643b0594f7cc8a9e
[PATCH] fix rq->flags use in ide-tape.c

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.
drivers/block/ll_rw_blk.c
drivers/ide/ide-tape.c
include/linux/blkdev.h