Allow a block size of zero to mean 512 bytes, which is the most common
block size for USB disks. This fixes support for "Action Cam SJ4000". Reviewed by: mav @ MFC after: 1 week
This commit is contained in:
parent
5e3cd9e19c
commit
68f71fc180
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276825
@ -3094,8 +3094,10 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
if (block_size == 0 && maxsector == 0) {
|
||||
block_size = 512;
|
||||
maxsector = -1;
|
||||
} else if (block_size == 0) {
|
||||
block_size = 512;
|
||||
}
|
||||
if (block_size >= MAXPHYS || block_size == 0) {
|
||||
if (block_size >= MAXPHYS) {
|
||||
xpt_print(periph->path,
|
||||
"unsupportable block size %ju\n",
|
||||
(uintmax_t) block_size);
|
||||
|
Loading…
Reference in New Issue
Block a user