Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons, Anastasia Klimchuk.
3 comments:
File cli_classic.c:
Patch Set #5, Line 778: set_wp_disable should be done before setting the range
Or even have `set_wp_range` disable WP beforehand (bail out if it fails) and restore the WP state af […]
The comment is misleading, the only real requirement is that wp_set_range() should be called before before wp_enable() to avoid locking the status register before the desired range is selected.
However calling wp_disable() before wp_set_range() won't help, since wp_disable() will only succeed if protection is already disabled or if the WP pin is inactive, and in either case wp_set_range() would succeed anyway.
Patch Set #5, Line 783: set_wp_range must happen before set_wp_enable
Same question as previous, can set_wp_enable check that set_wp_range has been called? […]
There isn't really anything to check, though we probably should keep the comment in some form. Something like "do this last" before the wp_enable code.
File writeprotect.c:
The only reason I was thinking to temporarily keep struct wp, is to keep cli_classic compiling. So that _wp_ functions can be added one at a time, with implementation. At the end of the patch series there would be no struct wp, one way or the other.
I thought this can be another approach on how to add one function at a time.
In the end I decided to delete all the old code in this commit and add things back as when they are ready. I think that will be easiest to review.
To view, visit change 58474. To unsubscribe, or for help writing mail filters, visit settings.