[SCSI] qla2xxx: Perform fast mailbox read of flash regardless of size nor address alignment.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
Andrew Vasquez 2010-01-12 12:59:49 -08:00 committed by James Bottomley
parent f08b7251c4
commit 368bbe0777
1 changed files with 3 additions and 0 deletions

View File

@ -2292,11 +2292,14 @@ qla25xx_read_optrom_data(struct scsi_qla_host *vha, uint8_t *buf,
uint32_t faddr, left, burst; uint32_t faddr, left, burst;
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
if (IS_QLA25XX(ha) || IS_QLA81XX(ha))
goto try_fast;
if (offset & 0xfff) if (offset & 0xfff)
goto slow_read; goto slow_read;
if (length < OPTROM_BURST_SIZE) if (length < OPTROM_BURST_SIZE)
goto slow_read; goto slow_read;
try_fast:
optrom = dma_alloc_coherent(&ha->pdev->dev, OPTROM_BURST_SIZE, optrom = dma_alloc_coherent(&ha->pdev->dev, OPTROM_BURST_SIZE,
&optrom_dma, GFP_KERNEL); &optrom_dma, GFP_KERNEL);
if (!optrom) { if (!optrom) {