<div class="gmail_quote">The patch seems very useful for testing and is benign at worst. I'd like to see it in the tree since it greatly reduced the turnaround time for testing partial writes and deserves some more usage. We can make it pretty later on -- I'm already very happy to see a big mess of #defines gone from the original patchset.</div>

<div class="gmail_quote"><br></div><div class="gmail_quote">fwiw:</div><div class="gmail_quote">Acked-by: David Hendricks <<a href="mailto:dhendrix@google.com">dhendrix@google.com</a>></div><div class="gmail_quote">

<br></div><div class="gmail_quote">On Sat, Oct 30, 2010 at 6:13 PM, Carl-Daniel Hailfinger <span dir="ltr"><<a href="mailto:c-d.hailfinger.devel.2006@gmx.net">c-d.hailfinger.devel.2006@gmx.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">+       /* TODO: Implement command blacklists here. */<br>
<div><div></div><div class="h5">+       switch (writearr[0]) {<br>
+       case JEDEC_RES:<br>
+               if (emu_chip != EMULATE_ST_M25P10_RES)<br>
+                       break;<br>
+               /* Respond with ST_M25P10_RES. */<br>
+               if (readcnt > 0)<br>
+                       readarr[0] = 0x10;<br>
+               break;<br>
+       case JEDEC_REMS:<br>
+               if (emu_chip != EMULATE_SST_SST25VF040_REMS)<br>
+                       break;<br>
+               /* Respond with SST_SST25VF040_REMS. */<br>
+               if (readcnt > 0)<br>
+                       readarr[0] = 0xbf;<br>
+               if (readcnt > 1)<br>
+                       readarr[1] = 0x44;<br>
+               break;<br>
+       case JEDEC_RDID:<br>
+               if (emu_chip != EMULATE_SST_SST25VF032B)<br>
+                       break;<br>
+               /* Respond with SST_SST25VF032B. */<br>
+               if (readcnt > 0)<br>
+                       readarr[0] = 0xbf;<br>
+               if (readcnt > 1)<br>
+                       readarr[1] = 0x25;<br>
+               if (readcnt > 2)<br>
+                       readarr[2] = 0x4a;<br>
+               break;<br>
+       case JEDEC_RDSR:<br>
+               memset(readarr, 0, readcnt);<br>
+               if (aai_active)<br>
+                       memset(readarr, 1 << 6, readcnt);<br>
+               break;<br></div></div></blockquote><div><br></div><div>Minor nitpick: These should probably slice/dice the #defines from flashchips.h.</div><div> </div></div>-- <br>David Hendricks (dhendrix)<br>Systems Software Engineer, Google Inc.<br>