aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2007-05-30 13:57:24 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-06-02 15:37:19 -0400
commit2223696192c687f2853e42b7c1e0d3ef002081fd (patch)
tree9eef082af7f3286781134226bfc98ec401d41e79 /drivers/scsi/qla4xxx
parent4e7aba73f9f6e9fe6d3fa10d3fd63cd4882ba3d0 (diff)
[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 = {
106 .param_mask = ISCSI_CONN_PORT | ISCSI_CONN_ADDRESS | 106 .param_mask = ISCSI_CONN_PORT | ISCSI_CONN_ADDRESS |
107 ISCSI_TARGET_NAME | ISCSI_TPGT, 107 ISCSI_TARGET_NAME | ISCSI_TPGT,
108 .host_param_mask = ISCSI_HOST_HWADDRESS | 108 .host_param_mask = ISCSI_HOST_HWADDRESS |
109 ISCSI_HOST_IPADDRESS |
109 ISCSI_HOST_INITIATOR_NAME, 110 ISCSI_HOST_INITIATOR_NAME,
110 .sessiondata_size = sizeof(struct ddb_entry), 111 .sessiondata_size = sizeof(struct ddb_entry),
111 .host_template = &qla4xxx_driver_template, 112 .host_template = &qla4xxx_driver_template,
@@ -192,8 +193,13 @@ static int qla4xxx_host_get_param(struct Scsi_Host *shost,
192 case ISCSI_HOST_PARAM_HWADDRESS: 193 case ISCSI_HOST_PARAM_HWADDRESS:
193 len = format_addr(buf, ha->my_mac, MAC_ADDR_LEN); 194 len = format_addr(buf, ha->my_mac, MAC_ADDR_LEN);
194 break; 195 break;
196 case ISCSI_HOST_PARAM_IPADDRESS:
197 len = sprintf(buf, "%d.%d.%d.%d\n", ha->ip_address[0],
198 ha->ip_address[1], ha->ip_address[2],
199 ha->ip_address[3]);
200 break;
195 case ISCSI_HOST_PARAM_INITIATOR_NAME: 201 case ISCSI_HOST_PARAM_INITIATOR_NAME:
196 len = sprintf(buf, ha->name_string); 202 len = sprintf(buf, "%s\n", ha->name_string);
197 break; 203 break;
198 default: 204 default:
199 return -ENOSYS; 205 return -ENOSYS;