summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla4xxx/ql4_mbx.c
diff options
context:
space:
mode:
authorManish Rangankar <manish.rangankar@qlogic.com>2011-07-25 13:48:54 -0500
committerJames Bottomley <JBottomley@Parallels.com>2011-08-27 08:36:26 -0600
commit0e7e85019c2709131b10c5f34b602cc6b94fe782 (patch)
tree18a9236d6c6f0d2fbebbed0bd19e431f1ef588f0 /drivers/scsi/qla4xxx/ql4_mbx.c
parentb3a271a94d0034dd3bab10b8d8cd432843be629e (diff)
[SCSI] qla4xxx: Remove reduandant code after open-iscsi integration.
1. Remove device database entry (ddb) state. 2. Remove device database (DDB) list building. With open-iscsi integration the logins to the target devices are handled by the user space. So the information of target is now maintained in the iscsi_session object. This is handled at libiscsi level so there is no need to maintain a list of DDBs in the qla4xxx LLD. 3. qla4xxx: Remove add_device_dynamically. Since autologin in FW is disabled with open-iscsi integration, driver will never get an AEN for which driver has not requested a DDB index. So remove the add_device_dynamically function. 4. Remove qla4xxx_tgt_dscvr Since firmware autologin is disabled this function will not work. Now user has the ability to do the target discovery and login to each target individually. Firwmare will not do the login on its own. 5. Remove relogin related code All relogin is handled by userspace now. qla4xxx just need to notify userspace of a connection failure, this triggers the relogin. 6. Remove add_session and alloc_session Now qla4xxx uses iscsi_session_setup that would do the necessary allocations for session and ddb_entry. Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com> Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_mbx.c')
-rw-r--r--drivers/scsi/qla4xxx/ql4_mbx.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
index 32e40cb534f4..21884019dab8 100644
--- a/drivers/scsi/qla4xxx/ql4_mbx.c
+++ b/drivers/scsi/qla4xxx/ql4_mbx.c
@@ -1214,61 +1214,6 @@ int qla4xxx_req_ddb_entry(struct scsi_qla_host *ha, uint32_t ddb_index,
return status;
}
-int qla4xxx_send_tgts(struct scsi_qla_host *ha, char *ip, uint16_t port)
-{
- struct dev_db_entry *fw_ddb_entry;
- dma_addr_t fw_ddb_entry_dma;
- uint32_t ddb_index;
- uint32_t mbx_sts;
- uint32_t options = 0;
- int ret_val = QLA_SUCCESS;
-
-
- fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev,
- sizeof(*fw_ddb_entry),
- &fw_ddb_entry_dma, GFP_KERNEL);
- if (!fw_ddb_entry) {
- DEBUG2(printk("scsi%ld: %s: Unable to allocate dma buffer.\n",
- ha->host_no, __func__));
- ret_val = QLA_ERROR;
- goto exit_send_tgts_no_free;
- }
-
- ret_val = qla4xxx_get_default_ddb(ha, options, fw_ddb_entry_dma);
- if (ret_val != QLA_SUCCESS)
- goto exit_send_tgts;
-
- ret_val = qla4xxx_req_ddb_entry(ha, &ddb_index, &mbx_sts);
- if (ret_val != QLA_SUCCESS)
- goto exit_send_tgts;
-
- memset(fw_ddb_entry->iscsi_alias, 0,
- sizeof(fw_ddb_entry->iscsi_alias));
-
- memset(fw_ddb_entry->iscsi_name, 0,
- sizeof(fw_ddb_entry->iscsi_name));
-
- memset(fw_ddb_entry->ip_addr, 0, sizeof(fw_ddb_entry->ip_addr));
- memset(fw_ddb_entry->tgt_addr, 0,
- sizeof(fw_ddb_entry->tgt_addr));
-
- fw_ddb_entry->options = (DDB_OPT_DISC_SESSION | DDB_OPT_TARGET);
- fw_ddb_entry->port = cpu_to_le16(ntohs(port));
-
- fw_ddb_entry->ip_addr[0] = *ip;
- fw_ddb_entry->ip_addr[1] = *(ip + 1);
- fw_ddb_entry->ip_addr[2] = *(ip + 2);
- fw_ddb_entry->ip_addr[3] = *(ip + 3);
-
- ret_val = qla4xxx_set_ddb_entry(ha, ddb_index, fw_ddb_entry_dma, NULL);
-
-exit_send_tgts:
- dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry),
- fw_ddb_entry, fw_ddb_entry_dma);
-exit_send_tgts_no_free:
- return ret_val;
-}
-
int qla4xxx_clear_ddb_entry(struct scsi_qla_host *ha, uint32_t ddb_index)
{
int status;