[SCSI] wd33c93: cleanups
[safe/jmp/linux-2.6] / drivers / scsi / qla4xxx / ql4_os.c
index 7502bb4..e69160a 100644 (file)
@@ -102,9 +102,12 @@ static struct scsi_host_template qla4xxx_driver_template = {
 static struct iscsi_transport qla4xxx_iscsi_transport = {
        .owner                  = THIS_MODULE,
        .name                   = DRIVER_NAME,
+       .caps                   = CAP_FW_DB | CAP_SENDTARGETS_OFFLOAD |
+                                 CAP_DATA_PATH_OFFLOAD,
        .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,
@@ -191,8 +194,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;