Merge pull request #3569 from egbert-h/master

mstorage.c: fix the issue bug in_read_capacity()
This commit is contained in:
Bernard Xiong 2020-05-01 17:40:02 +08:00 committed by GitHub
commit 664bc4e9d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -426,7 +426,7 @@ static rt_size_t _read_capacity(ufunction_t func, ustorage_cbw_t cbw)
data = (struct mstorage*)func->user_data;
buf = data->ep_in->buffer;
sector_count = data->geometry.sector_count;
sector_count = data->geometry.sector_count - 1; /* Last Logical Block Address */
sector_size = data->geometry.bytes_per_sector;
buf[0] = sector_count >> 24;