All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] lightnvm: remove mlc pairs structure
@ 2018-01-30 13:26 Matias Bjørling
  2018-01-30 13:26 ` [PATCH 2/2] lightnvm: remove multiple groups in 1.2 data structure Matias Bjørling
  2018-01-31  2:00 ` [PATCH 1/2] lightnvm: remove mlc pairs structure Javier González
  0 siblings, 2 replies; 6+ messages in thread
From: Matias Bjørling @ 2018-01-30 13:26 UTC (permalink / raw)
  To: linux-block; +Cc: linux-kernel, Matias Bjørling

The known implementations of the 1.2 specification, and upcoming 2.0
implementation all expose a sequential list of pages to write.
Remove the data structure, as it is no longer needed.

Signed-off-by: Matias Bjørling <m@bjorling.me>
---
 drivers/nvme/host/lightnvm.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index 50ef71ee3d86..16906327645e 100644
--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -116,17 +116,6 @@ struct nvme_nvm_command {
 	};
 };
 
-#define NVME_NVM_LP_MLC_PAIRS 886
-struct nvme_nvm_lp_mlc {
-	__le16			num_pairs;
-	__u8			pairs[NVME_NVM_LP_MLC_PAIRS];
-};
-
-struct nvme_nvm_lp_tbl {
-	__u8			id[8];
-	struct nvme_nvm_lp_mlc	mlc;
-};
-
 struct nvme_nvm_id_group {
 	__u8			mtype;
 	__u8			fmtype;
@@ -150,8 +139,7 @@ struct nvme_nvm_id_group {
 	__le32			mpos;
 	__le32			mccap;
 	__le16			cpar;
-	__u8			reserved[10];
-	struct nvme_nvm_lp_tbl lptbl;
+	__u8			reserved[906];
 } __packed;
 
 struct nvme_nvm_addr_format {
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] lightnvm: remove multiple groups in 1.2 data structure
  2018-01-30 13:26 [PATCH 1/2] lightnvm: remove mlc pairs structure Matias Bjørling
@ 2018-01-30 13:26 ` Matias Bjørling
  2018-01-31  2:02   ` Javier González
  2018-01-31  2:00 ` [PATCH 1/2] lightnvm: remove mlc pairs structure Javier González
  1 sibling, 1 reply; 6+ messages in thread
From: Matias Bjørling @ 2018-01-30 13:26 UTC (permalink / raw)
  To: linux-block; +Cc: linux-kernel, Matias Bjørling

Only one id group from the 1.2 specification is supported. Make
sure that only the first group is accessible.

Signed-off-by: Matias Bjørling <m@bjorling.me>
---
 drivers/nvme/host/lightnvm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index 16906327645e..e5544806fb0e 100644
--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -167,7 +167,8 @@ struct nvme_nvm_id {
 	__le32			dom;
 	struct nvme_nvm_addr_format ppaf;
 	__u8			resv[228];
-	struct nvme_nvm_id_group groups[4];
+	struct nvme_nvm_id_group group;
+	__u8			resv2[2880];
 } __packed;
 
 struct nvme_nvm_bb_tbl {
@@ -209,7 +210,7 @@ static int init_grps(struct nvm_id *nvm_id, struct nvme_nvm_id *nvme_nvm_id)
 	if (nvme_nvm_id->cgrps != 1)
 		return -EINVAL;
 
-	src = &nvme_nvm_id->groups[0];
+	src = &nvme_nvm_id->group;
 	grp = &nvm_id->grp;
 
 	grp->mtype = src->mtype;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] lightnvm: remove mlc pairs structure
  2018-01-30 13:26 [PATCH 1/2] lightnvm: remove mlc pairs structure Matias Bjørling
  2018-01-30 13:26 ` [PATCH 2/2] lightnvm: remove multiple groups in 1.2 data structure Matias Bjørling
@ 2018-01-31  2:00 ` Javier González
  2018-01-31  8:35   ` Matias Bjørling
  1 sibling, 1 reply; 6+ messages in thread
From: Javier González @ 2018-01-31  2:00 UTC (permalink / raw)
  To: Matias Bjørling; +Cc: linux-block, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 694 bytes --]

> On 30 Jan 2018, at 21.26, Matias Bjørling <m@bjorling.me> wrote:
> 
> The known implementations of the 1.2 specification, and upcoming 2.0
> implementation all expose a sequential list of pages to write.
> Remove the data structure, as it is no longer needed.
> 
> Signed-off-by: Matias Bjørling <m@bjorling.me>
> ---
> drivers/nvme/host/lightnvm.c | 14 +-------------
> 1 file changed, 1 insertion(+), 13 deletions(-)

Even though the current implementations does not use the MLC pairing
information, this is part of the on the 1.2 identification. Until we
eventually remove 1.2 support (if we do), the identify structure should
reflect the specification as is.

