2010-07-07 11:12:45 +00:00
|
|
|
Subject: /sys/class/scsi_host/hostX/config doesn't show any information
|
|
|
|
From: Linda Xie <lxiep@us.ibm.com>
|
|
|
|
References: 439970 - LTC49349
|
|
|
|
Patch-mainline: not yet
|
|
|
|
|
|
|
|
This patch changes the size of the buffer used for transfering config
|
|
|
|
data to 4K. It was tested against 2.6.19-rc2 tree.
|
|
|
|
|
|
|
|
Signed-off-by: lxie@us.ibm.com
|
|
|
|
Signed-off-by: Olaf Hering <olh@suse.de>
|
|
|
|
|
|
|
|
---
|
2011-04-19 20:09:59 +00:00
|
|
|
drivers/scsi/ibmvscsi/ibmvscsi.c | 14 ++++++++------
|
|
|
|
1 file changed, 8 insertions(+), 6 deletions(-)
|
2010-07-07 11:12:45 +00:00
|
|
|
|
|
|
|
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
|
|
|
|
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
|
2011-04-19 20:09:59 +00:00
|
|
|
@@ -99,6 +99,8 @@ static int max_requests = IBMVSCSI_MAX_R
|
2010-07-07 11:12:45 +00:00
|
|
|
static int max_events = IBMVSCSI_MAX_REQUESTS_DEFAULT + 2;
|
|
|
|
static int fast_fail = 1;
|
|
|
|
static int client_reserve = 1;
|
|
|
|
+/*host data buffer size*/
|
|
|
|
+#define buff_size 4096
|
|
|
|
|
|
|
|
static struct scsi_transport_template *ibmvscsi_transport_template;
|
|
|
|
|
2011-04-19 20:09:59 +00:00
|
|
|
@@ -1667,7 +1669,7 @@ static ssize_t show_host_srp_version(str
|
2010-07-07 11:12:45 +00:00
|
|
|
struct ibmvscsi_host_data *hostdata = shost_priv(shost);
|
|
|
|
int len;
|
|
|
|
|
|
|
|
- len = snprintf(buf, PAGE_SIZE, "%s\n",
|
|
|
|
+ len = snprintf(buf, buff_size, "%s\n",
|
|
|
|
hostdata->madapter_info.srp_version);
|
|
|
|
return len;
|
|
|
|
}
|
2011-04-19 20:09:59 +00:00
|
|
|
@@ -1688,7 +1690,7 @@ static ssize_t show_host_partition_name(
|
2010-07-07 11:12:45 +00:00
|
|
|
struct ibmvscsi_host_data *hostdata = shost_priv(shost);
|
|
|
|
int len;
|
|
|
|
|
|
|
|
- len = snprintf(buf, PAGE_SIZE, "%s\n",
|
|
|
|
+ len = snprintf(buf, buff_size, "%s\n",
|
|
|
|
hostdata->madapter_info.partition_name);
|
|
|
|
return len;
|
|
|
|
}
|
2011-04-19 20:09:59 +00:00
|
|
|
@@ -1709,7 +1711,7 @@ static ssize_t show_host_partition_numbe
|
2010-07-07 11:12:45 +00:00
|
|
|
struct ibmvscsi_host_data *hostdata = shost_priv(shost);
|
|
|
|
int len;
|
|
|
|
|
|
|
|
- len = snprintf(buf, PAGE_SIZE, "%d\n",
|
|
|
|
+ len = snprintf(buf, buff_size, "%d\n",
|
|
|
|
hostdata->madapter_info.partition_number);
|
|
|
|
return len;
|
|
|
|
}
|
2011-04-19 20:09:59 +00:00
|
|
|
@@ -1729,7 +1731,7 @@ static ssize_t show_host_mad_version(str
|
2010-07-07 11:12:45 +00:00
|
|
|
struct ibmvscsi_host_data *hostdata = shost_priv(shost);
|
|
|
|
int len;
|
|
|
|
|
|
|
|
- len = snprintf(buf, PAGE_SIZE, "%d\n",
|
|
|
|
+ len = snprintf(buf, buff_size, "%d\n",
|
|
|
|
hostdata->madapter_info.mad_version);
|
|
|
|
return len;
|
|
|
|
}
|
2011-04-19 20:09:59 +00:00
|
|
|
@@ -1749,7 +1751,7 @@ static ssize_t show_host_os_type(struct
|
2010-07-07 11:12:45 +00:00
|
|
|
struct ibmvscsi_host_data *hostdata = shost_priv(shost);
|
|
|
|
int len;
|
|
|
|
|
|
|
|
- len = snprintf(buf, PAGE_SIZE, "%d\n", hostdata->madapter_info.os_type);
|
|
|
|
+ len = snprintf(buf, buff_size, "%d\n", hostdata->madapter_info.os_type);
|
|
|
|
return len;
|
|
|
|
}
|
|
|
|
|
2011-04-19 20:09:59 +00:00
|
|
|
@@ -1768,7 +1770,7 @@ static ssize_t show_host_config(struct d
|
2010-07-07 11:12:45 +00:00
|
|
|
struct ibmvscsi_host_data *hostdata = shost_priv(shost);
|
|
|
|
|
|
|
|
/* returns null-terminated host config data */
|
|
|
|
- if (ibmvscsi_do_host_config(hostdata, buf, PAGE_SIZE) == 0)
|
|
|
|
+ if (ibmvscsi_do_host_config(hostdata, buf, buff_size) == 0)
|
|
|
|
return strlen(buf);
|
|
|
|
else
|
|
|
|
return 0;
|