aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl/ctl_tpc.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2016-12-25 13:34:02 +0000
committerAlexander Motin <mav@FreeBSD.org>2016-12-25 13:34:02 +0000
commit4124315924da69cbb175b0d2da2ab72115cc9d05 (patch)
tree6351e0ff2527123ddff28a1269b60cc4a520afb4 /sys/cam/ctl/ctl_tpc.c
parenta3dd83789208adb6ace2c4bd2588526d0ed0a110 (diff)
downloadsrc-4124315924da69cbb175b0d2da2ab72115cc9d05.tar.gz
src-4124315924da69cbb175b0d2da2ab72115cc9d05.zip
Remove CTL_MAX_LUNS from places where it is not required.
MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=310539
Diffstat (limited to 'sys/cam/ctl/ctl_tpc.c')
-rw-r--r--sys/cam/ctl/ctl_tpc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/cam/ctl/ctl_tpc.c b/sys/cam/ctl/ctl_tpc.c
index 484293b5bcee..960444aaec0f 100644
--- a/sys/cam/ctl/ctl_tpc.c
+++ b/sys/cam/ctl/ctl_tpc.c
@@ -894,7 +894,7 @@ tpc_process_b2b(struct tpc_list *list)
dcscd = scsi_2btoul(seg->dst_cscd);
sl = tpc_resolve(list, scscd, &srcblock, NULL, NULL);
dl = tpc_resolve(list, dcscd, &dstblock, &pb, &pbo);
- if (sl >= CTL_MAX_LUNS || dl >= CTL_MAX_LUNS) {
+ if (sl == UINT64_MAX || dl == UINT64_MAX) {
ctl_set_sense(list->ctsio, /*current_error*/ 1,
/*sense_key*/ SSD_KEY_COPY_ABORTED,
/*asc*/ 0x08, /*ascq*/ 0x04,
@@ -1042,7 +1042,7 @@ tpc_process_verify(struct tpc_list *list)
seg = (struct scsi_ec_segment_verify *)list->seg[list->curseg];
cscd = scsi_2btoul(seg->src_cscd);
sl = tpc_resolve(list, cscd, NULL, NULL, NULL);
- if (sl >= CTL_MAX_LUNS) {
+ if (sl == UINT64_MAX) {
ctl_set_sense(list->ctsio, /*current_error*/ 1,
/*sense_key*/ SSD_KEY_COPY_ABORTED,
/*asc*/ 0x08, /*ascq*/ 0x04,
@@ -1106,7 +1106,7 @@ tpc_process_register_key(struct tpc_list *list)
seg = (struct scsi_ec_segment_register_key *)list->seg[list->curseg];
cscd = scsi_2btoul(seg->dst_cscd);
dl = tpc_resolve(list, cscd, NULL, NULL, NULL);
- if (dl >= CTL_MAX_LUNS) {
+ if (dl == UINT64_MAX) {
ctl_set_sense(list->ctsio, /*current_error*/ 1,
/*sense_key*/ SSD_KEY_COPY_ABORTED,
/*asc*/ 0x08, /*ascq*/ 0x04,