* [PATCH v2 RESEND 0/2] mtd: Harmonize implementations of OTP write and _get_{fact,user}_prot_info
@ 2014-01-28 8:29 Christian Riesch
2014-03-04 11:58 ` [PATCH v2 RESEND 0/2] mtd: Harmonize implementations of OTP write and _get_{fact, user}_prot_info Christian Riesch
0 siblings, 1 reply; 2+ messages in thread
From: Christian Riesch @ 2014-01-28 8:29 UTC (permalink / raw)
To: linux-mtd
Cc: linux-kernel, Christian Riesch, Artem Bityutskiy, Kyungmin Park,
Amul Kumar Saha, Brian Norris
Hi all,
In the discussion on my patchset for the OTP support for
drivers/mtd/chips/cfi_cmdset_0002.c [1-5], Artem requested two changes in the
current code of the OTP write functions and the _get_{fact,user}_prot_info
code.
These two patches are an attempt to make the requested changes.
The first patch adds a retlen parameter to the _get_fact_prot_info and
_get_user_prot_info functions and thus harmonizes the implementation
with those of the write and read functions.
The second patch fixes a problem that I earlier addressed in [1]. After
the discussion about this patch on the mtd mailing list, I think that the
correct behavior of the write function should be the one specified in [6]:
Try to write as many bytes as possible and return the number of bytes
that were written. If no data could be written due to lack of OTP memory,
return -ENOSPC.
Artem, would you please have a look at these patches? I would like to know
if I understood you correctly, or if I missed something here. Please note
that I cannot test these patches since I do not have the hardware. The
patches are compile tested only. If these patches are ok, I will also
respin the OTP support patches for cfi_cmdset_0002.
Changes for v2:
- Fixed buggy cfi_intelext_get_fact_prot_info
Thank you!
Best regards,
Christian
[1] http://patchwork.ozlabs.org/patch/239897/
[2] http://patchwork.ozlabs.org/patch/240010/
[3] http://patchwork.ozlabs.org/patch/240007/
[4] http://patchwork.ozlabs.org/patch/240008/
[5] http://patchwork.ozlabs.org/patch/240009/
[6] http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Amul Kumar Saha <amul.saha@samsung.com>
Cc: Brian Norris <computersforpeace@gmail.com>
Christian Riesch (2):
mtd: Add a retlen parameter to _get_{fact,user}_prot_info
mtd: Fix the behavior of otp write if there is not enough room for
data
drivers/mtd/chips/cfi_cmdset_0001.c | 44 +++++++++++++++++++----------------
drivers/mtd/devices/mtd_dataflash.c | 20 +++++++---------
drivers/mtd/mtdchar.c | 18 ++++++++++----
drivers/mtd/mtdcore.c | 12 +++++-----
drivers/mtd/mtdpart.c | 14 ++++++-----
drivers/mtd/onenand/onenand_base.c | 40 ++++++++++++++++---------------
include/linux/mtd/mtd.h | 16 ++++++-------
7 files changed, 89 insertions(+), 75 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2 RESEND 0/2] mtd: Harmonize implementations of OTP write and _get_{fact, user}_prot_info
2014-01-28 8:29 [PATCH v2 RESEND 0/2] mtd: Harmonize implementations of OTP write and _get_{fact,user}_prot_info Christian Riesch
@ 2014-03-04 11:58 ` Christian Riesch
0 siblings, 0 replies; 2+ messages in thread
From: Christian Riesch @ 2014-03-04 11:58 UTC (permalink / raw)
To: linux-mtd
Cc: Artem Bityutskiy, linux-kernel, Amul Kumar Saha, Kyungmin Park,
Brian Norris
Hi,
--On January 28, 2014 09:29 +0100 Christian Riesch
<christian.riesch@omicron.at> wrote:
> Hi all,
>
> In the discussion on my patchset for the OTP support for
> drivers/mtd/chips/cfi_cmdset_0002.c [1-5], Artem requested two changes in
> the current code of the OTP write functions and the
> _get_{fact,user}_prot_info code.
>
> These two patches are an attempt to make the requested changes.
>
> The first patch adds a retlen parameter to the _get_fact_prot_info and
> _get_user_prot_info functions and thus harmonizes the implementation
> with those of the write and read functions.
>
> The second patch fixes a problem that I earlier addressed in [1]. After
> the discussion about this patch on the mtd mailing list, I think that the
> correct behavior of the write function should be the one specified in [6]:
> Try to write as many bytes as possible and return the number of bytes
> that were written. If no data could be written due to lack of OTP memory,
> return -ENOSPC.
>
> Artem, would you please have a look at these patches? I would like to know
> if I understood you correctly, or if I missed something here. Please note
> that I cannot test these patches since I do not have the hardware. The
> patches are compile tested only. If these patches are ok, I will also
> respin the OTP support patches for cfi_cmdset_0002.
>
Sorry for bugging you (Artem, mtd Maintainers) again, but I would really
like to get this patchset ([a], [b]) and the OTP support for
cfi_cmdset_0002.c into mainline. Please have a look at the patches and just
tell me if the changes in them are acceptable, or if I should rather post
the OTP support without these two patches. Once I have your answer, I will
respin these patches and my OTP patches, test them again, and submit them.
But without your help I cannot continue.
[a] http://patchwork.ozlabs.org/patch/314624/
[b] http://patchwork.ozlabs.org/patch/314625/
Thank you very much!
Christian
> Changes for v2:
> - Fixed buggy cfi_intelext_get_fact_prot_info
>
> Thank you!
>
> Best regards,
> Christian
>
> [1] http://patchwork.ozlabs.org/patch/239897/
> [2] http://patchwork.ozlabs.org/patch/240010/
> [3] http://patchwork.ozlabs.org/patch/240007/
> [4] http://patchwork.ozlabs.org/patch/240008/
> [5] http://patchwork.ozlabs.org/patch/240009/
> [6] http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html
>
> Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Amul Kumar Saha <amul.saha@samsung.com>
> Cc: Brian Norris <computersforpeace@gmail.com>
>
> Christian Riesch (2):
> mtd: Add a retlen parameter to _get_{fact,user}_prot_info
> mtd: Fix the behavior of otp write if there is not enough room for
> data
>
> drivers/mtd/chips/cfi_cmdset_0001.c | 44
> +++++++++++++++++++---------------- drivers/mtd/devices/mtd_dataflash.c
> | 20 +++++++---------
> drivers/mtd/mtdchar.c | 18 ++++++++++----
> drivers/mtd/mtdcore.c | 12 +++++-----
> drivers/mtd/mtdpart.c | 14 ++++++-----
> drivers/mtd/onenand/onenand_base.c | 40
> ++++++++++++++++--------------- include/linux/mtd/mtd.h |
> 16 ++++++-------
> 7 files changed, 89 insertions(+), 75 deletions(-)
>
> --
> 1.7.9.5
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-04 11:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-28 8:29 [PATCH v2 RESEND 0/2] mtd: Harmonize implementations of OTP write and _get_{fact,user}_prot_info Christian Riesch
2014-03-04 11:58 ` [PATCH v2 RESEND 0/2] mtd: Harmonize implementations of OTP write and _get_{fact, user}_prot_info Christian Riesch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).