diff options
| -rw-r--r-- | drivers/block/mtip32xx/mtip32xx.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 642f8ab675d4..b2012b76a0b6 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c | |||
| @@ -266,6 +266,12 @@ static void mtip_async_complete(struct mtip_port *port, | |||
| 266 | "Command tag %d failed due to TFE\n", tag); | 266 | "Command tag %d failed due to TFE\n", tag); |
| 267 | } | 267 | } |
| 268 | 268 | ||
| 269 | /* Unmap the DMA scatter list entries */ | ||
| 270 | dma_unmap_sg(&dd->pdev->dev, | ||
| 271 | command->sg, | ||
| 272 | command->scatter_ents, | ||
| 273 | command->direction); | ||
| 274 | |||
| 269 | /* Upper layer callback */ | 275 | /* Upper layer callback */ |
| 270 | if (likely(command->async_callback)) | 276 | if (likely(command->async_callback)) |
| 271 | command->async_callback(command->async_data, cb_status); | 277 | command->async_callback(command->async_data, cb_status); |
| @@ -273,12 +279,6 @@ static void mtip_async_complete(struct mtip_port *port, | |||
| 273 | command->async_callback = NULL; | 279 | command->async_callback = NULL; |
| 274 | command->comp_func = NULL; | 280 | command->comp_func = NULL; |
| 275 | 281 | ||
| 276 | /* Unmap the DMA scatter list entries */ | ||
| 277 | dma_unmap_sg(&dd->pdev->dev, | ||
| 278 | command->sg, | ||
| 279 | command->scatter_ents, | ||
| 280 | command->direction); | ||
| 281 | |||
| 282 | /* Clear the allocated and active bits for the command */ | 282 | /* Clear the allocated and active bits for the command */ |
| 283 | atomic_set(&port->commands[tag].active, 0); | 283 | atomic_set(&port->commands[tag].active, 0); |
| 284 | release_slot(port, tag); | 284 | release_slot(port, tag); |
| @@ -709,6 +709,12 @@ static void mtip_timeout_function(unsigned long int data) | |||
| 709 | */ | 709 | */ |
| 710 | writel(1 << bit, port->completed[group]); | 710 | writel(1 << bit, port->completed[group]); |
| 711 | 711 | ||
| 712 | /* Unmap the DMA scatter list entries */ | ||
| 713 | dma_unmap_sg(&port->dd->pdev->dev, | ||
| 714 | command->sg, | ||
| 715 | command->scatter_ents, | ||
| 716 | command->direction); | ||
| 717 | |||
| 712 | /* Call the async completion callback. */ | 718 | /* Call the async completion callback. */ |
| 713 | if (likely(command->async_callback)) | 719 | if (likely(command->async_callback)) |
| 714 | command->async_callback(command->async_data, | 720 | command->async_callback(command->async_data, |
| @@ -716,12 +722,6 @@ static void mtip_timeout_function(unsigned long int data) | |||
| 716 | command->async_callback = NULL; | 722 | command->async_callback = NULL; |
| 717 | command->comp_func = NULL; | 723 | command->comp_func = NULL; |
| 718 | 724 | ||
| 719 | /* Unmap the DMA scatter list entries */ | ||
| 720 | dma_unmap_sg(&port->dd->pdev->dev, | ||
| 721 | command->sg, | ||
| 722 | command->scatter_ents, | ||
| 723 | command->direction); | ||
| 724 | |||
| 725 | /* | 725 | /* |
| 726 | * Clear the allocated bit and active tag for the | 726 | * Clear the allocated bit and active tag for the |
| 727 | * command. | 727 | * command. |
