diff options
| author | Bartlomiej Zolnierkiewicz <b.zolnierkiewicz@elka.pw.edu.pl> | 2003-11-03 16:01:30 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-11-03 16:01:30 -0800 |
| commit | b4a427fe5ed22fc1d64202303d6098463b4daf6c (patch) | |
| tree | 0f4c78064a37ca7d644f489ce61f0572f1aa9b27 /include/linux | |
| parent | 0d308a7943836128c5bf48cd643b0594f7cc8a9e (diff) | |
[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.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/blkdev.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index faa2ec1265e6..dcd5911223d0 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -193,6 +193,11 @@ enum rq_flag_bits { __REQ_PM_SUSPEND, /* suspend request */ __REQ_PM_RESUME, /* resume request */ __REQ_PM_SHUTDOWN, /* shutdown request */ + __REQ_IDETAPE_PC1, /* packet command (first stage) */ + __REQ_IDETAPE_PC2, /* packet command (second stage) */ + __REQ_IDETAPE_READ, + __REQ_IDETAPE_WRITE, + __REQ_IDETAPE_READ_BUFFER, __REQ_NR_BITS, /* stops here */ }; @@ -218,6 +223,11 @@ enum rq_flag_bits { #define REQ_PM_SUSPEND (1 << __REQ_PM_SUSPEND) #define REQ_PM_RESUME (1 << __REQ_PM_RESUME) #define REQ_PM_SHUTDOWN (1 << __REQ_PM_SHUTDOWN) +#define REQ_IDETAPE_PC1 (1 << __REQ_IDETAPE_PC1) +#define REQ_IDETAPE_PC2 (1 << __REQ_IDETAPE_PC2) +#define REQ_IDETAPE_READ (1 << __REQ_IDETAPE_READ) +#define REQ_IDETAPE_WRITE (1 << __REQ_IDETAPE_WRITE) +#define REQ_IDETAPE_READ_BUFFER (1 << __REQ_IDETAPE_READ_BUFFER) /* * State information carried for REQ_PM_SUSPEND and REQ_PM_RESUME |
