[PATCH] imbvscsi: use 4k buffer to transfer config data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx



--- 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;

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux