]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.31/patches.fixes/scsi-ibmvscsi-show-config.patch
Move xen patchset to new version's subdir.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / scsi-ibmvscsi-show-config.patch
diff --git a/src/patches/suse-2.6.27.31/patches.fixes/scsi-ibmvscsi-show-config.patch b/src/patches/suse-2.6.27.31/patches.fixes/scsi-ibmvscsi-show-config.patch
new file mode 100644 (file)
index 0000000..cf52a78
--- /dev/null
@@ -0,0 +1,84 @@
+Subject: /sys/class/scsi_host/hostX/config doesn't show any information
+From: Linda Xie <lxiep@us.ibm.com>
+References: 439970 - LTC49349
+
+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
+@@ -89,10 +89,12 @@ static int max_id = 64;
+ static int max_channel = 3;
+ static int init_timeout = 5;
+ static int max_requests = IBMVSCSI_MAX_REQUESTS_DEFAULT;
++/*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;
+@@ -1476,7 +1478,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;
+ }
+@@ -1497,7 +1499,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;
+ }
+@@ -1518,7 +1520,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;
+ }
+@@ -1538,7 +1540,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;
+ }
+@@ -1558,7 +1560,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;
+ }
+@@ -1577,7 +1579,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;