Skip to content

Commit

Permalink
[SCSI] qla2xxx: Perform fast mailbox read of flash regardless of size…
Browse files Browse the repository at this point in the history
… nor address alignment.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Jan 17, 2010
1 parent f08b725 commit 368bbe0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/scsi/qla2xxx/qla_sup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2292,11 +2292,14 @@ qla25xx_read_optrom_data(struct scsi_qla_host *vha, uint8_t *buf,
uint32_t faddr, left, burst;
struct qla_hw_data *ha = vha->hw;

if (IS_QLA25XX(ha) || IS_QLA81XX(ha))
goto try_fast;
if (offset & 0xfff)
goto slow_read;
if (length < OPTROM_BURST_SIZE)
goto slow_read;

try_fast:
optrom = dma_alloc_coherent(&ha->pdev->dev, OPTROM_BURST_SIZE,
&optrom_dma, GFP_KERNEL);
if (!optrom) {
Expand Down

0 comments on commit 368bbe0

Please sign in to comment.