Fix for disc error 08 immediately after module reinit on Raspberry Pi B+ and 2
Detail: On these boards, because there's no card-detect line, SDIODriver only issues the UnitAttached and UnitDetached service calls in its module init/final code and when one of the rescan SWIs are called (usually by SDFS). The "maybe-changed" timer is implemented within SDFS; when it has elapsed, any DiscOp will try to select a card with the last-known-good ID in that slot; if this fails (because there's no card, or the card has changed, or even if the same card has been removed and reinserted) SDFS will get SDIODriver to rescan the slot, at which point SDFS is re-entered via the UnitAttached service call, which resets the "maybe-changed" timer to 1 second. The problem was that SDFS reused the same function that handles Service_SDIOUnitAttached during its module initialisation, so for the first second of SDFS's life, it believed the card ID which it was informed of by SDIODriver is valid and has been accessed within the last second. Except that if the card has actually been removed and reinserted, the command issued by SDFS ends up timing out, resulting in disc error 08. Admin: Tested on Pi B+ (assumed identical behaviour on Pi 2) Version 0.08. Tagged as 'SDFS-0_08'
Showing with 31 additions and 31 deletions