Date: Fri, 26 Apr 2013 17:28:46 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249947 - head/sys/dev/ciss Message-ID: <201304261728.r3QHSk27074093@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sbruno Date: Fri Apr 26 17:28:45 2013 New Revision: 249947 URL: http://svnweb.freebsd.org/changeset/base/249947 Log: Adjust the min comparison to look at the adjust value after subtraction, don't subtract 1 from the chosen value if we are going to use the configued value. Obtained from: Yahoo! Inc. MFC after: 2 weeks Modified: head/sys/dev/ciss/ciss.c Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Fri Apr 26 17:27:53 2013 (r249946) +++ head/sys/dev/ciss/ciss.c Fri Apr 26 17:28:45 2013 (r249947) @@ -3005,7 +3005,7 @@ ciss_cam_action(struct cam_sim *sim, uni cpi->transport_version = 2; cpi->protocol = PROTO_SCSI; cpi->protocol_version = SCSI_REV_2; - cpi->maxio = (min(CISS_MAX_SG_ELEMENTS, sc->ciss_cfg->max_sg_length) - 1) * PAGE_SIZE; + cpi->maxio = (min(CISS_MAX_SG_ELEMENTS - 1, sc->ciss_cfg->max_sg_length)) * PAGE_SIZE; ccb->ccb_h.status = CAM_REQ_CMP; break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304261728.r3QHSk27074093>