1 Subject: /sys/class/scsi_host/hostX/config doesn't show any information
2 From: Linda Xie <lxiep@us.ibm.com>
3 References: 439970 - LTC49349
5 This patch changes the size of the buffer used for transfering config
6 data to 4K. It was tested against 2.6.19-rc2 tree.
8 Signed-off-by: lxie@us.ibm.com
9 Signed-off-by: Olaf Hering <olh@suse.de>
12 drivers/scsi/ibmvscsi/ibmvscsi.c | 16 +++++++++-------
13 1 file changed, 9 insertions(+), 7 deletions(-)
15 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c
16 +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
17 @@ -89,10 +89,12 @@ static int max_id = 64;
18 static int max_channel = 3;
19 static int init_timeout = 5;
20 static int max_requests = IBMVSCSI_MAX_REQUESTS_DEFAULT;
21 +/*host data buffer size*/
22 +#define buff_size 4096
24 static struct scsi_transport_template *ibmvscsi_transport_template;
26 -#define IBMVSCSI_VERSION "1.5.8"
27 +#define IBMVSCSI_VERSION "1.5.9"
29 static struct ibmvscsi_ops *ibmvscsi_ops;
31 @@ -1476,7 +1478,7 @@ static ssize_t show_host_srp_version(str
32 struct ibmvscsi_host_data *hostdata = shost_priv(shost);
35 - len = snprintf(buf, PAGE_SIZE, "%s\n",
36 + len = snprintf(buf, buff_size, "%s\n",
37 hostdata->madapter_info.srp_version);
40 @@ -1497,7 +1499,7 @@ static ssize_t show_host_partition_name(
41 struct ibmvscsi_host_data *hostdata = shost_priv(shost);
44 - len = snprintf(buf, PAGE_SIZE, "%s\n",
45 + len = snprintf(buf, buff_size, "%s\n",
46 hostdata->madapter_info.partition_name);
49 @@ -1518,7 +1520,7 @@ static ssize_t show_host_partition_numbe
50 struct ibmvscsi_host_data *hostdata = shost_priv(shost);
53 - len = snprintf(buf, PAGE_SIZE, "%d\n",
54 + len = snprintf(buf, buff_size, "%d\n",
55 hostdata->madapter_info.partition_number);
58 @@ -1538,7 +1540,7 @@ static ssize_t show_host_mad_version(str
59 struct ibmvscsi_host_data *hostdata = shost_priv(shost);
62 - len = snprintf(buf, PAGE_SIZE, "%d\n",
63 + len = snprintf(buf, buff_size, "%d\n",
64 hostdata->madapter_info.mad_version);
67 @@ -1558,7 +1560,7 @@ static ssize_t show_host_os_type(struct
68 struct ibmvscsi_host_data *hostdata = shost_priv(shost);
71 - len = snprintf(buf, PAGE_SIZE, "%d\n", hostdata->madapter_info.os_type);
72 + len = snprintf(buf, buff_size, "%d\n", hostdata->madapter_info.os_type);
76 @@ -1577,7 +1579,7 @@ static ssize_t show_host_config(struct d
77 struct ibmvscsi_host_data *hostdata = shost_priv(shost);
79 /* returns null-terminated host config data */
80 - if (ibmvscsi_do_host_config(hostdata, buf, PAGE_SIZE) == 0)
81 + if (ibmvscsi_do_host_config(hostdata, buf, buff_size) == 0)