diff options
author | Bart Van Assche <bart.vanassche@wdc.com> | 2017-08-25 17:24:14 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-08-25 17:29:45 -0400 |
commit | f5cb2d51524a1218bb0c5d8b234044e9104f7062 (patch) | |
tree | 2e8a43324f49cca14508d313d7ab11bf94bb76ca | |
parent | 4633504c1a3a452ff03a5dbe50beb082fa1bfac6 (diff) |
skd: Remove SKD_ID_INCR
The SKD_ID_INCR flag in skd_request_context.id duplicates information
that is already available otherwise, e.g. through the block layer
request state and through skd_request_context.state. Hence remove
the code that manipulates this flag and also the flag itself.
Since skd_isr_completion_posted() only uses the lower bits of
skd_request_context.id as hardware tag, this patch does not change
the behavior of the skd driver. I'm referring to the following code:
tag = req_id & SKD_ID_SLOT_AND_TABLE_MASK;
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | drivers/block/skd_main.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c index 34188a600bfa..00a86252b3c5 100644 --- a/drivers/block/skd_main.c +++ b/drivers/block/skd_main.c | |||
@@ -89,7 +89,6 @@ MODULE_DESCRIPTION("STEC s1120 PCIe SSD block driver"); | |||
89 | sizeof(struct fit_comp_error_info)) * SKD_N_COMPLETION_ENTRY) | 89 | sizeof(struct fit_comp_error_info)) * SKD_N_COMPLETION_ENTRY) |
90 | 90 | ||
91 | /* 5 bits of uniqifier, 0xF800 */ | 91 | /* 5 bits of uniqifier, 0xF800 */ |
92 | #define SKD_ID_INCR (0x400) | ||
93 | #define SKD_ID_TABLE_MASK (3u << 8u) | 92 | #define SKD_ID_TABLE_MASK (3u << 8u) |
94 | #define SKD_ID_RW_REQUEST (0u << 8u) | 93 | #define SKD_ID_RW_REQUEST (0u << 8u) |
95 | #define SKD_ID_INTERNAL (1u << 8u) | 94 | #define SKD_ID_INTERNAL (1u << 8u) |
@@ -921,9 +920,7 @@ static void skd_send_internal_skspcl(struct skd_device *skdev, | |||
921 | */ | 920 | */ |
922 | return; | 921 | return; |
923 | 922 | ||
924 | SKD_ASSERT((skspcl->req.id & SKD_ID_INCR) == 0); | ||
925 | skspcl->req.state = SKD_REQ_STATE_BUSY; | 923 | skspcl->req.state = SKD_REQ_STATE_BUSY; |
926 | skspcl->req.id += SKD_ID_INCR; | ||
927 | 924 | ||
928 | scsi = &skspcl->msg_buf->scsi[0]; | 925 | scsi = &skspcl->msg_buf->scsi[0]; |
929 | scsi->hdr.tag = skspcl->req.id; | 926 | scsi->hdr.tag = skspcl->req.id; |
@@ -1044,7 +1041,6 @@ static void skd_complete_internal(struct skd_device *skdev, | |||
1044 | 1041 | ||
1045 | skspcl->req.completion = *skcomp; | 1042 | skspcl->req.completion = *skcomp; |
1046 | skspcl->req.state = SKD_REQ_STATE_IDLE; | 1043 | skspcl->req.state = SKD_REQ_STATE_IDLE; |
1047 | skspcl->req.id += SKD_ID_INCR; | ||
1048 | 1044 | ||
1049 | status = skspcl->req.completion.status; | 1045 | status = skspcl->req.completion.status; |
1050 | 1046 | ||
@@ -1451,7 +1447,6 @@ static void skd_release_skreq(struct skd_device *skdev, | |||
1451 | * Reclaim the skd_request_context | 1447 | * Reclaim the skd_request_context |
1452 | */ | 1448 | */ |
1453 | skreq->state = SKD_REQ_STATE_IDLE; | 1449 | skreq->state = SKD_REQ_STATE_IDLE; |
1454 | skreq->id += SKD_ID_INCR; | ||
1455 | } | 1450 | } |
1456 | 1451 | ||
1457 | static int skd_isr_completion_posted(struct skd_device *skdev, | 1452 | static int skd_isr_completion_posted(struct skd_device *skdev, |