aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss_cmd.h
diff options
context:
space:
mode:
authorMike Miller <mike.miller@hp.com>2005-09-13 04:25:22 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-13 11:22:30 -0400
commit33079b21978f478865068ee6a3c5807b6c6ecdbe (patch)
tree086035c299e4dcc0ab6af6623c53ac72be81b303 /drivers/block/cciss_cmd.h
parentddd474420a0b0dfeda38b6b5f83c7af751235cc3 (diff)
[PATCH] cciss: direct lookup for command completions
This patch changes the way we complete commands. In the old method when we got a completion we searched our command list from the top until we find it. This method uses a tag associated with each command (not SCSI command tagging) to index us directly to the completed command. This helps performance. Signed-off-by: Don Brace <dab@hp.com> Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/block/cciss_cmd.h')
-rw-r--r--drivers/block/cciss_cmd.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/block/cciss_cmd.h b/drivers/block/cciss_cmd.h
index a88a88817623..53fea549ba8b 100644
--- a/drivers/block/cciss_cmd.h
+++ b/drivers/block/cciss_cmd.h
@@ -226,6 +226,10 @@ typedef struct _ErrorInfo_struct {
226#define CMD_MSG_DONE 0x04 226#define CMD_MSG_DONE 0x04
227#define CMD_MSG_TIMEOUT 0x05 227#define CMD_MSG_TIMEOUT 0x05
228 228
229/* This structure needs to be divisible by 8 for new
230 * indexing method.
231 */
232#define PADSIZE (sizeof(long) - 4)
229typedef struct _CommandList_struct { 233typedef struct _CommandList_struct {
230 CommandListHeader_struct Header; 234 CommandListHeader_struct Header;
231 RequestBlock_struct Request; 235 RequestBlock_struct Request;
@@ -236,14 +240,14 @@ typedef struct _CommandList_struct {
236 ErrorInfo_struct * err_info; /* pointer to the allocated mem */ 240 ErrorInfo_struct * err_info; /* pointer to the allocated mem */
237 int ctlr; 241 int ctlr;
238 int cmd_type; 242 int cmd_type;
243 long cmdindex;
239 struct _CommandList_struct *prev; 244 struct _CommandList_struct *prev;
240 struct _CommandList_struct *next; 245 struct _CommandList_struct *next;
241 struct request * rq; 246 struct request * rq;
242 struct completion *waiting; 247 struct completion *waiting;
243 int retry_count; 248 int retry_count;
244#ifdef CONFIG_CISS_SCSI_TAPE
245 void * scsi_cmd; 249 void * scsi_cmd;
246#endif 250 char pad[PADSIZE];
247} CommandList_struct; 251} CommandList_struct;
248 252
249//Configuration Table Structure 253//Configuration Table Structure