Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit 852b70eca145437991a22f862baccf67fe21ecd7
- Author: Jens Axboe <axboe@kernel.dk>
- Date: Tue Feb 15 14:33:50 2022 -0700
- apple-nvme: serialize command issue
- Signed-off-by: Jens Axboe <axboe@kernel.dk>
- diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
- index 56a3d05cd8bc..06f77adfc3b7 100644
- --- a/drivers/nvme/host/apple.c
- +++ b/drivers/nvme/host/apple.c
- @@ -189,6 +189,8 @@ struct apple_nvme {
- struct nvme_ctrl ctrl;
- struct work_struct remove_work;
- + spinlock_t sq_lock;
- +
- struct apple_nvme_queue adminq;
- struct apple_nvme_queue ioq;
- @@ -309,7 +311,9 @@ static void apple_nvme_submit_cmd(struct apple_nvme_queue *q,
- tcb->dma_flags |= APPLE_ANS_TCB_DMA_FROM_DEVICE;
- memcpy(&q->sqes[tag], cmd, sizeof(*cmd));
- + spin_lock(&anv->sq_lock);
- writel(tag, q->sq_db);
- + spin_unlock(&anv->sq_lock);
- }
- /*
- @@ -1350,6 +1354,7 @@ static int apple_nvme_probe(struct platform_device *pdev)
- INIT_WORK(&anv->ctrl.reset_work, apple_nvme_reset_work);
- INIT_WORK(&anv->remove_work, apple_nvme_remove_dead_ctrl_work);
- spin_lock_init(&anv->lock);
- + spin_lock_init(&anv->sq_lock);
- ret = apple_nvme_queue_alloc(anv, &anv->adminq);
- if (ret)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement