mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-18 15:30:21 +00:00
Make da driver to handle some probably broken Android devices, returning
zero media and sector size instead of "Medium not present" error, until some confirmation button is tapped on device.
This commit is contained in:
parent
ce837469ba
commit
a4bd51a562
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=214288
@ -1667,7 +1667,10 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
* give them an 'illegal' value we'll avoid that
|
||||
* here.
|
||||
*/
|
||||
if (block_size >= MAXPHYS || block_size == 0) {
|
||||
if (block_size == 0 && maxsector == 0) {
|
||||
snprintf(announce_buf, sizeof(announce_buf),
|
||||
"0MB (no media?)");
|
||||
} else if (block_size >= MAXPHYS || block_size == 0) {
|
||||
xpt_print(periph->path,
|
||||
"unsupportable block size %ju\n",
|
||||
(uintmax_t) block_size);
|
||||
|
Loading…
Reference in New Issue
Block a user