From b7cc176c9eb3aa6989ac099efd8bdd6d0eaa784a Mon Sep 17 00:00:00 2001 From: Joe Carnuccio Date: Thu, 20 Sep 2007 14:07:35 -0700 Subject: [SCSI] qla2xxx: Allow region-based flash-part accesses. Additional cleanups and Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley --- drivers/scsi/qla2xxx/qla_sup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/scsi/qla2xxx/qla_sup.c') diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index ad3d1de51d8c..40b059fc1981 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c @@ -559,7 +559,7 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr, ret = QLA_SUCCESS; /* Prepare burst-capable write on supported ISPs. */ - if (IS_QLA25XX(ha) && !(faddr & ~OPTROM_BURST_SIZE) && + if (IS_QLA25XX(ha) && !(faddr & 0xfff) && dwords > OPTROM_BURST_DWORDS) { optrom = dma_alloc_coherent(&ha->pdev->dev, OPTROM_BURST_SIZE, &optrom_dma, GFP_KERNEL); @@ -1824,7 +1824,7 @@ qla25xx_read_optrom_data(struct scsi_qla_host *ha, uint8_t *buf, uint8_t *pbuf; uint32_t faddr, left, burst; - if (offset & ~OPTROM_BURST_SIZE) + if (offset & 0xfff) goto slow_read; if (length < OPTROM_BURST_SIZE) goto slow_read; -- cgit v1.2.3