Date: Tue, 20 Jan 2015 05:00:39 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277407 - stable/10/sys/cam/scsi Message-ID: <201501200500.t0K50doD072563@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Tue Jan 20 05:00:38 2015 New Revision: 277407 URL: https://svnweb.freebsd.org/changeset/base/277407 Log: MFC r276825 and r277372: 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". Modified: stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Tue Jan 20 03:54:30 2015 (r277406) +++ stable/10/sys/cam/scsi/scsi_da.c Tue Jan 20 05:00:38 2015 (r277407) @@ -3098,11 +3098,12 @@ dadone(struct cam_periph *periph, union * give them an 'illegal' value we'll avoid that * here. */ - if (block_size == 0 && maxsector == 0) { + if (block_size == 0) { block_size = 512; - maxsector = -1; + if (maxsector == 0) + maxsector = -1; } - 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?201501200500.t0K50doD072563>