diff options
author | Stephen M. Cameron <scameron@beardog.cce.hp.com> | 2011-05-03 15:53:26 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-05-06 10:23:50 -0400 |
commit | 8f71bb829a964ef4deead86b60fda09452fb5c2f (patch) | |
tree | 56dbf22d3176523ecae574bfbc937dccabbba9eb /drivers/block/cciss.c | |
parent | e363e0143615a67f19d56e6b223b55df3bd9f580 (diff) |
cciss: get rid of message related magic numbers
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r-- | drivers/block/cciss.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index d60448941d53..1a4dff09c541 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -2569,7 +2569,7 @@ static int fill_cmd(ctlr_info_t *h, CommandList_struct *c, __u8 cmd, void *buff, | |||
2569 | } | 2569 | } |
2570 | } else if (cmd_type == TYPE_MSG) { | 2570 | } else if (cmd_type == TYPE_MSG) { |
2571 | switch (cmd) { | 2571 | switch (cmd) { |
2572 | case 0: /* ABORT message */ | 2572 | case CCISS_ABORT_MSG: |
2573 | c->Request.CDBLen = 12; | 2573 | c->Request.CDBLen = 12; |
2574 | c->Request.Type.Attribute = ATTR_SIMPLE; | 2574 | c->Request.Type.Attribute = ATTR_SIMPLE; |
2575 | c->Request.Type.Direction = XFER_WRITE; | 2575 | c->Request.Type.Direction = XFER_WRITE; |
@@ -2579,16 +2579,16 @@ static int fill_cmd(ctlr_info_t *h, CommandList_struct *c, __u8 cmd, void *buff, | |||
2579 | /* buff contains the tag of the command to abort */ | 2579 | /* buff contains the tag of the command to abort */ |
2580 | memcpy(&c->Request.CDB[4], buff, 8); | 2580 | memcpy(&c->Request.CDB[4], buff, 8); |
2581 | break; | 2581 | break; |
2582 | case 1: /* RESET message */ | 2582 | case CCISS_RESET_MSG: |
2583 | c->Request.CDBLen = 16; | 2583 | c->Request.CDBLen = 16; |
2584 | c->Request.Type.Attribute = ATTR_SIMPLE; | 2584 | c->Request.Type.Attribute = ATTR_SIMPLE; |
2585 | c->Request.Type.Direction = XFER_NONE; | 2585 | c->Request.Type.Direction = XFER_NONE; |
2586 | c->Request.Timeout = 0; | 2586 | c->Request.Timeout = 0; |
2587 | memset(&c->Request.CDB[0], 0, sizeof(c->Request.CDB)); | 2587 | memset(&c->Request.CDB[0], 0, sizeof(c->Request.CDB)); |
2588 | c->Request.CDB[0] = cmd; /* reset */ | 2588 | c->Request.CDB[0] = cmd; /* reset */ |
2589 | c->Request.CDB[1] = 0x03; /* reset a target */ | 2589 | c->Request.CDB[1] = CCISS_RESET_TYPE_TARGET; |
2590 | break; | 2590 | break; |
2591 | case 3: /* No-Op message */ | 2591 | case CCISS_NOOP_MSG: |
2592 | c->Request.CDBLen = 1; | 2592 | c->Request.CDBLen = 1; |
2593 | c->Request.Type.Attribute = ATTR_SIMPLE; | 2593 | c->Request.Type.Attribute = ATTR_SIMPLE; |
2594 | c->Request.Type.Direction = XFER_WRITE; | 2594 | c->Request.Type.Direction = XFER_WRITE; |