Author: hselasky Date: Thu Jan 8 15:10:25 2015 New Revision: 276825 URL: https://svnweb.freebsd.org/changeset/base/276825
Log: 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 Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Thu Jan 8 14:58:54 2015 (r276824) +++ head/sys/cam/scsi/scsi_da.c Thu Jan 8 15:10:25 2015 (r276825) @@ -3094,8 +3094,10 @@ dadone(struct cam_periph *periph, union 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); _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"