From: Steve Glendinning Date: Wed, 4 Mar 2009 07:33:25 +0000 (+0000) Subject: smsc911x: improve EEPROM loading timeout logic in open X-Git-Tag: v2.6.30-rc1~662^2~244 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7efb6ccc2113911e4e064f78bcd0343c4673038;p=pandora-kernel.git smsc911x: improve EEPROM loading timeout logic in open This patch from Juha Leppanen suppresses a false warning if the eeprom load succeeds on the very last attempt. Juha> In function smsc911x_open smsc911x_reg_read+udelay can be run 50 Juha> times with timeout reaching -1, and the following if statetement Juha> does not catch the timeout and no warning is issued. Also if the Juha> 50th smsc911x_reg_read is GOOD, loop is exited with timeout as 0 Juha> and bogus warning issued. Replace testing order and --timeout Juha> instead of timeout-- and now max 50 smsc911x_reg_read's are done, Juha> with max 49 udelays. Signed-off-by: Steve Glendinning Signed-off-by: David S. Miller --- Reading git-diff-tree failed