public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Alexey, Korolev" <alexey.korolev@intel.com>
To: jwboyer@gmail.com, dwmw2@infradead.org
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] CFI cmdset_0001 A small fixup of wrong cache invalidationregions.
Date: Wed, 08 Feb 2006 19:18:17 +0300	[thread overview]
Message-ID: <43EA19C9.40909@intel.com> (raw)
In-Reply-To: <F92C2EFE7C3BA745855BF7036E1F3F9A018F2071@NNSMSX401>

David, Josh

Would you please review this patch.
This small patch shouldn't break anything. It just fixes read error 
issues found by our test engine.
If you found it acceptable I would be much appreciate if you commit it 
into CVS repository.

Please see details and patch  below.

Thanks,
Alexey


> Hi all,
>  
> I found issue in cfi_cmdset0001.c. It related to setting up of cache
> regions for invalidating in buffered write porcedure.
> Code performs cache invalidation from "cmd_addr" to "cmd_adr + len" in
> do_write_buffer function. In fact we modify region from "adr" to
> "adr+len".
> The issue affects when you try to write and read data by small chunks.
> This case you may catch read errors on SND configurations.
>  
> I made fix for it. Please take a look at the patch.
> =================================================================
> --- b/drivers/mtd/chips/cfi_cmdset_0001.c 2006-01-26 18:59:52.000000000
> +0300
> +++ a/drivers/mtd/chips/cfi_cmdset_0001.c 2006-01-31 18:56:01.315227496
> +0300
> @@ -1019,8 +1019,8 @@
>  #define XIP_INVAL_CACHED_RANGE(map, from, size)  \
>   INVALIDATE_CACHED_RANGE(map, from, size)
>  
> -#define INVALIDATE_CACHE_UDELAY(map, chip, adr, len, usec)  \
> - UDELAY(map, chip, adr, usec)
> +#define INVALIDATE_CACHE_UDELAY(map, chip, cmd_adr, adr, len, usec)  \
> + UDELAY(map, chip, cmd_adr, usec)
>  
>  /*
>   * Extra notes:
> @@ -1052,7 +1052,7 @@
>   spin_lock(chip->mutex);  \
>  } while (0)
>  
> -#define INVALIDATE_CACHE_UDELAY(map, chip, adr, len, usec)  \
> +#define INVALIDATE_CACHE_UDELAY(map, chip, cmd_adr, adr, len, usec)  \
>  do {  \
>   spin_unlock(chip->mutex);  \
>   INVALIDATE_CACHED_RANGE(map, adr, len);  \
> @@ -1284,7 +1284,7 @@
>   map_write(map, datum, adr);
>   chip->state = mode;
>  
> - INVALIDATE_CACHE_UDELAY(map, chip,
> + INVALIDATE_CACHE_UDELAY(map, chip, adr,
>      adr, map_bankwidth(map),
>      chip->word_write_time);
>  
> @@ -1572,8 +1572,8 @@
>   map_write(map, CMD(0xd0), cmd_adr);
>   chip->state = FL_WRITING;
>  
> - INVALIDATE_CACHE_UDELAY(map, chip,
> -    cmd_adr, len,
> + INVALIDATE_CACHE_UDELAY(map, chip, cmd_adr,
> +    adr, len,
>      chip->buffer_write_time);
>  
>   timeo = jiffies + (HZ/2);
> @@ -1749,7 +1749,7 @@
>   chip->state = FL_ERASING;
>   chip->erase_suspended = 0;
>  
> - INVALIDATE_CACHE_UDELAY(map, chip,
> + INVALIDATE_CACHE_UDELAY(map, chip, adr,
>      adr, len,
>      chip->erase_time*1000/2);
>  
> =====================================================
>  
> Thanks,
> Alexey
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>

  reply	other threads:[~2006-02-08 16:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-31 16:16 [PATCH] CFI cmdset_0001 A small fixup of wrong cache invalidation regions Korolev, Alexey
2006-02-08 16:18 ` Alexey, Korolev [this message]
2006-02-08 16:48   ` [PATCH] CFI cmdset_0001 A small fixup of wrong cache invalidationregions Nicolas Pitre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43EA19C9.40909@intel.com \
    --to=alexey.korolev@intel.com \
    --cc=dwmw2@infradead.org \
    --cc=jwboyer@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox