Re: [PATCH 5/5 v2] nvme: LightNVM support

2015-04-16 Thread Matias Bjorling
Den 16-04-2015 kl. 16:55 skrev Keith Busch: On Wed, 15 Apr 2015, Matias Bjørling wrote: @@ -2316,7 +2686,9 @@ static int nvme_dev_add(struct nvme_dev *dev) struct nvme_id_ctrl *ctrl; void *mem; dma_addr_t dma_addr; -int shift = NVME_CAP_MPSMIN(readq(&dev->bar->cap)) + 12; +u6

RE: [PATCH 5/5 v2] nvme: LightNVM support

2015-04-16 Thread Keith Busch
On Thu, 16 Apr 2015, James R. Bergsten wrote: My two cents worth is that it's (always) better to put ALL the commands into one place so that the entire set can be viewed at once and thus avoid inadvertent overloading of an opcode. Otherwise you don't know what you don't know. Yes, but these ar

RE: [PATCH 5/5 v2] nvme: LightNVM support

2015-04-16 Thread James R. Bergsten
Re: [PATCH 5/5 v2] nvme: LightNVM support On Thu, 16 Apr 2015, Javier González wrote: >> On 16 Apr 2015, at 16:55, Keith Busch wrote: >> >> Otherwise it looks pretty good to me, but I think it would be cleaner >> if the lightnvm stuff is not mixed in the same file wit

Re: [PATCH 5/5 v2] nvme: LightNVM support

2015-04-16 Thread Keith Busch
On Thu, 16 Apr 2015, Javier González wrote: On 16 Apr 2015, at 16:55, Keith Busch wrote: Otherwise it looks pretty good to me, but I think it would be cleaner if the lightnvm stuff is not mixed in the same file with the standard nvme command set. We might end up splitting nvme-core in the futur

Re: [PATCH 5/5 v2] nvme: LightNVM support

2015-04-16 Thread Javier González
Hi, > On 16 Apr 2015, at 16:55, Keith Busch wrote: > > On Wed, 15 Apr 2015, Matias Bjørling wrote: >> @@ -2316,7 +2686,9 @@ static int nvme_dev_add(struct nvme_dev *dev) >> struct nvme_id_ctrl *ctrl; >> void *mem; >> dma_addr_t dma_addr; >> -int shift = NVME_CAP_MPSMIN(readq(&

Re: [PATCH 5/5 v2] nvme: LightNVM support

2015-04-16 Thread Keith Busch
On Wed, 15 Apr 2015, Matias Bjørling wrote: @@ -2316,7 +2686,9 @@ static int nvme_dev_add(struct nvme_dev *dev) struct nvme_id_ctrl *ctrl; void *mem; dma_addr_t dma_addr; - int shift = NVME_CAP_MPSMIN(readq(&dev->bar->cap)) + 12; + u64 cap = readq(&dev->bar->ca

[PATCH 5/5 v2] nvme: LightNVM support

2015-04-15 Thread Matias Bjørling
The first generation of Open-Channel SSDs will be based on NVMe. The integration requires that a NVMe device exposes itself as a LightNVM device. The way this is done currently is by hooking into the Controller Capabilities (CAP register) and a bit in NSFEAT for each namespace. After detection, ve