diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_sup.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_sup.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index 010e69b29afe..8b3de4e54c28 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "qla_def.h" | 7 | #include "qla_def.h" |
8 | 8 | ||
9 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/vmalloc.h> | 11 | #include <linux/vmalloc.h> |
11 | #include <asm/uaccess.h> | 12 | #include <asm/uaccess.h> |
12 | 13 | ||
@@ -2292,11 +2293,14 @@ qla25xx_read_optrom_data(struct scsi_qla_host *vha, uint8_t *buf, | |||
2292 | uint32_t faddr, left, burst; | 2293 | uint32_t faddr, left, burst; |
2293 | struct qla_hw_data *ha = vha->hw; | 2294 | struct qla_hw_data *ha = vha->hw; |
2294 | 2295 | ||
2296 | if (IS_QLA25XX(ha) || IS_QLA81XX(ha)) | ||
2297 | goto try_fast; | ||
2295 | if (offset & 0xfff) | 2298 | if (offset & 0xfff) |
2296 | goto slow_read; | 2299 | goto slow_read; |
2297 | if (length < OPTROM_BURST_SIZE) | 2300 | if (length < OPTROM_BURST_SIZE) |
2298 | goto slow_read; | 2301 | goto slow_read; |
2299 | 2302 | ||
2303 | try_fast: | ||
2300 | optrom = dma_alloc_coherent(&ha->pdev->dev, OPTROM_BURST_SIZE, | 2304 | optrom = dma_alloc_coherent(&ha->pdev->dev, OPTROM_BURST_SIZE, |
2301 | &optrom_dma, GFP_KERNEL); | 2305 | &optrom_dma, GFP_KERNEL); |
2302 | if (!optrom) { | 2306 | if (!optrom) { |