All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Gerlando Falauto <gerlando.falauto@keymile.com>
Cc: Holger Brunck <holger.brunck@keymile.com>,
	Leo <leo.costa77@gmail.com>,
	linux-mtd@lists.infradead.org,
	Stefan Bigler <stefan.bigler@keymile.com>
Subject: Re: [PATCH RFC 1/2] mtd: cfi_cmdset_0002: Micron M29EW bugfix "Correcting Erase Suspend Hang Ups"
Date: Wed, 27 Jun 2012 13:27:35 +0300	[thread overview]
Message-ID: <1340792855.29342.39.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <1340004279-26496-2-git-send-email-gerlando.falauto@keymile.com>

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

On Mon, 2012-06-18 at 09:24 +0200, Gerlando Falauto wrote:
> +		/* before resume, insert a dummy 0xF0 cycle for Micron M29EW devices */
> +		if ( (cfi->mfr == 0x0089) &&
> +		   (((cfi->device_type == CFI_DEVICETYPE_X8) && ((cfi->id & 0xff)== 0x7e))
> +			  || ((cfi->device_type == CFI_DEVICETYPE_X16) && (cfi->id == 0x227e))) )
> +			map_write(map, CMD(0xF0), chip->in_progress_block_addr);

Please, separate the M29-specific quirks out to functions, do not inject
them to the main code.

Each quirk should be in a separate function, e.g.
'micron_m29_erase_quirk()'. The functions should have a descriptive
comment similar to what you added to the commit message. The function
just returns if the chip ID is not M29. This will be cleaner.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-06-27 10:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-18  7:24 [PATCH RFC 0/2] Micron (formerly Numonyx) M29EW NOR flash issues Gerlando Falauto
2012-06-18  7:24 ` [PATCH RFC 1/2] mtd: cfi_cmdset_0002: Micron M29EW bugfix "Correcting Erase Suspend Hang Ups" Gerlando Falauto
2012-06-27 10:27   ` Artem Bityutskiy [this message]
2012-07-03  7:09     ` [PATCH] mtd: cfi_cmdset_0002: Micron M29EW bugfixes as per TN-13-07 Gerlando Falauto
2012-07-16 14:29       ` Artem Bityutskiy
2013-02-12 14:50       ` David Woodhouse
2012-06-18  7:24 ` [PATCH RFC 2/2] mtd: cfi_cmdset_0002: Micron M29EW bugfix "Resolving the Delay After Resume Issue" Gerlando Falauto

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=1340792855.29342.39.camel@sauron.fi.intel.com \
    --to=dedekind1@gmail.com \
    --cc=gerlando.falauto@keymile.com \
    --cc=holger.brunck@keymile.com \
    --cc=leo.costa77@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=stefan.bigler@keymile.com \
    /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 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.