aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_mbx.c
diff options
context:
space:
mode:
authorManish Rangankar <manish.rangankar@qlogic.com>2011-07-25 14:48:54 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-08-27 10:36:26 -0400
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,
1214 return status; 1214 return status;
1215} 1215}
1216 1216
1217int qla4xxx_send_tgts(struct scsi_qla_host *ha, char *ip, uint16_t port)
1218{
1219 struct dev_db_entry *fw_ddb_entry;
1220 dma_addr_t fw_ddb_entry_dma;
1221 uint32_t ddb_index;
1222 uint32_t mbx_sts;
1223 uint32_t options = 0;
1224 int ret_val = QLA_SUCCESS;
1225
1226
1227 fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev,
1228 sizeof(*fw_ddb_entry),
1229 &fw_ddb_entry_dma, GFP_KERNEL);
1230 if (!fw_ddb_entry) {
1231 DEBUG2(printk("scsi%ld: %s: Unable to allocate dma buffer.\n",
1232 ha->host_no, __func__));
1233 ret_val = QLA_ERROR;
1234 goto exit_send_tgts_no_free;
1235 }
1236
1237 ret_val = qla4xxx_get_default_ddb(ha, options, fw_ddb_entry_dma);
1238 if (ret_val != QLA_SUCCESS)
1239 goto exit_send_tgts;
1240
1241 ret_val = qla4xxx_req_ddb_entry(ha, &ddb_index, &mbx_sts);
1242 if (ret_val != QLA_SUCCESS)
1243 goto exit_send_tgts;
1244
1245 memset(fw_ddb_entry->iscsi_alias, 0,
1246 sizeof(fw_ddb_entry->iscsi_alias));
1247
1248 memset(fw_ddb_entry->iscsi_name, 0,
1249 sizeof(fw_ddb_entry->iscsi_name));
1250
1251 memset(fw_ddb_entry->ip_addr, 0, sizeof(fw_ddb_entry->ip_addr));
1252 memset(fw_ddb_entry->tgt_addr, 0,
1253 sizeof(fw_ddb_entry->tgt_addr));
1254
1255 fw_ddb_entry->options = (DDB_OPT_DISC_SESSION | DDB_OPT_TARGET);
1256 fw_ddb_entry->port = cpu_to_le16(ntohs(port));
1257
1258 fw_ddb_entry->ip_addr[0] = *ip;
1259 fw_ddb_entry->ip_addr[1] = *(ip + 1);
1260 fw_ddb_entry->ip_addr[2] = *(ip + 2);
1261 fw_ddb_entry->ip_addr[3] = *(ip + 3);
1262
1263 ret_val = qla4xxx_set_ddb_entry(ha, ddb_index, fw_ddb_entry_dma, NULL);
1264
1265exit_send_tgts:
1266 dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry),
1267 fw_ddb_entry, fw_ddb_entry_dma);
1268exit_send_tgts_no_free:
1269 return ret_val;
1270}
1271
1272int qla4xxx_clear_ddb_entry(struct scsi_qla_host *ha, uint32_t ddb_index) 1217int qla4xxx_clear_ddb_entry(struct scsi_qla_host *ha, uint32_t ddb_index)
1273{ 1218{
1274 int status; 1219 int status;