Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130281
b: refs/heads/master
c: 85d0acb
h: refs/heads/master
i:
  130279: cbe817a
v: v3
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Jan 25, 2009
1 parent 43cb499 commit dbffdbf
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 6e9f21f3d3d4933087d1e13b04667b6eb663b487
refs/heads/master: 85d0acbb2e64cee4d3253ea9ce4650658e05d945
10 changes: 4 additions & 6 deletions trunk/drivers/scsi/qla2xxx/qla_sup.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ qla24xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr,
int ret;
uint32_t liter, miter;
uint32_t sec_mask, rest_addr;
uint32_t fdata, findex;
uint32_t fdata;
dma_addr_t optrom_dma;
void *optrom = NULL;
uint32_t *s, *d;
Expand All @@ -1003,17 +1003,15 @@ qla24xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr,
}

rest_addr = (ha->fdt_block_size >> 2) - 1;
sec_mask = (ha->optrom_size >> 2) - (ha->fdt_block_size >> 2);
sec_mask = ~rest_addr;

qla24xx_unprotect_flash(ha);

for (liter = 0; liter < dwords; liter++, faddr++, dwptr++) {

findex = faddr;
fdata = (findex & sec_mask) << 2;
fdata = (faddr & sec_mask) << 2;

/* Are we at the beginning of a sector? */
if ((findex & rest_addr) == 0) {
if ((faddr & rest_addr) == 0) {
/* Do sector unprotect. */
if (ha->fdt_unprotect_sec_cmd)
qla24xx_write_flash_dword(ha,
Expand Down

0 comments on commit dbffdbf

Please sign in to comment.