diff options
author | Giridhar Malavali <giridhar.malavali@qlogic.com> | 2010-05-28 18:08:15 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 13:01:19 -0400 |
commit | b963752f47c54a29c11acee99e6c99b3c6bb35c5 (patch) | |
tree | f374f820a12ccdd7766722a1de67ada0d34b68e8 /drivers/scsi | |
parent | 9257aa4963873dcc3b339e2e3c0aba081c83695f (diff) |
[SCSI] qla2xxx: Clear drive active CRB register when not in use.
The CRB drive active register is cleared when driver is unloaded
or when driver enters failed state.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gbl.h | 1 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_iocb.c | 4 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_nx.c | 4 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_nx.h | 3 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 4 |
6 files changed, 13 insertions, 5 deletions
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index 8217c3bcbc2e..2247ef8702e4 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h | |||
@@ -513,7 +513,6 @@ extern int qla82xx_nvram_config(struct scsi_qla_host *); | |||
513 | extern int qla82xx_pinit_from_rom(scsi_qla_host_t *); | 513 | extern int qla82xx_pinit_from_rom(scsi_qla_host_t *); |
514 | extern int qla82xx_load_firmware(scsi_qla_host_t *); | 514 | extern int qla82xx_load_firmware(scsi_qla_host_t *); |
515 | extern int qla82xx_reset_hw(scsi_qla_host_t *); | 515 | extern int qla82xx_reset_hw(scsi_qla_host_t *); |
516 | extern int qla82xx_load_risc_blob(scsi_qla_host_t *, uint32_t *); | ||
517 | extern void qla82xx_watchdog(scsi_qla_host_t *); | 516 | extern void qla82xx_watchdog(scsi_qla_host_t *); |
518 | 517 | ||
519 | /* Firmware and flash related functions */ | 518 | /* Firmware and flash related functions */ |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index ab2cc71994c2..f1db11a0d699 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -1454,6 +1454,8 @@ qla2x00_setup_chip(scsi_qla_host_t *vha) | |||
1454 | rval = ha->isp_ops->load_risc(vha, &srisc_address); | 1454 | rval = ha->isp_ops->load_risc(vha, &srisc_address); |
1455 | if (rval == QLA_SUCCESS) | 1455 | if (rval == QLA_SUCCESS) |
1456 | goto enable_82xx_npiv; | 1456 | goto enable_82xx_npiv; |
1457 | else | ||
1458 | goto failed; | ||
1457 | } | 1459 | } |
1458 | 1460 | ||
1459 | if (!IS_FWI2_CAPABLE(ha) && !IS_QLA2100(ha) && !IS_QLA2200(ha)) { | 1461 | if (!IS_FWI2_CAPABLE(ha) && !IS_QLA2100(ha) && !IS_QLA2200(ha)) { |
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index 8ef945365412..5d0e99c2b522 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c | |||
@@ -1683,7 +1683,7 @@ qla2x00_login_iocb(srb_t *sp, struct mbx_entry *mbx) | |||
1683 | struct srb_iocb *lio = ctx->u.iocb_cmd; | 1683 | struct srb_iocb *lio = ctx->u.iocb_cmd; |
1684 | uint16_t opts; | 1684 | uint16_t opts; |
1685 | 1685 | ||
1686 | mbx->entry_type = MBX_IOCB_TYPE;; | 1686 | mbx->entry_type = MBX_IOCB_TYPE; |
1687 | SET_TARGET_ID(ha, mbx->loop_id, sp->fcport->loop_id); | 1687 | SET_TARGET_ID(ha, mbx->loop_id, sp->fcport->loop_id); |
1688 | mbx->mb0 = cpu_to_le16(MBC_LOGIN_FABRIC_PORT); | 1688 | mbx->mb0 = cpu_to_le16(MBC_LOGIN_FABRIC_PORT); |
1689 | opts = lio->u.logio.flags & SRB_LOGIN_COND_PLOGI ? BIT_0 : 0; | 1689 | opts = lio->u.logio.flags & SRB_LOGIN_COND_PLOGI ? BIT_0 : 0; |
@@ -1718,7 +1718,7 @@ qla2x00_logout_iocb(srb_t *sp, struct mbx_entry *mbx) | |||
1718 | { | 1718 | { |
1719 | struct qla_hw_data *ha = sp->fcport->vha->hw; | 1719 | struct qla_hw_data *ha = sp->fcport->vha->hw; |
1720 | 1720 | ||
1721 | mbx->entry_type = MBX_IOCB_TYPE;; | 1721 | mbx->entry_type = MBX_IOCB_TYPE; |
1722 | SET_TARGET_ID(ha, mbx->loop_id, sp->fcport->loop_id); | 1722 | SET_TARGET_ID(ha, mbx->loop_id, sp->fcport->loop_id); |
1723 | mbx->mb0 = cpu_to_le16(MBC_LOGOUT_FABRIC_PORT); | 1723 | mbx->mb0 = cpu_to_le16(MBC_LOGOUT_FABRIC_PORT); |
1724 | mbx->mb1 = HAS_EXTENDED_IDS(ha) ? | 1724 | mbx->mb1 = HAS_EXTENDED_IDS(ha) ? |
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c index ff562de0e8e7..eb12bf260a17 100644 --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c | |||
@@ -3279,6 +3279,10 @@ qla82xx_dev_failed_handler(scsi_qla_host_t *vha) | |||
3279 | /* Disable the board */ | 3279 | /* Disable the board */ |
3280 | qla_printk(KERN_INFO, ha, "Disabling the board\n"); | 3280 | qla_printk(KERN_INFO, ha, "Disabling the board\n"); |
3281 | 3281 | ||
3282 | qla82xx_idc_lock(ha); | ||
3283 | qla82xx_clear_drv_active(ha); | ||
3284 | qla82xx_idc_unlock(ha); | ||
3285 | |||
3282 | /* Set DEV_FAILED flag to disable timer */ | 3286 | /* Set DEV_FAILED flag to disable timer */ |
3283 | vha->device_flags |= DFLG_DEV_FAILED; | 3287 | vha->device_flags |= DFLG_DEV_FAILED; |
3284 | qla2x00_abort_all_cmds(vha, DID_NO_CONNECT << 16); | 3288 | qla2x00_abort_all_cmds(vha, DID_NO_CONNECT << 16); |
diff --git a/drivers/scsi/qla2xxx/qla_nx.h b/drivers/scsi/qla2xxx/qla_nx.h index f8f99a5ea532..aa95d3816d6c 100644 --- a/drivers/scsi/qla2xxx/qla_nx.h +++ b/drivers/scsi/qla2xxx/qla_nx.h | |||
@@ -538,11 +538,10 @@ | |||
538 | /* Driver Coexistence Defines */ | 538 | /* Driver Coexistence Defines */ |
539 | #define QLA82XX_CRB_DRV_ACTIVE (QLA82XX_CAM_RAM(0x138)) | 539 | #define QLA82XX_CRB_DRV_ACTIVE (QLA82XX_CAM_RAM(0x138)) |
540 | #define QLA82XX_CRB_DEV_STATE (QLA82XX_CAM_RAM(0x140)) | 540 | #define QLA82XX_CRB_DEV_STATE (QLA82XX_CAM_RAM(0x140)) |
541 | #define QLA82XX_CRB_DEV_PART_INFO (QLA82XX_CAM_RAM(0x14c)) | ||
542 | #define QLA82XX_CRB_DRV_IDC_VERSION (QLA82XX_CAM_RAM(0x174)) | ||
543 | #define QLA82XX_CRB_DRV_STATE (QLA82XX_CAM_RAM(0x144)) | 541 | #define QLA82XX_CRB_DRV_STATE (QLA82XX_CAM_RAM(0x144)) |
544 | #define QLA82XX_CRB_DRV_SCRATCH (QLA82XX_CAM_RAM(0x148)) | 542 | #define QLA82XX_CRB_DRV_SCRATCH (QLA82XX_CAM_RAM(0x148)) |
545 | #define QLA82XX_CRB_DEV_PART_INFO (QLA82XX_CAM_RAM(0x14c)) | 543 | #define QLA82XX_CRB_DEV_PART_INFO (QLA82XX_CAM_RAM(0x14c)) |
544 | #define QLA82XX_CRB_DRV_IDC_VERSION (QLA82XX_CAM_RAM(0x174)) | ||
546 | 545 | ||
547 | /* Every driver should use these Device State */ | 546 | /* Every driver should use these Device State */ |
548 | #define QLA82XX_DEV_COLD 1 | 547 | #define QLA82XX_DEV_COLD 1 |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index be1a8fcbb1fb..c345ba716728 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -2402,6 +2402,10 @@ qla2x00_remove_one(struct pci_dev *pdev) | |||
2402 | scsi_host_put(base_vha->host); | 2402 | scsi_host_put(base_vha->host); |
2403 | 2403 | ||
2404 | if (IS_QLA82XX(ha)) { | 2404 | if (IS_QLA82XX(ha)) { |
2405 | qla82xx_idc_lock(ha); | ||
2406 | qla82xx_clear_drv_active(ha); | ||
2407 | qla82xx_idc_unlock(ha); | ||
2408 | |||
2405 | iounmap((device_reg_t __iomem *)ha->nx_pcibase); | 2409 | iounmap((device_reg_t __iomem *)ha->nx_pcibase); |
2406 | if (!ql2xdbwr) | 2410 | if (!ql2xdbwr) |
2407 | iounmap((device_reg_t __iomem *)ha->nxdb_wr_ptr); | 2411 | iounmap((device_reg_t __iomem *)ha->nxdb_wr_ptr); |