diff options
author | delphij <delphij@FreeBSD.org> | 2009-07-02 00:41:37 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2009-07-02 00:41:37 +0000 |
commit | aa8768059ba71c6aaa6101b02f468a88260809f7 (patch) | |
tree | 7bf74ccf717263f75d1cba26be2ad1bcb49a8188 /sys/dev/mpt | |
parent | 0dd7c48b8f8a2815f634d7461ead43b7e5257221 (diff) | |
download | FreeBSD-src-aa8768059ba71c6aaa6101b02f468a88260809f7.zip FreeBSD-src-aa8768059ba71c6aaa6101b02f468a88260809f7.tar.gz |
Change explicit maximium numbers to the defined macro MPT_MAX_LUNS.
Approved by: re (kensmith)
Diffstat (limited to 'sys/dev/mpt')
-rw-r--r-- | sys/dev/mpt/mpt_cam.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/mpt/mpt_cam.c b/sys/dev/mpt/mpt_cam.c index fcbb481..b245f47 100644 --- a/sys/dev/mpt/mpt_cam.c +++ b/sys/dev/mpt/mpt_cam.c @@ -2152,7 +2152,7 @@ mpt_start(struct cam_sim *sim, union ccb *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 { @@ -4025,7 +4025,7 @@ mpt_scsi_send_tmf(struct mpt_softc *mpt, u_int type, u_int flags, 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 { @@ -4499,7 +4499,7 @@ mpt_target_start_io(struct mpt_softc *mpt, union ccb *ccb) 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; @@ -4651,7 +4651,7 @@ mpt_scsi_tgt_local(struct mpt_softc *mpt, request_t *cmd_req, 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 { |