Date: Thu, 8 Jan 2015 15:10:26 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276825 - head/sys/cam/scsi Message-ID: <201501081510.t08FAQad023471@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501081510.t08FAQad023471>