summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2007-05-30 12:57:24 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-06-02 15:37:19 -0400
commit2223696192c687f2853e42b7c1e0d3ef002081fd (patch)
tree9eef082af7f3286781134226bfc98ec401d41e79 /drivers/scsi/qla4xxx
parent4e7aba73f9f6e9fe6d3fa10d3fd63cd4882ba3d0 (diff)
downloadlinux-2223696192c687f2853e42b7c1e0d3ef002081fd.tar.gz
linux-2223696192c687f2853e42b7c1e0d3ef002081fd.tar.bz2
linux-2223696192c687f2853e42b7c1e0d3ef002081fd.zip
[SCSI] iscsi class, qla4xxx, iscsi_tcp: export local address
This patch exports the local address for the session. For qla4xxx this is the ip of the hba's port. For software this is the src addr of the socket. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: David C Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla4xxx')
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 315ab691056f..b87b460832ea 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -106,6 +106,7 @@ static struct iscsi_transport qla4xxx_iscsi_transport = {
.param_mask = ISCSI_CONN_PORT | ISCSI_CONN_ADDRESS |
ISCSI_TARGET_NAME | ISCSI_TPGT,
.host_param_mask = ISCSI_HOST_HWADDRESS |
+ ISCSI_HOST_IPADDRESS |
ISCSI_HOST_INITIATOR_NAME,
.sessiondata_size = sizeof(struct ddb_entry),
.host_template = &qla4xxx_driver_template,
@@ -192,8 +193,13 @@ static int qla4xxx_host_get_param(struct Scsi_Host *shost,
case ISCSI_HOST_PARAM_HWADDRESS:
len = format_addr(buf, ha->my_mac, MAC_ADDR_LEN);
break;
+ case ISCSI_HOST_PARAM_IPADDRESS:
+ len = sprintf(buf, "%d.%d.%d.%d\n", ha->ip_address[0],
+ ha->ip_address[1], ha->ip_address[2],
+ ha->ip_address[3]);
+ break;
case ISCSI_HOST_PARAM_INITIATOR_NAME:
- len = sprintf(buf, ha->name_string);
+ len = sprintf(buf, "%s\n", ha->name_string);
break;
default:
return -ENOSYS;