aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/iscsi_proto.h
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-01-31 14:36:53 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-02-07 19:02:37 -0500
commit8b1d03434ee44b08c57f50403eaeab099facebf5 (patch)
tree48d7c5aeb3b765284dcc3d8685ed6ea6aed350cb /include/scsi/iscsi_proto.h
parent322d739da83bbff0309c202181f79c08d9534880 (diff)
[SCSI] libiscsi: fix session age rollover and remove cid encoding
The session age mask is only 4 bits, but session->age is 32. When it gets larger then 15 and we try to or the bits some bits get dropped and the check for session age in iscsi_verify_itt is useless. The ISCSI_CID_MASK related bits are also useless since cid is always one. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'include/scsi/iscsi_proto.h')
-rw-r--r--include/scsi/iscsi_proto.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/scsi/iscsi_proto.h b/include/scsi/iscsi_proto.h
index 318a909e7ae1..5ffec8ad6964 100644
--- a/include/scsi/iscsi_proto.h
+++ b/include/scsi/iscsi_proto.h
@@ -45,8 +45,8 @@
45/* initiator tags; opaque for target */ 45/* initiator tags; opaque for target */
46typedef uint32_t __bitwise__ itt_t; 46typedef uint32_t __bitwise__ itt_t;
47/* below makes sense only for initiator that created this tag */ 47/* below makes sense only for initiator that created this tag */
48#define build_itt(itt, id, age) ((__force itt_t)\ 48#define build_itt(itt, age) ((__force itt_t)\
49 ((itt) | ((id) << ISCSI_CID_SHIFT) | ((age) << ISCSI_AGE_SHIFT))) 49 ((itt) | ((age) << ISCSI_AGE_SHIFT)))
50#define get_itt(itt) ((__force uint32_t)(itt_t)(itt) & ISCSI_ITT_MASK) 50#define get_itt(itt) ((__force uint32_t)(itt_t)(itt) & ISCSI_ITT_MASK)
51#define RESERVED_ITT ((__force itt_t)0xffffffff) 51#define RESERVED_ITT ((__force itt_t)0xffffffff)
52 52