<div class="gmail_quote">On Thu, Oct 11, 2012 at 7:44 PM, Stefan Tauner <span dir="ltr"><<a href="mailto:stefan.tauner@student.tuwien.ac.at" target="_blank">stefan.tauner@student.tuwien.ac.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Thu, 11 Oct 2012 19:16:40 -0700<br>
David Hendricks <<a href="mailto:dhendrix@google.com">dhendrix@google.com</a>> wrote:<br>
<br>
> On Wed, Oct 3, 2012 at 3:59 PM, Carl-Daniel Hailfinger <<br>
> <a href="mailto:c-d.hailfinger.devel.2006@gmx.net">c-d.hailfinger.devel.2006@gmx.net</a>> wrote:<br>
><br>
> > Not for merge... yet.<br>
> > It works for dummy, nothing else was tested.<br>
> > Limitations/bugs mentioned in the patch.<br>
> ><br>
><br>
</div><div class="im">> Interesting approach. However, I think 3-byte vs. 4-byte RDID commands and<br>
> caching REMS might make patching spi_send_command rather messy.<br>
><br>
> I made a patch that takes a different route by changing<br>
> probe_spi_{rdid,rdid4,rems} functions instead. My patch can be viewed via<br>
> Gerrit on Chromium.org @<br>
> <a href="https://gerrit.chromium.org/gerrit/#/c/35376/2" target="_blank">https://gerrit.chromium.org/gerrit/#/c/35376/2</a> (doesn't<br>
> apply cleanly against upsteam currently).<br>
><br>
<br>
</div>Much better, but still wrong :) We work around a stupid probing loop<br>
instead fixing the root cause (verbose prints will still be way too<br>
verbose with this patch). If there are good reasons to do it this way,<br>
then i have no problem with it, but if we just hack this into the SPI<br>
code because it is easier to implement and come to a consensus, then<br>
i'll make the latter hard :P<br>
<br>
Fixing the probing loop has been on my todo list for a long time and i<br>
will work on it as soon as the other architectural changes are merged<br>
(status register stuff, check_trans etc). We should postpone the<br>
discussion until then IMHO. I suggest that chromium uses David's method<br>
till then and someone reviews my other patches soon ;) OTOH it would<br>
not hurt to integrate this into upstream with one exception:<br>
it would introdcue even more conflicts between open patches:<br>
<br>
David: some of this heavily conflicts with my "Generify<br>
probe_spi_rdid_generic() and add probe_spi_rdid_edi()." and other<br>
patches from that set. Maybe it would be better if you leave out the<br>
compare_id() introduction to get less conflicts later.<br></blockquote><div><br></div><div>Haha, totally agreed :-) We really should make the probe loop smarter about caching results rather than hacking this into the chip code.</div>

<div><br></div><div>You also have a good point about conflicts in my patch. Though there will be plenty of conflicts without the compare_id() stuff anyway... I'll just revert my change when we get a proper method implemented.</div>

</div>