storage: support new UFS error history algorithm

Bug: 359746077
Test: adb bugreport
Change-Id: I52a7ae0f1f9b60349437c0b3b5de630dd41b5627
Signed-off-by: Randall Huang <huangrandall@google.com>
This commit is contained in:
Randall Huang 2024-10-16 16:29:59 +08:00
parent 2c8ec7ea44
commit 570dfe1ed4

View file

@ -221,14 +221,23 @@ int main() {
read_buffer(18, 131072, "kioxia_12_ufs_err_history.dat");
break;
case 0x1AD: //SKhynix
read_buffer(0, 4096, "hynix_00_ufs_err_history.dat");
read_buffer(16, 131072, "skhynix_10_ufs_err_history.dat");
read_buffer(17, 131072, "skhynix_11_ufs_err_history.dat");
read_buffer(18, 131072, "skhynix_12_ufs_err_history.dat");
read_buffer(19, 131072, "skhynix_13_ufs_err_history.dat");
if (!strcmp(ufs_ver.c_str(), "0x0310")) {
read_buffer(0, 4096, "skhynix_00_ufs_err_history.dat");
read_buffer(16, 131072, "skhynix_10_ufs_err_history.dat");
read_buffer(17, 131072, "skhynix_11_ufs_err_history.dat");
read_buffer(18, 131072, "skhynix_12_ufs_err_history.dat");
read_buffer(19, 131072, "skhynix_13_ufs_err_history.dat");
} else {
read_buffer(0, 4096, "skhynix_00_ufs_err_history.dat");
read_buffer(16, 524288, "skhynix_10_ufs_err_history.dat");
read_buffer(17, 524288, "skhynix_11_ufs_err_history.dat");
}
break;
case 0x1CE: //SAMSUNG
read_buffer(16, 8404992, "samsung_10_ufs_err_history.dat");
if (!strcmp(ufs_ver.c_str(), "0x0310"))
read_buffer(16, 8404992, "samsung_10_ufs_err_history.dat");
else
read_buffer(16, 12599296, "samsung_10_ufs_err_history.dat");
break;
default:
break;