Skip to content

Commit fd0e7e4

Browse files
avasquez01James Bottomley
authored andcommitted
[SCSI] qla2xxx: Correct endianess comparisons during ISP24xx NVRAM configuration.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
1 parent ffb39f0 commit fd0e7e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/scsi/qla2xxx/qla_init.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3371,7 +3371,7 @@ qla24xx_nvram_config(scsi_qla_host_t *ha)
33713371
strcpy(ha->model_number, "QLA2462");
33723372

33733373
/* Prepare nodename */
3374-
if ((icb->firmware_options_1 & BIT_14) == 0) {
3374+
if ((icb->firmware_options_1 & __constant_cpu_to_le32(BIT_14)) == 0) {
33753375
/*
33763376
* Firmware will apply the following mask if the nodename was
33773377
* not provided.
@@ -3387,8 +3387,8 @@ qla24xx_nvram_config(scsi_qla_host_t *ha)
33873387
ha->flags.enable_target_reset = 1;
33883388
ha->flags.enable_led_scheme = 0;
33893389

3390-
ha->operating_mode =
3391-
(icb->firmware_options_2 & (BIT_6 | BIT_5 | BIT_4)) >> 4;
3390+
ha->operating_mode = (le32_to_cpu(icb->firmware_options_2) &
3391+
(BIT_6 | BIT_5 | BIT_4)) >> 4;
33923392

33933393
memcpy(ha->fw_seriallink_options24, nv->seriallink_options,
33943394
sizeof(ha->fw_seriallink_options24));

0 commit comments

Comments
 (0)