Javier


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] lightnvm: remove multiple groups in 1.2 data structure
  2018-01-30 13:26 ` [PATCH 2/2] lightnvm: remove multiple groups in 1.2 data structure Matias Bjørling
@ 2018-01-31  2:02   ` Javier González
  0 siblings, 0 replies; 6+ messages in thread
From: Javier González @ 2018-01-31  2:02 UTC (permalink / raw)
  To: Matias Bjørling; +Cc: linux-block, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 524 bytes --]

> On 30 Jan 2018, at 21.26, Matias Bjørling <m@bjorling.me> wrote:
> 
> Only one id group from the 1.2 specification is supported. Make
> sure that only the first group is accessible.
> 
> Signed-off-by: Matias Bjørling <m@bjorling.me>
> ---
> drivers/nvme/host/lightnvm.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> 

Same as before. Even though current implementation only uses one group,
the 1.2 specification relies on 4. At least, the identify structure
should reflect this.

Javier

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] lightnvm: remove mlc pairs structure
  2018-01-31  2:00 ` [PATCH 1/2] lightnvm: remove mlc pairs structure Javier González
@ 2018-01-31  8:35   ` Matias Bjørling
  2018-02-01  1:56     ` Javier González
  0 siblings, 1 reply; 6+ messages in thread
From: Matias Bjørling @ 2018-01-31  8:35 UTC (permalink / raw)
  To: Javier González, Matias Bjørling; +Cc: linux-block, linux-kernel

On 01/31/2018 03:00 AM, Javier González wrote:
>> On 30 Jan 2018, at 21.26, Matias Bjørling <m@bjorling.me> wrote:
>>
>> The known implementations of the 1.2 specification, and upcoming 2.0
>> implementation all expose a sequential list of pages to write.
>> Remove the data structure, as it is no longer needed.
>>
>> Signed-off-by: Matias Bjørling <m@bjorling.me>
>> ---
>> drivers/nvme/host/lightnvm.c | 14 +-------------
>> 1 file changed, 1 insertion(+), 13 deletions(-)
> 
> Even though the current implementations does not use the MLC pairing
> information, this is part of the on the 1.2 identification. Until we
> eventually remove 1.2 support (if we do), the identify structure should
> reflect the specification as is.
> 
> Javier
> 

I already started on removing the MLC bits in previous patches. These 
two patches continue that trend. I don't know of any implementing either 
multiple groups or MLC, and since it has not been implemented before, no 
one is going to use it. No reason to have dead code hanging around. This 
is similar to the NVMe device driver not having definitions for all that 
is in the specification until it is used in the implementation.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] lightnvm: remove mlc pairs structure
  2018-01-31  8:35   ` Matias Bjørling
@ 2018-02-01  1:56     ` Javier González
  0 siblings, 0 replies; 6+ messages in thread
From: Javier González @ 2018-02-01  1:56 UTC (permalink / raw)
  To: Matias Bjørling; +Cc: Matias Bjørling, linux-block, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1506 bytes --]

> On 31 Jan 2018, at 16.35, Matias Bjørling <mb@lightnvm.io> wrote:
> 
> On 01/31/2018 03:00 AM, Javier González wrote:
>>> On 30 Jan 2018, at 21.26, Matias Bjørling <m@bjorling.me> wrote:
>>> 
>>> The known implementations of the 1.2 specification, and upcoming 2.0
>>> implementation all expose a sequential list of pages to write.
>>> Remove the data structure, as it is no longer needed.
>>> 
>>> Signed-off-by: Matias Bjørling <m@bjorling.me>
>>> ---
>>> drivers/nvme/host/lightnvm.c | 14 +-------------
>>> 1 file changed, 1 insertion(+), 13 deletions(-)
>> Even though the current implementations does not use the MLC pairing
>> information, this is part of the on the 1.2 identification. Until we
>> eventually remove 1.2 support (if we do), the identify structure should
>> reflect the specification as is.
>> Javier
> 
> I already started on removing the MLC bits in previous patches. These
> two patches continue that trend. I don't know of any implementing
> either multiple groups or MLC, and since it has not been implemented
> before, no one is going to use it. No reason to have dead code hanging
> around. This is similar to the NVMe device driver not having
> definitions for all that is in the specification until it is used in
> the implementation.

It's ok with me - just wanted to point out that it seems weird removing
bits from the structure that describes the 1.2 identify command. Guess
these can com back if someone ever needs them...

Javier

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-01  1:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-30 13:26 [PATCH 1/2] lightnvm: remove mlc pairs structure Matias Bjørling
2018-01-30 13:26 ` [PATCH 2/2] lightnvm: remove multiple groups in 1.2 data structure Matias Bjørling
2018-01-31  2:02   ` Javier González
2018-01-31  2:00 ` [PATCH 1/2] lightnvm: remove mlc pairs structure Javier González
2018-01-31  8:35   ` Matias Bjørling
2018-02-01  1:56     ` Javier González

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.