summaryrefslogtreecommitdiff
path: root/drivers/target/iscsi/iscsi_target_erl2.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-09-26 16:00:40 +0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-10-04 01:39:22 +0400
commit50e5c87de4c244662e47b28e499ace885d62248f (patch)
tree0cd84e70a1549a8d757e6fe48a8254b6e43ab783 /drivers/target/iscsi/iscsi_target_erl2.c
parent66c7db687631247b7a3493322b9aedeef3c6c7b5 (diff)
downloadlinux-50e5c87de4c244662e47b28e499ace885d62248f.tar.xz
iscsit: proper endianess conversions
Make sure all on the wire types are use as big endian and big endian only so that sparse can verify all the conversions are done right. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_erl2.c')
-rw-r--r--drivers/target/iscsi/iscsi_target_erl2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/target/iscsi/iscsi_target_erl2.c b/drivers/target/iscsi/iscsi_target_erl2.c
index 660694544128..17d8c20094fd 100644
--- a/drivers/target/iscsi/iscsi_target_erl2.c
+++ b/drivers/target/iscsi/iscsi_target_erl2.c
@@ -36,7 +36,7 @@
*/
void iscsit_create_conn_recovery_datain_values(
struct iscsi_cmd *cmd,
- u32 exp_data_sn)
+ __be32 exp_data_sn)
{
u32 data_sn = 0;
struct iscsi_conn *conn = cmd->conn;
@@ -44,7 +44,7 @@ void iscsit_create_conn_recovery_datain_values(
cmd->next_burst_len = 0;
cmd->read_data_done = 0;
- while (exp_data_sn > data_sn) {
+ while (be32_to_cpu(exp_data_sn) > data_sn) {
if ((cmd->next_burst_len +
conn->conn_ops->MaxRecvDataSegmentLength) <
conn->sess->sess_ops->MaxBurstLength) {