86 lines
2.7 KiB
Diff
86 lines
2.7 KiB
Diff
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>
|
|
|
|
---
|
|
drivers/scsi/ibmvscsi/ibmvscsi.c | 16 +++++++++-------
|
|
1 file changed, 9 insertions(+), 7 deletions(-)
|
|
|
|
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
|
|
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
|
|
@@ -97,10 +97,12 @@ static int max_requests = IBMVSCSI_MAX_R
|
|
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;
|
|
|
|
-#define IBMVSCSI_VERSION "1.5.8"
|
|
+#define IBMVSCSI_VERSION "1.5.9"
|
|
|
|
static struct ibmvscsi_ops *ibmvscsi_ops;
|
|
|
|
@@ -1706,7 +1708,7 @@ static ssize_t show_host_srp_version(str
|
|
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;
|
|
}
|
|
@@ -1727,7 +1729,7 @@ static ssize_t show_host_partition_name(
|
|
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;
|
|
}
|
|
@@ -1748,7 +1750,7 @@ static ssize_t show_host_partition_numbe
|
|
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;
|
|
}
|
|
@@ -1768,7 +1770,7 @@ static ssize_t show_host_mad_version(str
|
|
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;
|
|
}
|
|
@@ -1788,7 +1790,7 @@ static ssize_t show_host_os_type(struct
|
|
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;
|
|
}
|
|
|
|
@@ -1807,7 +1809,7 @@ static ssize_t show_host_config(struct d
|
|
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;
|