[edk2-devel] [PATCH 0/4] MdeModulePkg/AtaAtapiPassThru: Add SATA error recovery

Albecki, Mateusz posted 4 patches 3 years, 5 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
.../Bus/Ata/AtaAtapiPassThru/AhciMode.c       | 801 +++++++++++-------
.../Bus/Ata/AtaAtapiPassThru/AhciMode.h       |  16 +-
2 files changed, 532 insertions(+), 285 deletions(-)
[edk2-devel] [PATCH 0/4] MdeModulePkg/AtaAtapiPassThru: Add SATA error recovery
Posted by Albecki, Mateusz 3 years, 5 months ago
To increase boot stability when booting from SATA drives SATA driver should
implement the AHCI spec defined port error recovery. This will allow the
driver to handle random fails on SATA link.

Performed tests on 2 setups. One with AHCI controller booting OS
successfully without error recovery(control setup) and other which
fails 1 in 5 times(fail setup).

Tests performed:
1. Booted control setup to OS successfully.
2. Checked if during normal boot none of the packets is repeated(this came
up after previous code version had a bug which repeated each DMA packet 5
times).
3. Booted control setup to OS with simulated errors appearing on first
packet of every DMA transaction.
4. Performed extensive tests on fail setup. Fail rate decreased from 20%
failure to ~1% failure. 1% failure is observed during OS execution,
not BIOS so in a way boot is 100% stable).

Change pushed to github:
This series:
https://github.com/malbecki/edk2/commits/sata_recovery2
Simulated errors:
https://github.com/malbecki/edk2/commits/sata_recovery_simulated_error

Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com>

Cc: Ray Ni <ray.ni@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>

Albecki (4):
  MdeModulePkg/AtaAtapiPassThru: Check IS to check for command
    completion
  MdeModulePkg/AtaAtapiPassThru: Add SATA error recovery flow
  MdeModulePkg/AtaAtapiPassThru: Restart failed packets
  MdeModulePkg/AtaAtapiPassThru: Trace ATA packets

 .../Bus/Ata/AtaAtapiPassThru/AhciMode.c       | 801 +++++++++++-------
 .../Bus/Ata/AtaAtapiPassThru/AhciMode.h       |  16 +-
 2 files changed, 532 insertions(+), 285 deletions(-)

-- 
2.28.0.windows.1

---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Sowackiego 173 | 80-298 Gdask | Sd Rejonowy Gdask Pnoc | VII Wydzia Gospodarczy Krajowego Rejestru Sdowego - KRS 101882 | NIP 957-07-52-316 | Kapita zakadowy 200.000 PLN.
Ta wiadomo wraz z zacznikami jest przeznaczona dla okrelonego adresata i moe zawiera informacje poufne. W razie przypadkowego otrzymania tej wiadomoci, prosimy o powiadomienie nadawcy oraz trwae jej usunicie; jakiekolwiek przegldanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66922): https://edk2.groups.io/g/devel/message/66922
Mute This Topic: https://groups.io/mt/78005842/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH 0/4] MdeModulePkg/AtaAtapiPassThru: Add SATA error recovery
Posted by Wu, Hao A 3 years, 5 months ago
> -----Original Message-----
> From: Albecki, Mateusz <mateusz.albecki@intel.com>
> Sent: Tuesday, November 3, 2020 9:24 PM
> To: devel@edk2.groups.io
> Cc: Albecki, Mateusz <mateusz.albecki@intel.com>; Ni, Ray
> <ray.ni@intel.com>; Wu, Hao A <hao.a.wu@intel.com>
> Subject: [PATCH 0/4] MdeModulePkg/AtaAtapiPassThru: Add SATA error
> recovery
> 
> To increase boot stability when booting from SATA drives SATA driver should
> implement the AHCI spec defined port error recovery. This will allow the
> driver to handle random fails on SATA link.
> 
> Performed tests on 2 setups. One with AHCI controller booting OS
> successfully without error recovery(control setup) and other which fails 1 in 5
> times(fail setup).
> 
> Tests performed:
> 1. Booted control setup to OS successfully.
> 2. Checked if during normal boot none of the packets is repeated(this came
> up after previous code version had a bug which repeated each DMA packet 5
> times).


Some more information:
For the bug mentioned above in point 2, the discussion can be referred here:
https://github.com/malbecki/edk2/commit/9ea81cadf38725e194ec01e0b0c556fd133f3ced#r43226067

For the other discussion we did before this patch, please refer to:
https://github.com/malbecki/edk2/commits/sata_recovery

Best Regards,
Hao Wu


> 3. Booted control setup to OS with simulated errors appearing on first packet
> of every DMA transaction.
> 4. Performed extensive tests on fail setup. Fail rate decreased from 20%
> failure to ~1% failure. 1% failure is observed during OS execution, not BIOS so
> in a way boot is 100% stable).
> 
> Change pushed to github:
> This series:
> https://github.com/malbecki/edk2/commits/sata_recovery2
> Simulated errors:
> https://github.com/malbecki/edk2/commits/sata_recovery_simulated_erro
> r
> 
> Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com>
> 
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> 
> Albecki (4):
>   MdeModulePkg/AtaAtapiPassThru: Check IS to check for command
>     completion
>   MdeModulePkg/AtaAtapiPassThru: Add SATA error recovery flow
>   MdeModulePkg/AtaAtapiPassThru: Restart failed packets
>   MdeModulePkg/AtaAtapiPassThru: Trace ATA packets
> 
>  .../Bus/Ata/AtaAtapiPassThru/AhciMode.c       | 801 +++++++++++-------
>  .../Bus/Ata/AtaAtapiPassThru/AhciMode.h       |  16 +-
>  2 files changed, 532 insertions(+), 285 deletions(-)
> 
> --
> 2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66950): https://edk2.groups.io/g/devel/message/66950
Mute This Topic: https://groups.io/mt/78005842/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-