From owner-svn-src-stable-7@FreeBSD.ORG Mon Jul 25 16:54:32 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13F01106566B; Mon, 25 Jul 2011 16:54:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDDD38FC12; Mon, 25 Jul 2011 16:54:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p6PGsVh9065901; Mon, 25 Jul 2011 16:54:31 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p6PGsVp9065899; Mon, 25 Jul 2011 16:54:31 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201107251654.p6PGsVp9065899@svn.freebsd.org> From: Marius Strobl Date: Mon, 25 Jul 2011 16:54:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224334 - stable/7/sys/dev/mpt X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2011 16:54:32 -0000 Author: marius Date: Mon Jul 25 16:54:31 2011 New Revision: 224334 URL: http://svn.freebsd.org/changeset/base/224334 Log: MFC: r195274 Change explicit maximium numbers to the defined macro MPT_MAX_LUNS. Modified: stable/7/sys/dev/mpt/mpt_cam.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mpt/mpt_cam.c ============================================================================== --- stable/7/sys/dev/mpt/mpt_cam.c Mon Jul 25 16:45:47 2011 (r224333) +++ stable/7/sys/dev/mpt/mpt_cam.c Mon Jul 25 16:54:31 2011 (r224334) @@ -2158,7 +2158,7 @@ mpt_start(struct cam_sim *sim, union ccb mpt_req->TargetID = tgt; /* We assume a single level LUN type */ - if (ccb->ccb_h.target_lun >= 256) { + if (ccb->ccb_h.target_lun >= MPT_MAX_LUNS) { mpt_req->LUN[0] = 0x40 | ((ccb->ccb_h.target_lun >> 8) & 0x3f); mpt_req->LUN[1] = ccb->ccb_h.target_lun & 0xff; } else { @@ -4043,7 +4043,7 @@ mpt_scsi_send_tmf(struct mpt_softc *mpt, tmf_req->MsgFlags = flags; tmf_req->MsgContext = htole32(mpt->tmf_req->index | scsi_tmf_handler_id); - if (lun > 256) { + if (lun > MPT_MAX_LUNS) { tmf_req->LUN[0] = 0x40 | ((lun >> 8) & 0x3f); tmf_req->LUN[1] = lun & 0xff; } else { @@ -4517,7 +4517,7 @@ mpt_target_start_io(struct mpt_softc *mp ta->Function = MPI_FUNCTION_TARGET_ASSIST; ta->MsgContext = htole32(req->index | mpt->scsi_tgt_handler_id); ta->ReplyWord = htole32(tgt->reply_desc); - if (csio->ccb_h.target_lun > 256) { + if (csio->ccb_h.target_lun > MPT_MAX_LUNS) { ta->LUN[0] = 0x40 | ((csio->ccb_h.target_lun >> 8) & 0x3f); ta->LUN[1] = csio->ccb_h.target_lun & 0xff; @@ -4669,7 +4669,7 @@ mpt_scsi_tgt_local(struct mpt_softc *mpt ta->Function = MPI_FUNCTION_TARGET_ASSIST; ta->MsgContext = htole32(req->index | mpt->scsi_tgt_handler_id); ta->ReplyWord = htole32(tgt->reply_desc); - if (lun > 256) { + if (lun > MPT_MAX_LUNS) { ta->LUN[0] = 0x40 | ((lun >> 8) & 0x3f); ta->LUN[1] = lun & 0xff; } else {