Commit d85cb204 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

mtip32xx: don't use req->special

Instead create add to the icmd into struct mtip_cmd which can be unioned
with the scatterlist used for the normal I/O path.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 55c7bc37
...@@ -997,8 +997,6 @@ static int mtip_exec_internal_command(struct mtip_port *port, ...@@ -997,8 +997,6 @@ static int mtip_exec_internal_command(struct mtip_port *port,
return -EFAULT; return -EFAULT;
} }
rq->special = &icmd;
set_bit(MTIP_PF_IC_ACTIVE_BIT, &port->flags); set_bit(MTIP_PF_IC_ACTIVE_BIT, &port->flags);
if (fis->command == ATA_CMD_SEC_ERASE_PREP) if (fis->command == ATA_CMD_SEC_ERASE_PREP)
...@@ -1019,6 +1017,7 @@ static int mtip_exec_internal_command(struct mtip_port *port, ...@@ -1019,6 +1017,7 @@ static int mtip_exec_internal_command(struct mtip_port *port,
/* Copy the command to the command table */ /* Copy the command to the command table */
int_cmd = blk_mq_rq_to_pdu(rq); int_cmd = blk_mq_rq_to_pdu(rq);
int_cmd->icmd = &icmd;
memcpy(int_cmd->command, fis, fis_len*4); memcpy(int_cmd->command, fis, fis_len*4);
rq->timeout = timeout; rq->timeout = timeout;
...@@ -3548,8 +3547,8 @@ static blk_status_t mtip_issue_reserved_cmd(struct blk_mq_hw_ctx *hctx, ...@@ -3548,8 +3547,8 @@ static blk_status_t mtip_issue_reserved_cmd(struct blk_mq_hw_ctx *hctx,
struct request *rq) struct request *rq)
{ {
struct driver_data *dd = hctx->queue->queuedata; struct driver_data *dd = hctx->queue->queuedata;
struct mtip_int_cmd *icmd = rq->special;
struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq); struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq);
struct mtip_int_cmd *icmd = cmd->icmd;
struct mtip_cmd_hdr *hdr = struct mtip_cmd_hdr *hdr =
dd->port->command_list + sizeof(struct mtip_cmd_hdr) * rq->tag; dd->port->command_list + sizeof(struct mtip_cmd_hdr) * rq->tag;
struct mtip_cmd_sg *command_sg; struct mtip_cmd_sg *command_sg;
......
...@@ -321,6 +321,8 @@ struct mtip_cmd_sg { ...@@ -321,6 +321,8 @@ struct mtip_cmd_sg {
}; };
struct mtip_port; struct mtip_port;
struct mtip_int_cmd;
/* Structure used to describe a command. */ /* Structure used to describe a command. */
struct mtip_cmd { struct mtip_cmd {
void *command; /* ptr to command table entry */ void *command; /* ptr to command table entry */
...@@ -331,7 +333,10 @@ struct mtip_cmd { ...@@ -331,7 +333,10 @@ struct mtip_cmd {
int unaligned; /* command is unaligned on 4k boundary */ int unaligned; /* command is unaligned on 4k boundary */
union {
struct scatterlist sg[MTIP_MAX_SG]; /* Scatter list entries */ struct scatterlist sg[MTIP_MAX_SG]; /* Scatter list entries */
struct mtip_int_cmd *icmd;
};
int retries; /* The number of retries left for this command. */ int retries; /* The number of retries left for this command. */
......
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