Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204221
b: refs/heads/master
c: 3b2bef1
h: refs/heads/master
i:
  204219: addf489
v: v3
  • Loading branch information
Vikas Chaudhary authored and James Bottomley committed Jul 28, 2010
1 parent a6c9e87 commit d93d874
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bb6f7d5b71356be560ea84dd5a721f083d3a9e8e
refs/heads/master: 3b2bef1fc85f127a99ad6b90a94b033fdc57341c
3 changes: 3 additions & 0 deletions trunk/drivers/scsi/qla4xxx/ql4_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,9 @@ static int qla4xxx_update_ddb_entry(struct scsi_qla_host *ha,
memcpy(&ddb_entry->iscsi_name[0], &fw_ddb_entry->iscsi_name[0],
min(sizeof(ddb_entry->iscsi_name),
sizeof(fw_ddb_entry->iscsi_name)));
memcpy(&ddb_entry->iscsi_alias[0], &fw_ddb_entry->iscsi_alias[0],
min(sizeof(ddb_entry->iscsi_alias),
sizeof(fw_ddb_entry->iscsi_alias)));
memcpy(&ddb_entry->ip_addr[0], &fw_ddb_entry->ip_addr[0],
min(sizeof(ddb_entry->ip_addr), sizeof(fw_ddb_entry->ip_addr)));

Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/scsi/qla4xxx/ql4_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ static struct iscsi_transport qla4xxx_iscsi_transport = {
.caps = CAP_FW_DB | CAP_SENDTARGETS_OFFLOAD |
CAP_DATA_PATH_OFFLOAD,
.param_mask = ISCSI_CONN_PORT | ISCSI_CONN_ADDRESS |
ISCSI_TARGET_NAME | ISCSI_TPGT,
ISCSI_TARGET_NAME | ISCSI_TPGT |
ISCSI_TARGET_ALIAS,
.host_param_mask = ISCSI_HOST_HWADDRESS |
ISCSI_HOST_IPADDRESS |
ISCSI_HOST_INITIATOR_NAME,
Expand Down Expand Up @@ -210,6 +211,10 @@ static int qla4xxx_sess_get_param(struct iscsi_cls_session *sess,
case ISCSI_PARAM_TPGT:
len = sprintf(buf, "%u\n", ddb_entry->tpgt);
break;
case ISCSI_PARAM_TARGET_ALIAS:
len = snprintf(buf, PAGE_SIZE - 1, "%s\n",
ddb_entry->iscsi_alias);
break;
default:
return -ENOSYS;
}
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/scsi/scsi_transport_iscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <scsi/scsi_transport_iscsi.h>
#include <scsi/iscsi_if.h>

#define ISCSI_SESSION_ATTRS 22
#define ISCSI_SESSION_ATTRS 23
#define ISCSI_CONN_ATTRS 13
#define ISCSI_HOST_ATTRS 4

Expand Down Expand Up @@ -1763,7 +1763,8 @@ iscsi_session_attr(abort_tmo, ISCSI_PARAM_ABORT_TMO, 0);
iscsi_session_attr(lu_reset_tmo, ISCSI_PARAM_LU_RESET_TMO, 0);
iscsi_session_attr(tgt_reset_tmo, ISCSI_PARAM_TGT_RESET_TMO, 0);
iscsi_session_attr(ifacename, ISCSI_PARAM_IFACE_NAME, 0);
iscsi_session_attr(initiatorname, ISCSI_PARAM_INITIATOR_NAME, 0)
iscsi_session_attr(initiatorname, ISCSI_PARAM_INITIATOR_NAME, 0);
iscsi_session_attr(targetalias, ISCSI_PARAM_TARGET_ALIAS, 0);

static ssize_t
show_priv_session_state(struct device *dev, struct device_attribute *attr,
Expand Down Expand Up @@ -2006,6 +2007,7 @@ iscsi_register_transport(struct iscsi_transport *tt)
SETUP_SESSION_RD_ATTR(tgt_reset_tmo,ISCSI_TGT_RESET_TMO);
SETUP_SESSION_RD_ATTR(ifacename, ISCSI_IFACE_NAME);
SETUP_SESSION_RD_ATTR(initiatorname, ISCSI_INITIATOR_NAME);
SETUP_SESSION_RD_ATTR(targetalias, ISCSI_TARGET_ALIAS);
SETUP_PRIV_SESSION_RD_ATTR(recovery_tmo);
SETUP_PRIV_SESSION_RD_ATTR(state);

Expand Down
2 changes: 2 additions & 0 deletions trunk/include/scsi/iscsi_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ enum iscsi_param {
ISCSI_PARAM_INITIATOR_NAME,

ISCSI_PARAM_TGT_RESET_TMO,
ISCSI_PARAM_TARGET_ALIAS,
/* must always be last */
ISCSI_PARAM_MAX,
};
Expand Down Expand Up @@ -353,6 +354,7 @@ enum iscsi_param {
#define ISCSI_ISID (1ULL << ISCSI_PARAM_ISID)
#define ISCSI_INITIATOR_NAME (1ULL << ISCSI_PARAM_INITIATOR_NAME)
#define ISCSI_TGT_RESET_TMO (1ULL << ISCSI_PARAM_TGT_RESET_TMO)
#define ISCSI_TARGET_ALIAS (1ULL << ISCSI_PARAM_TARGET_ALIAS)

/* iSCSI HBA params */
enum iscsi_host_param {
Expand Down

0 comments on commit d93d874

Please sign in to comment.