]> err.no Git - linux-2.6/commitdiff
[SCSI] zfcp: initialize scsi_host_template.max_sectors with appropriate value
authorSwen Schillig <swen@vnet.ibm.com>
Thu, 12 Oct 2006 09:43:44 +0000 (11:43 +0200)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Wed, 25 Oct 2006 22:12:50 +0000 (15:12 -0700)
Define ZFCP_MAX_SECTORS and initialize scsi_host_template.max_sectors
with appropriate value.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/s390/scsi/zfcp_def.h
drivers/s390/scsi/zfcp_scsi.c

index 8f882690994d9944a947edfbdac794b2a4017680..74c0eac083e46a19d5026c385350268b6fa39047 100644 (file)
@@ -107,6 +107,10 @@ zfcp_address_to_sg(void *address, struct scatterlist *list)
        (ZFCP_MAX_SBALS_PER_REQ * ZFCP_MAX_SBALES_PER_SBAL - 2)
         /* request ID + QTCB in SBALE 0 + 1 of first SBAL in chain */
 
+#define ZFCP_MAX_SECTORS (ZFCP_MAX_SBALES_PER_REQ * 8)
+        /* max. number of (data buffer) SBALEs in largest SBAL chain
+           multiplied with number of sectors per 4k block */
+
 /* FIXME(tune): free space should be one max. SBAL chain plus what? */
 #define ZFCP_QDIO_PCI_INTERVAL         (QDIO_MAX_BUFFERS_PER_Q \
                                          - (ZFCP_MAX_SBALS_PER_REQ + 4))
index 4d2bc7981324b4fc5abe939fbcca0f26895e0c91..452d96f92a1482a5611a79e5712a2c53f04d31ad 100644 (file)
@@ -58,6 +58,7 @@ struct zfcp_data zfcp_data = {
                .cmd_per_lun            = 1,
                .use_clustering         = 1,
                .sdev_attrs             = zfcp_sysfs_sdev_attrs,
+               .max_sectors            = ZFCP_MAX_SECTORS,
        },
        .driver_version = ZFCP_VERSION,
 };