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;
     }
_______________________________________________
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"

Reply via email to