提交 9d374f87 编写于 作者: H hphuang

mstorage.c: fix the issue that _read_capacity() returns the wrong last valid...

mstorage.c: fix the issue that _read_capacity() returns the wrong last valid address of storage medium
上级 baa3145b
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册