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 {
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to