Author: mjacob
Date: Mon Feb 28 15:58:30 2011
New Revision: 219098
URL: http://svn.freebsd.org/changeset/base/219098

Log:
  Sync FreeBSD ISP with mercurial tree. Minor changes having to do with
  a macro for minima.

Modified:
  head/sys/dev/isp/isp.c
  head/sys/dev/isp/isp_freebsd.c
  head/sys/dev/isp/isp_freebsd.h
  head/sys/dev/isp/ispvar.h

Modified: head/sys/dev/isp/isp.c
==============================================================================
--- head/sys/dev/isp/isp.c      Mon Feb 28 14:48:00 2011        (r219097)
+++ head/sys/dev/isp/isp.c      Mon Feb 28 15:58:30 2011        (r219098)
@@ -4377,7 +4377,7 @@ isp_start(XS_T *xs)
        if (IS_SCSI(isp)) {
                reqp->req_target = target | (XS_CHANNEL(xs) << 7);
                reqp->req_lun_trn = XS_LUN(xs);
-               cdblen = MIN(cdblen, sizeof (reqp->req_cdb));
+               cdblen = ISP_MIN(cdblen, sizeof (reqp->req_cdb));
                cdbp = reqp->req_cdb;
                reqp->req_cdblen = cdblen;
        } else if (IS_24XX(isp)) {
@@ -4396,25 +4396,25 @@ isp_start(XS_T *xs)
                t7->req_lun[1] = XS_LUN(xs);
                tptr = &t7->req_time;
                cdbp = t7->req_cdb;
-               cdblen = MIN(cdblen, sizeof (t7->req_cdb));
+               cdblen = ISP_MIN(cdblen, sizeof (t7->req_cdb));
        } else if (ISP_CAP_2KLOGIN(isp)) {
                ispreqt2e_t *t2e = (ispreqt2e_t *)local;
                t2e->req_target = target;
                t2e->req_scclun = XS_LUN(xs);
                cdbp = t2e->req_cdb;
-               cdblen = MIN(cdblen, sizeof (t2e->req_cdb));
+               cdblen = ISP_MIN(cdblen, sizeof (t2e->req_cdb));
        } else if (ISP_CAP_SCCFW(isp)) {
                ispreqt2_t *t2 = (ispreqt2_t *)local;
                t2->req_target = target;
                t2->req_scclun = XS_LUN(xs);
                cdbp = t2->req_cdb;
-               cdblen = MIN(cdblen, sizeof (t2->req_cdb));
+               cdblen = ISP_MIN(cdblen, sizeof (t2->req_cdb));
        } else {
                ispreqt2_t *t2 = (ispreqt2_t *)local;
                t2->req_target = target;
                t2->req_lun_trn = XS_LUN(xs);
                cdbp = t2->req_cdb;
-               cdblen = MIN(cdblen, sizeof (t2->req_cdb));
+               cdblen = ISP_MIN(cdblen, sizeof (t2->req_cdb));
        }
        ISP_MEMCPY(cdbp, XS_CDBP(xs), cdblen);
 

Modified: head/sys/dev/isp/isp_freebsd.c
==============================================================================
--- head/sys/dev/isp/isp_freebsd.c      Mon Feb 28 14:48:00 2011        
(r219097)
+++ head/sys/dev/isp/isp_freebsd.c      Mon Feb 28 15:58:30 2011        
(r219098)
@@ -1865,7 +1865,7 @@ isp_handle_platform_atio(ispsoftc_t *isp
        }
 
        if (status & QLTM_SVALID) {
-               size_t amt = imin(QLTM_SENSELEN, sizeof (atiop->sense_data));
+               size_t amt = ISP_MIN(QLTM_SENSELEN, sizeof (atiop->sense_data));
                atiop->sense_len = amt;
                ISP_MEMCPY(&atiop->sense_data, aep->at_sense, amt);
        } else {

Modified: head/sys/dev/isp/isp_freebsd.h
==============================================================================
--- head/sys/dev/isp/isp_freebsd.h      Mon Feb 28 14:48:00 2011        
(r219097)
+++ head/sys/dev/isp/isp_freebsd.h      Mon Feb 28 15:58:30 2011        
(r219098)
@@ -325,6 +325,8 @@ struct isposinfo {
 #define        ISP_DELAY               DELAY
 #define        ISP_SLEEP(isp, x)       DELAY(x)
 
+#define        ISP_MIN                 imin
+
 #ifndef        DIAGNOSTIC
 #define        ISP_INLINE              __inline
 #else

Modified: head/sys/dev/isp/ispvar.h
==============================================================================
--- head/sys/dev/isp/ispvar.h   Mon Feb 28 14:48:00 2011        (r219097)
+++ head/sys/dev/isp/ispvar.h   Mon Feb 28 15:58:30 2011        (r219098)
@@ -997,6 +997,7 @@ void isp_async(ispsoftc_t *, ispasync_t,
  *
  *     ISP_INLINE                              ___inline or not- depending on 
how
  *                                             good your debugger is
+ *     ISP_MIN                                 shorthand for ((a) < (b))? (a) 
: (b)
  *
  *     NANOTIME_T                              nanosecond time type
  *
_______________________________________________
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