From owner-svn-src-head@FreeBSD.ORG Fri Apr 26 17:28:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 44385B49; Fri, 26 Apr 2013 17:28:46 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 365531488; Fri, 26 Apr 2013 17:28:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3QHSkDO074094; Fri, 26 Apr 2013 17:28:46 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3QHSk27074093; Fri, 26 Apr 2013 17:28:46 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201304261728.r3QHSk27074093@svn.freebsd.org> From: Sean Bruno Date: Fri, 26 Apr 2013 17:28:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249947 - head/sys/dev/ciss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Apr 2013 17:28:46 -0000 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; }