* [PATCH] mtd: cfi_cmdset_0002: PPB locking support for larger capacity devices
@ 2017-04-05 11:57 Mathias Thore
2017-08-10 9:31 ` Boris Brezillon
0 siblings, 1 reply; 2+ messages in thread
From: Mathias Thore @ 2017-04-05 11:57 UTC (permalink / raw)
To: linux-mtd; +Cc: Mathias Thore
Currently cfi_cmdset_0002.c supports advanced sector protection scheme
for devices with 512 or fewer sectors. This patch increases the limit
to enable advanced sector protection on devices with larger capacity.
Signed-off-by: Mathias Thore <mathias.thore@infinera.com>
---
drivers/mtd/chips/cfi_cmdset_0002.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 9dca881..4966f12 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -2532,7 +2532,7 @@ struct ppb_lock {
int locked;
};
-#define MAX_SECTORS 512
+#define MAX_SECTORS 1024
#define DO_XXLOCK_ONEBLOCK_LOCK ((void *)1)
#define DO_XXLOCK_ONEBLOCK_UNLOCK ((void *)2)
--
2.10.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] mtd: cfi_cmdset_0002: PPB locking support for larger capacity devices
2017-04-05 11:57 [PATCH] mtd: cfi_cmdset_0002: PPB locking support for larger capacity devices Mathias Thore
@ 2017-08-10 9:31 ` Boris Brezillon
0 siblings, 0 replies; 2+ messages in thread
From: Boris Brezillon @ 2017-08-10 9:31 UTC (permalink / raw)
To: Mathias Thore; +Cc: linux-mtd
Hi Matthias,
Le Wed, 5 Apr 2017 13:57:43 +0200,
Mathias Thore <mathias.thore@infinera.com> a écrit :
> Currently cfi_cmdset_0002.c supports advanced sector protection scheme
> for devices with 512 or fewer sectors. This patch increases the limit
> to enable advanced sector protection on devices with larger capacity.
Can't we fix the implementation to determine at runtime how many
sectors the flash has instead of changing MAX_SECTORS value every time
a new flash comes in?
This would also have the benefit of keeping the ppb_lock array
(allocated in cfi_ppb_unlock()) small on setup that have a flash with a
limited number of sectors.
Regards,
Boris
>
> Signed-off-by: Mathias Thore <mathias.thore@infinera.com>
> ---
> drivers/mtd/chips/cfi_cmdset_0002.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
> index 9dca881..4966f12 100644
> --- a/drivers/mtd/chips/cfi_cmdset_0002.c
> +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
> @@ -2532,7 +2532,7 @@ struct ppb_lock {
> int locked;
> };
>
> -#define MAX_SECTORS 512
> +#define MAX_SECTORS 1024
>
> #define DO_XXLOCK_ONEBLOCK_LOCK ((void *)1)
> #define DO_XXLOCK_ONEBLOCK_UNLOCK ((void *)2)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-10 9:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-05 11:57 [PATCH] mtd: cfi_cmdset_0002: PPB locking support for larger capacity devices Mathias Thore
2017-08-10 9:31 ` Boris Brezillon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox