[flashrom] [PATCH] Remove potential endless loops from satasii.c.

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Aug 29 01:53:34 CEST 2012

Am 25.08.2012 04:09 schrieb Stefan Tauner:
> This is based on the idea from the "Make satasii driver more robust" patch
> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
> It is missing the BAR access changes, but factors out the wait loop and
> replaces all endless loops instead of just a few.
> Signed-off-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>

The refactoring is a really good idea and I like it.

Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

(The fixup patch for BAR5 is a separate issue and I have to reinvestiage
what I tried to debug/fix back then.)

> i am not sure if we really want to ignore the hung status register.
> Normally, i would have really aborted on timeouts, but since this was not
> part of the original patch i kept the ignoring behavior.

I don't think we can abort on timeouts. satasii_chip_writeb() returns
void. We would have to change all chip_write[bwl]() and all
chip_read[bwl]() functions to allow for error handling. Not sure if that
is worth it.



More information about the flashrom mailing list