* [PATCH] imbvscsi: use 4k buffer to transfer config data
@ 2006-12-09 2:51 Linda Xie
2006-12-09 0:14 ` Randy Dunlap
0 siblings, 1 reply; 2+ messages in thread
From: Linda Xie @ 2006-12-09 2:51 UTC (permalink / raw)
To: linux-scsi, James.Bottomley; +Cc: Dave C Boutcher, Santiago Leon
[-- Attachment #1: Type: text/plain, Size: 245 bytes --]
Hi James,
This patch changes the size of the buffer used for transfering config
data to 4K. It was tested against
2.6.19-rc2 tree.
Please consider it for inclusion in upstream.
Thanks,
Linda Xie
IBM LTC
Signed-off-by: lxie@us.ibm.com
[-- Attachment #2: ibmvscsi_config.patch --]
[-- Type: text/plain, Size: 2260 bytes --]
--- linux-2.6.17.ppc64/drivers/scsi/ibmvscsi/ibmvscsi.c 2006-09-28 15:03:54.000000000 -0500
+++ linux-2.6.17.ppc64-linda/drivers/scsi/ibmvscsi/ibmvscsi.c 2006-09-28 15:00:56.000000000 -0500
@@ -86,8 +86,10 @@ static int max_id = 64;
static int max_channel = 3;
static int init_timeout = 5;
static int max_requests = 50;
+/* host data buffer size */
+#define buff_size 4096
-#define IBMVSCSI_VERSION "1.5.8"
+#define IBMVSCSI_VERSION "1.5.9"
MODULE_DESCRIPTION("IBM Virtual SCSI");
MODULE_AUTHOR("Dave Boutcher");
@@ -1347,7 +1349,7 @@ static ssize_t show_host_srp_version(str
(struct ibmvscsi_host_data *)shost->hostdata;
int len;
- len = snprintf(buf, PAGE_SIZE, "%s\n",
+ len = snprintf(buf, buff_size, "%s\n",
hostdata->madapter_info.srp_version);
return len;
}
@@ -1368,7 +1370,7 @@ static ssize_t show_host_partition_name(
(struct ibmvscsi_host_data *)shost->hostdata;
int len;
- len = snprintf(buf, PAGE_SIZE, "%s\n",
+ len = snprintf(buf, buff_size, "%s\n",
hostdata->madapter_info.partition_name);
return len;
}
@@ -1389,7 +1391,7 @@ static ssize_t show_host_partition_numbe
(struct ibmvscsi_host_data *)shost->hostdata;
int len;
- len = snprintf(buf, PAGE_SIZE, "%d\n",
+ len = snprintf(buf, buff_size, "%d\n",
hostdata->madapter_info.partition_number);
return len;
}
@@ -1409,7 +1411,7 @@ static ssize_t show_host_mad_version(str
(struct ibmvscsi_host_data *)shost->hostdata;
int len;
- len = snprintf(buf, PAGE_SIZE, "%d\n",
+ len = snprintf(buf, buff_size, "%d\n",
hostdata->madapter_info.mad_version);
return len;
}
@@ -1429,7 +1431,7 @@ static ssize_t show_host_os_type(struct
(struct ibmvscsi_host_data *)shost->hostdata;
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;
}
@@ -1448,7 +1450,7 @@ static ssize_t show_host_config(struct c
(struct ibmvscsi_host_data *)shost->hostdata;
/* 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;
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] imbvscsi: use 4k buffer to transfer config data
2006-12-09 2:51 [PATCH] imbvscsi: use 4k buffer to transfer config data Linda Xie
@ 2006-12-09 0:14 ` Randy Dunlap
0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2006-12-09 0:14 UTC (permalink / raw)
To: lxiep; +Cc: linux-scsi, James.Bottomley, Dave C Boutcher, Santiago Leon
On Fri, 08 Dec 2006 20:51:37 -0600 Linda Xie wrote:
> Hi James,
>
> This patch changes the size of the buffer used for transfering config
> data to 4K. It was tested against
> 2.6.19-rc2 tree.
>
> Please consider it for inclusion in upstream.
+/* host data buffer size */
+#define buff_size 4096
from Documentation/CodingStyle:
<quote>
Names of macros defining constants and labels in enums are capitalized.
#define CONSTANT 0x12345
Enums are preferred when defining several related constants.
CAPITALIZED macro names are appreciated but macros resembling functions
may be named in lower case.
</quote>
I conclude that it should be BUFF_SIZE.
---
~Randy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-12-09 0:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-09 2:51 [PATCH] imbvscsi: use 4k buffer to transfer config data Linda Xie
2006-12-09 0:14 ` Randy Dunlap
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.