Sync FreeBSD ISP with mercurial tree. Minor changes having to do with

a macro for minima.
This commit is contained in:
Matt Jacob 2011-02-28 15:58:30 +00:00
parent 2f203e818f
commit 898899d9dd
4 changed files with 9 additions and 6 deletions

View File

@ -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);

View File

@ -1865,7 +1865,7 @@ isp_handle_platform_atio(ispsoftc_t *isp, at_entry_t *aep)
}
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 {

View File

@ -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

View File

@ -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
*