]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.fixes/scsi-ibmvscsi-show-config.patch
Updated xen patches taken from suse.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / scsi-ibmvscsi-show-config.patch
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
4
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.
7
8 Signed-off-by: lxie@us.ibm.com
9 Signed-off-by: Olaf Hering <olh@suse.de>
10
11 ---
12 drivers/scsi/ibmvscsi/ibmvscsi.c | 16 +++++++++-------
13 1 file changed, 9 insertions(+), 7 deletions(-)
14
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
23
24 static struct scsi_transport_template *ibmvscsi_transport_template;
25
26 -#define IBMVSCSI_VERSION "1.5.8"
27 +#define IBMVSCSI_VERSION "1.5.9"
28
29 static struct ibmvscsi_ops *ibmvscsi_ops;
30
31 @@ -1476,7 +1478,7 @@ static ssize_t show_host_srp_version(str
32 struct ibmvscsi_host_data *hostdata = shost_priv(shost);
33 int len;
34
35 - len = snprintf(buf, PAGE_SIZE, "%s\n",
36 + len = snprintf(buf, buff_size, "%s\n",
37 hostdata->madapter_info.srp_version);
38 return len;
39 }
40 @@ -1497,7 +1499,7 @@ static ssize_t show_host_partition_name(
41 struct ibmvscsi_host_data *hostdata = shost_priv(shost);
42 int len;
43
44 - len = snprintf(buf, PAGE_SIZE, "%s\n",
45 + len = snprintf(buf, buff_size, "%s\n",
46 hostdata->madapter_info.partition_name);
47 return len;
48 }
49 @@ -1518,7 +1520,7 @@ static ssize_t show_host_partition_numbe
50 struct ibmvscsi_host_data *hostdata = shost_priv(shost);
51 int len;
52
53 - len = snprintf(buf, PAGE_SIZE, "%d\n",
54 + len = snprintf(buf, buff_size, "%d\n",
55 hostdata->madapter_info.partition_number);
56 return len;
57 }
58 @@ -1538,7 +1540,7 @@ static ssize_t show_host_mad_version(str
59 struct ibmvscsi_host_data *hostdata = shost_priv(shost);
60 int len;
61
62 - len = snprintf(buf, PAGE_SIZE, "%d\n",
63 + len = snprintf(buf, buff_size, "%d\n",
64 hostdata->madapter_info.mad_version);
65 return len;
66 }
67 @@ -1558,7 +1560,7 @@ static ssize_t show_host_os_type(struct
68 struct ibmvscsi_host_data *hostdata = shost_priv(shost);
69 int len;
70
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);
73 return len;
74 }
75
76 @@ -1577,7 +1579,7 @@ static ssize_t show_host_config(struct d
77 struct ibmvscsi_host_data *hostdata = shost_priv(shost);
78
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)
82 return strlen(buf);
83 else
84 return 0;