diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2007-07-19 23:37:34 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-07-20 10:25:29 -0400 |
commit | c3a2f0dfe1cecac76950f340f540c1a887dd2500 (patch) | |
tree | be6cce05e0fba81e9bf91351aebab23918ae5115 /drivers/scsi/qla2xxx/qla_init.c | |
parent | af6177d88d76834b4d05499482d471d64559a6af (diff) |
[SCSI] qla2xxx: Add ISP25XX support.
Large code-reuse from ISP24xx, consolidate RISC memory
extraction routines during firmware-dump.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 3c5fcf84cb03..5ec798c2bf13 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -287,6 +287,40 @@ qla24xx_pci_config(scsi_qla_host_t *ha) | |||
287 | } | 287 | } |
288 | 288 | ||
289 | /** | 289 | /** |
290 | * qla25xx_pci_config() - Setup ISP25xx PCI configuration registers. | ||
291 | * @ha: HA context | ||
292 | * | ||
293 | * Returns 0 on success. | ||
294 | */ | ||
295 | int | ||
296 | qla25xx_pci_config(scsi_qla_host_t *ha) | ||
297 | { | ||
298 | uint16_t w; | ||
299 | uint32_t d; | ||
300 | |||
301 | pci_set_master(ha->pdev); | ||
302 | pci_try_set_mwi(ha->pdev); | ||
303 | |||
304 | pci_read_config_word(ha->pdev, PCI_COMMAND, &w); | ||
305 | w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); | ||
306 | w &= ~PCI_COMMAND_INTX_DISABLE; | ||
307 | pci_write_config_word(ha->pdev, PCI_COMMAND, w); | ||
308 | |||
309 | /* PCIe -- adjust Maximum Read Request Size (2048). */ | ||
310 | if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) | ||
311 | pcie_set_readrq(ha->pdev, 2048); | ||
312 | |||
313 | /* Reset expansion ROM address decode enable */ | ||
314 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); | ||
315 | d &= ~PCI_ROM_ADDRESS_ENABLE; | ||
316 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); | ||
317 | |||
318 | ha->chip_revision = ha->pdev->revision; | ||
319 | |||
320 | return QLA_SUCCESS; | ||
321 | } | ||
322 | |||
323 | /** | ||
290 | * qla2x00_isp_firmware() - Choose firmware image. | 324 | * qla2x00_isp_firmware() - Choose firmware image. |
291 | * @ha: HA context | 325 | * @ha: HA context |
292 | * | 326 | * |
@@ -717,7 +751,9 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *ha) | |||
717 | mem_size = (ha->fw_memory_size - 0x11000 + 1) * | 751 | mem_size = (ha->fw_memory_size - 0x11000 + 1) * |
718 | sizeof(uint16_t); | 752 | sizeof(uint16_t); |
719 | } else if (IS_FWI2_CAPABLE(ha)) { | 753 | } else if (IS_FWI2_CAPABLE(ha)) { |
720 | fixed_size = offsetof(struct qla24xx_fw_dump, ext_mem); | 754 | fixed_size = IS_QLA25XX(ha) ? |
755 | offsetof(struct qla25xx_fw_dump, ext_mem): | ||
756 | offsetof(struct qla24xx_fw_dump, ext_mem); | ||
721 | mem_size = (ha->fw_memory_size - 0x100000 + 1) * | 757 | mem_size = (ha->fw_memory_size - 0x100000 + 1) * |
722 | sizeof(uint32_t); | 758 | sizeof(uint32_t); |
723 | 759 | ||