@@ -928,7 +928,8 @@ qla27xx_template_checksum(void *p, ulong size)
928
928
static inline int
929
929
qla27xx_verify_template_checksum (struct qla27xx_fwdt_template * tmp )
930
930
{
931
- return qla27xx_template_checksum (tmp , tmp -> template_size ) == 0 ;
931
+ return qla27xx_template_checksum (tmp ,
932
+ le32_to_cpu (tmp -> template_size )) == 0 ;
932
933
}
933
934
934
935
static inline int
@@ -944,7 +945,7 @@ qla27xx_execute_fwdt_template(struct scsi_qla_host *vha,
944
945
ulong len = 0 ;
945
946
946
947
if (qla27xx_fwdt_template_valid (tmp )) {
947
- len = tmp -> template_size ;
948
+ len = le32_to_cpu ( tmp -> template_size ) ;
948
949
tmp = memcpy (buf , tmp , len );
949
950
ql27xx_edit_template (vha , tmp );
950
951
qla27xx_walk_template (vha , tmp , buf , & len );
@@ -960,7 +961,7 @@ qla27xx_fwdt_calculate_dump_size(struct scsi_qla_host *vha, void *p)
960
961
ulong len = 0 ;
961
962
962
963
if (qla27xx_fwdt_template_valid (tmp )) {
963
- len = tmp -> template_size ;
964
+ len = le32_to_cpu ( tmp -> template_size ) ;
964
965
qla27xx_walk_template (vha , tmp , NULL , & len );
965
966
}
966
967
@@ -972,7 +973,7 @@ qla27xx_fwdt_template_size(void *p)
972
973
{
973
974
struct qla27xx_fwdt_template * tmp = p ;
974
975
975
- return tmp -> template_size ;
976
+ return le32_to_cpu ( tmp -> template_size ) ;
976
977
}
977
978
978
979
int
0 commit comments