* [PATCH] NVMe: Write CC before calling enable.
@ 2014-07-01 15:51 Dan McLeran
2014-07-02 18:33 ` Keith Busch
0 siblings, 1 reply; 4+ messages in thread
From: Dan McLeran @ 2014-07-01 15:51 UTC (permalink / raw)
Write the controller configuration register to configure queue sizes,
memory page size, etc. from within nvme_configure_admin_queue before
calling nvme_enable_ctrl.
Signed-off-by: Dan McLeran <daniel.mcleran at intel.com>
---
drivers/block/nvme-core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index 28aec2d..58281d2 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -1512,6 +1512,7 @@ static int nvme_configure_admin_queue(struct nvme_dev *dev)
writel(aqa, &dev->bar->aqa);
writeq(nvmeq->sq_dma_addr, &dev->bar->asq);
writeq(nvmeq->cq_dma_addr, &dev->bar->acq);
+ writel(dev->ctrl_config, &dev->bar->cc);
result = nvme_enable_ctrl(dev, cap);
if (result)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] NVMe: Write CC before calling enable.
2014-07-01 15:51 [PATCH] NVMe: Write CC before calling enable Dan McLeran
@ 2014-07-02 18:33 ` Keith Busch
2014-07-02 20:18 ` Matthew Wilcox
0 siblings, 1 reply; 4+ messages in thread
From: Keith Busch @ 2014-07-02 18:33 UTC (permalink / raw)
On Tue, 1 Jul 2014, Dan McLeran wrote:
> Write the controller configuration register to configure queue sizes,
> memory page size, etc. from within nvme_configure_admin_queue before
> calling nvme_enable_ctrl.
I can see that you're doing that, but why? Is this fixing something?
> Signed-off-by: Dan McLeran <daniel.mcleran at intel.com>
> ---
> drivers/block/nvme-core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
> index 28aec2d..58281d2 100644
> --- a/drivers/block/nvme-core.c
> +++ b/drivers/block/nvme-core.c
> @@ -1512,6 +1512,7 @@ static int nvme_configure_admin_queue(struct nvme_dev *dev)
> writel(aqa, &dev->bar->aqa);
> writeq(nvmeq->sq_dma_addr, &dev->bar->asq);
> writeq(nvmeq->cq_dma_addr, &dev->bar->acq);
> + writel(dev->ctrl_config, &dev->bar->cc);
>
> result = nvme_enable_ctrl(dev, cap);
> if (result)
> --
> 1.7.10.4
>
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] NVMe: Write CC before calling enable.
2014-07-02 18:33 ` Keith Busch
@ 2014-07-02 20:18 ` Matthew Wilcox
2014-07-02 20:39 ` Dan McLeran
0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2014-07-02 20:18 UTC (permalink / raw)
On Wed, Jul 02, 2014@12:33:08PM -0600, Keith Busch wrote:
> On Tue, 1 Jul 2014, Dan McLeran wrote:
> >Write the controller configuration register to configure queue sizes,
> >memory page size, etc. from within nvme_configure_admin_queue before
> >calling nvme_enable_ctrl.
>
> I can see that you're doing that, but why? Is this fixing something?
I think I have created this confusion. In Dan's earlier patch, this
writel() was left in. I took it out as part of merging his patch (as
Dan himself had done in an earlier version of this patch). I didn't
see the point of writing everything but enable, then writing the enable
bit separately.
> >Signed-off-by: Dan McLeran <daniel.mcleran at intel.com>
> >---
> >drivers/block/nvme-core.c | 1 +
> >1 file changed, 1 insertion(+)
> >
> >diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
> >index 28aec2d..58281d2 100644
> >--- a/drivers/block/nvme-core.c
> >+++ b/drivers/block/nvme-core.c
> >@@ -1512,6 +1512,7 @@ static int nvme_configure_admin_queue(struct nvme_dev *dev)
> > writel(aqa, &dev->bar->aqa);
> > writeq(nvmeq->sq_dma_addr, &dev->bar->asq);
> > writeq(nvmeq->cq_dma_addr, &dev->bar->acq);
> >+ writel(dev->ctrl_config, &dev->bar->cc);
> >
> > result = nvme_enable_ctrl(dev, cap);
> > if (result)
> >--
> >1.7.10.4
> >
> >
> >_______________________________________________
> >Linux-nvme mailing list
> >Linux-nvme at lists.infradead.org
> >http://lists.infradead.org/mailman/listinfo/linux-nvme
> >
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] NVMe: Write CC before calling enable.
2014-07-02 20:18 ` Matthew Wilcox
@ 2014-07-02 20:39 ` Dan McLeran
0 siblings, 0 replies; 4+ messages in thread
From: Dan McLeran @ 2014-07-02 20:39 UTC (permalink / raw)
Yes, I think I got confused there. This is not necessary.
On Wed, 2 Jul 2014, Matthew Wilcox wrote:
> On Wed, Jul 02, 2014@12:33:08PM -0600, Keith Busch wrote:
>> On Tue, 1 Jul 2014, Dan McLeran wrote:
>>> Write the controller configuration register to configure queue sizes,
>>> memory page size, etc. from within nvme_configure_admin_queue before
>>> calling nvme_enable_ctrl.
>>
>> I can see that you're doing that, but why? Is this fixing something?
>
> I think I have created this confusion. In Dan's earlier patch, this
> writel() was left in. I took it out as part of merging his patch (as
> Dan himself had done in an earlier version of this patch). I didn't
> see the point of writing everything but enable, then writing the enable
> bit separately.
>
>>> Signed-off-by: Dan McLeran <daniel.mcleran at intel.com>
>>> ---
>>> drivers/block/nvme-core.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
>>> index 28aec2d..58281d2 100644
>>> --- a/drivers/block/nvme-core.c
>>> +++ b/drivers/block/nvme-core.c
>>> @@ -1512,6 +1512,7 @@ static int nvme_configure_admin_queue(struct nvme_dev *dev)
>>> writel(aqa, &dev->bar->aqa);
>>> writeq(nvmeq->sq_dma_addr, &dev->bar->asq);
>>> writeq(nvmeq->cq_dma_addr, &dev->bar->acq);
>>> + writel(dev->ctrl_config, &dev->bar->cc);
>>>
>>> result = nvme_enable_ctrl(dev, cap);
>>> if (result)
>>> --
>>> 1.7.10.4
>>>
>>>
>>> _______________________________________________
>>> Linux-nvme mailing list
>>> Linux-nvme at lists.infradead.org
>>> http://lists.infradead.org/mailman/listinfo/linux-nvme
>>>
>>
>> _______________________________________________
>> Linux-nvme mailing list
>> Linux-nvme at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-nvme
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-02 20:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-01 15:51 [PATCH] NVMe: Write CC before calling enable Dan McLeran
2014-07-02 18:33 ` Keith Busch
2014-07-02 20:18 ` Matthew Wilcox
2014-07-02 20:39 ` Dan McLeran
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.