Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226817
b: refs/heads/master
c: 4cd83cb
h: refs/heads/master
i:
  226815: 3318783
v: v3
  • Loading branch information
Lalit Chandivade authored and James Bottomley committed Dec 21, 2010
1 parent 854ca28 commit efa8664
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe998527e3f1f5a6eeab5baa23ac2b60ae47e96b
refs/heads/master: 4cd83cbef878b5d0d4c65ac0a20d12a8bf9f551d
17 changes: 11 additions & 6 deletions trunk/drivers/scsi/qla4xxx/ql4_nx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,14 +1127,14 @@ qla4_8xxx_pinit_from_rom(struct scsi_qla_host *ha, int verbose)
static int
qla4_8xxx_load_from_flash(struct scsi_qla_host *ha, uint32_t image_start)
{
int i;
int i, rval = 0;
long size = 0;
long flashaddr, memaddr;
u64 data;
u32 high, low;

flashaddr = memaddr = ha->hw.flt_region_bootload;
size = (image_start - flashaddr)/8;
size = (image_start - flashaddr) / 8;

DEBUG2(printk("scsi%ld: %s: bootldr=0x%lx, fw_image=0x%x\n",
ha->host_no, __func__, flashaddr, image_start));
Expand All @@ -1143,14 +1143,18 @@ qla4_8xxx_load_from_flash(struct scsi_qla_host *ha, uint32_t image_start)
if ((qla4_8xxx_rom_fast_read(ha, flashaddr, (int *)&low)) ||
(qla4_8xxx_rom_fast_read(ha, flashaddr + 4,
(int *)&high))) {
return -1;
rval = -1;
goto exit_load_from_flash;
}
data = ((u64)high << 32) | low ;
qla4_8xxx_pci_mem_write_2M(ha, memaddr, &data, 8);
rval = qla4_8xxx_pci_mem_write_2M(ha, memaddr, &data, 8);
if (rval)
goto exit_load_from_flash;

flashaddr += 8;
memaddr += 8;

if (i%0x1000 == 0)
if (i % 0x1000 == 0)
msleep(1);

}
Expand All @@ -1162,7 +1166,8 @@ qla4_8xxx_load_from_flash(struct scsi_qla_host *ha, uint32_t image_start)
qla4_8xxx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0x80001e);
read_unlock(&ha->hw_lock);

return 0;
exit_load_from_flash:
return rval;
}

static int qla4_8xxx_load_fw(struct scsi_qla_host *ha, uint32_t image_start)
Expand Down

0 comments on commit efa8664

Please sign in to comment.