Fix chip size limiting in atapromise

The current code is checking model_id to remember if a chip has already
been limited, but if flashchips.c contains two subsequent chips with
different vendor_id but identical model_id the adjustment will not be
done. Switch to checking the chip size instead.

If a chip has multiple whole-chip erase functions, only one will be
modified. Fix that.

Corresponding to flashrom svn r1930.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
Acked-by: Urja Rannikko <urjaman@gmail.com>
1 file changed