diff options
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_cmnd.h | 4 | ||||
-rw-r--r-- | include/scsi/scsi_tcq.h | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 522a5f27f553..e119142e565e 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -53,6 +53,9 @@ struct scsi_pointer { | |||
53 | volatile int phase; | 53 | volatile int phase; |
54 | }; | 54 | }; |
55 | 55 | ||
56 | /* for scmd->flags */ | ||
57 | #define SCMD_TAGGED (1 << 0) | ||
58 | |||
56 | struct scsi_cmnd { | 59 | struct scsi_cmnd { |
57 | struct scsi_device *device; | 60 | struct scsi_device *device; |
58 | struct list_head list; /* scsi_cmnd participates in queue lists */ | 61 | struct list_head list; /* scsi_cmnd participates in queue lists */ |
@@ -132,6 +135,7 @@ struct scsi_cmnd { | |||
132 | * to be at an address < 16Mb). */ | 135 | * to be at an address < 16Mb). */ |
133 | 136 | ||
134 | int result; /* Status code from lower level driver */ | 137 | int result; /* Status code from lower level driver */ |
138 | int flags; /* Command flags */ | ||
135 | 139 | ||
136 | unsigned char tag; /* SCSI-II queued command tag */ | 140 | unsigned char tag; /* SCSI-II queued command tag */ |
137 | }; | 141 | }; |
diff --git a/include/scsi/scsi_tcq.h b/include/scsi/scsi_tcq.h index 1712dab6e00e..032df74b66d7 100644 --- a/include/scsi/scsi_tcq.h +++ b/include/scsi/scsi_tcq.h | |||
@@ -101,11 +101,9 @@ static inline void scsi_deactivate_tcq(struct scsi_device *sdev, int depth) | |||
101 | **/ | 101 | **/ |
102 | static inline int scsi_populate_tag_msg(struct scsi_cmnd *cmd, char *msg) | 102 | static inline int scsi_populate_tag_msg(struct scsi_cmnd *cmd, char *msg) |
103 | { | 103 | { |
104 | struct request *req = cmd->request; | 104 | if (cmd->flags & SCMD_TAGGED) { |
105 | |||
106 | if (blk_rq_tagged(req)) { | ||
107 | *msg++ = MSG_SIMPLE_TAG; | 105 | *msg++ = MSG_SIMPLE_TAG; |
108 | *msg++ = req->tag; | 106 | *msg++ = cmd->request->tag; |
109 | return 2; | 107 | return 2; |
110 | } | 108 | } |
111 | 109 | ||