Commit f5cb2d51 authored by Bart Van Assche's avatar Bart Van Assche Committed by Jens Axboe

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: default avatarBart 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: default avatarJens Axboe <axboe@kernel.dk>
parent 4633504c
...@@ -89,7 +89,6 @@ MODULE_DESCRIPTION("STEC s1120 PCIe SSD block driver"); ...@@ -89,7 +89,6 @@ MODULE_DESCRIPTION("STEC s1120 PCIe SSD block driver");
sizeof(struct fit_comp_error_info)) * SKD_N_COMPLETION_ENTRY) sizeof(struct fit_comp_error_info)) * SKD_N_COMPLETION_ENTRY)
/* 5 bits of uniqifier, 0xF800 */ /* 5 bits of uniqifier, 0xF800 */
#define SKD_ID_INCR (0x400)
#define SKD_ID_TABLE_MASK (3u << 8u) #define SKD_ID_TABLE_MASK (3u << 8u)
#define SKD_ID_RW_REQUEST (0u << 8u) #define SKD_ID_RW_REQUEST (0u << 8u)
#define SKD_ID_INTERNAL (1u << 8u) #define SKD_ID_INTERNAL (1u << 8u)
...@@ -921,9 +920,7 @@ static void skd_send_internal_skspcl(struct skd_device *skdev, ...@@ -921,9 +920,7 @@ static void skd_send_internal_skspcl(struct skd_device *skdev,
*/ */
return; return;
SKD_ASSERT((skspcl->req.id & SKD_ID_INCR) == 0);
skspcl->req.state = SKD_REQ_STATE_BUSY; skspcl->req.state = SKD_REQ_STATE_BUSY;
skspcl->req.id += SKD_ID_INCR;
scsi = &skspcl->msg_buf->scsi[0]; scsi = &skspcl->msg_buf->scsi[0];
scsi->hdr.tag = skspcl->req.id; scsi->hdr.tag = skspcl->req.id;
...@@ -1044,7 +1041,6 @@ static void skd_complete_internal(struct skd_device *skdev, ...@@ -1044,7 +1041,6 @@ static void skd_complete_internal(struct skd_device *skdev,
skspcl->req.completion = *skcomp; skspcl->req.completion = *skcomp;
skspcl->req.state = SKD_REQ_STATE_IDLE; skspcl->req.state = SKD_REQ_STATE_IDLE;
skspcl->req.id += SKD_ID_INCR;
status = skspcl->req.completion.status; status = skspcl->req.completion.status;
...@@ -1451,7 +1447,6 @@ static void skd_release_skreq(struct skd_device *skdev, ...@@ -1451,7 +1447,6 @@ static void skd_release_skreq(struct skd_device *skdev,
* Reclaim the skd_request_context * Reclaim the skd_request_context
*/ */
skreq->state = SKD_REQ_STATE_IDLE; skreq->state = SKD_REQ_STATE_IDLE;
skreq->id += SKD_ID_INCR;
} }
static int skd_isr_completion_posted(struct skd_device *skdev, static int skd_isr_completion_posted(struct skd_device *skdev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment