diff options
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_os.c')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 58 |
1 files changed, 42 insertions, 16 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 5dc697ce8b5d..bab87e47b238 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -188,6 +188,40 @@ static int qla4xxx_sysfs_ddb_logout_sid(struct iscsi_cls_session *cls_sess); static struct qla4_8xxx_legacy_intr_set legacy_intr[] = QLA82XX_LEGACY_INTR_CONFIG; +static const uint32_t qla4_82xx_reg_tbl[] = { + QLA82XX_PEG_HALT_STATUS1, + QLA82XX_PEG_HALT_STATUS2, + QLA82XX_PEG_ALIVE_COUNTER, + QLA82XX_CRB_DRV_ACTIVE, + QLA82XX_CRB_DEV_STATE, + QLA82XX_CRB_DRV_STATE, + QLA82XX_CRB_DRV_SCRATCH, + QLA82XX_CRB_DEV_PART_INFO, + QLA82XX_CRB_DRV_IDC_VERSION, + QLA82XX_FW_VERSION_MAJOR, + QLA82XX_FW_VERSION_MINOR, + QLA82XX_FW_VERSION_SUB, + CRB_CMDPEG_STATE, + CRB_TEMP_STATE, +}; + +static const uint32_t qla4_83xx_reg_tbl[] = { + QLA83XX_PEG_HALT_STATUS1, + QLA83XX_PEG_HALT_STATUS2, + QLA83XX_PEG_ALIVE_COUNTER, + QLA83XX_CRB_DRV_ACTIVE, + QLA83XX_CRB_DEV_STATE, + QLA83XX_CRB_DRV_STATE, + QLA83XX_CRB_DRV_SCRATCH, + QLA83XX_CRB_DEV_PART_INFO1, + QLA83XX_CRB_IDC_VER_MAJOR, + QLA83XX_FW_VER_MAJOR, + QLA83XX_FW_VER_MINOR, + QLA83XX_FW_VER_SUB, + QLA83XX_CMDPEG_STATE, + QLA83XX_ASIC_TEMP, +}; + static struct scsi_host_template qla4xxx_driver_template = { .module = THIS_MODULE, .name = DRIVER_NAME, @@ -1845,12 +1879,10 @@ exit_get_stats: static enum blk_eh_timer_return qla4xxx_eh_cmd_timed_out(struct scsi_cmnd *sc) { struct iscsi_cls_session *session; - struct iscsi_session *sess; unsigned long flags; enum blk_eh_timer_return ret = BLK_EH_DONE; session = starget_to_session(scsi_target(sc->device)); - sess = session->dd_data; spin_lock_irqsave(&session->lock, flags); if (session->state == ISCSI_SESSION_FAILED) @@ -3059,7 +3091,6 @@ qla4xxx_session_create(struct iscsi_endpoint *ep, struct ddb_entry *ddb_entry; uint16_t ddb_index; struct iscsi_session *sess; - struct sockaddr *dst_addr; int ret; if (!ep) { @@ -3068,7 +3099,6 @@ qla4xxx_session_create(struct iscsi_endpoint *ep, } qla_ep = ep->dd_data; - dst_addr = (struct sockaddr *)&qla_ep->dst_addr; ha = to_qla_host(qla_ep->host); DEBUG2(ql4_printk(KERN_INFO, ha, "%s: host: %ld\n", __func__, ha->host_no)); @@ -4515,7 +4545,7 @@ static void qla4xxx_check_relogin_flash_ddb(struct iscsi_cls_session *cls_sess) /** * qla4xxx_timer - checks every second for work to do. - * @ha: Pointer to host adapter structure. + * @t: Context to obtain pointer to host adapter structure. **/ static void qla4xxx_timer(struct timer_list *t) { @@ -5269,7 +5299,7 @@ static void qla4xxx_do_work(struct scsi_qla_host *ha) /** * qla4xxx_do_dpc - dpc routine - * @data: in our case pointer to adapter structure + * @work: Context to obtain pointer to host adapter structure. * * This routine is a task that is schedule by the interrupt handler * to perform the background processing for interrupts. We put it @@ -5492,7 +5522,7 @@ static void qla4xxx_free_adapter(struct scsi_qla_host *ha) int qla4_8xxx_iospace_config(struct scsi_qla_host *ha) { int status = 0; - unsigned long mem_base, mem_len, db_base, db_len; + unsigned long mem_base, mem_len; struct pci_dev *pdev = ha->pdev; status = pci_request_regions(pdev, DRIVER_NAME); @@ -5536,9 +5566,6 @@ int qla4_8xxx_iospace_config(struct scsi_qla_host *ha) ((uint8_t *)ha->nx_pcibase); } - db_base = pci_resource_start(pdev, 4); /* doorbell is on bar 4 */ - db_len = pci_resource_len(pdev, 4); - return 0; iospace_error_exit: return -ENOMEM; @@ -6249,14 +6276,12 @@ kset_free: static void qla4xxx_get_param_ddb(struct ddb_entry *ddb_entry, struct ql4_tuple_ddb *tddb) { - struct scsi_qla_host *ha; struct iscsi_cls_session *cls_sess; struct iscsi_cls_conn *cls_conn; struct iscsi_session *sess; struct iscsi_conn *conn; DEBUG2(printk(KERN_INFO "Func: %s\n", __func__)); - ha = ddb_entry->ha; cls_sess = ddb_entry->sess; sess = cls_sess->dd_data; cls_conn = ddb_entry->conn; @@ -8591,7 +8616,7 @@ exit_login_resp: /** * qla4xxx_probe_adapter - callback function to probe HBA * @pdev: pointer to pci_dev structure - * @pci_device_id: pointer to pci_device entry + * @ent: pointer to pci_device entry * * This routine will probe for Qlogic 4xxx iSCSI host adapters. * It returns zero if successful. It also initializes all data necessary for @@ -8977,7 +9002,7 @@ static void qla4xxx_destroy_fw_ddb_session(struct scsi_qla_host *ha) } /** * qla4xxx_remove_adapter - callback function to remove adapter. - * @pci_dev: PCI device pointer + * @pdev: PCI device pointer **/ static void qla4xxx_remove_adapter(struct pci_dev *pdev) { @@ -9144,8 +9169,8 @@ static int qla4xxx_wait_for_hba_online(struct scsi_qla_host *ha) /** * qla4xxx_eh_wait_for_commands - wait for active cmds to finish. * @ha: pointer to HBA - * @t: target id - * @l: lun id + * @stgt: pointer to SCSI target + * @sdev: pointer to SCSI device * * This function waits for all outstanding commands to a lun to complete. It * returns 0 if all pending commands are returned and 1 otherwise. @@ -9615,6 +9640,7 @@ qla4xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state) * qla4xxx_pci_mmio_enabled() gets called if * qla4xxx_pci_error_detected() returns PCI_ERS_RESULT_CAN_RECOVER * and read/write to the device still works. + * @pdev: PCI device pointer **/ static pci_ers_result_t qla4xxx_pci_mmio_enabled(struct pci_dev *pdev) |