[SCSI] bnx2i: Adjust sq_size module parametr to power of 2 only if a non-zero value...
authorAnil Veerabhadrappa <anilgv@broadcom.com>
Mon, 7 Dec 2009 19:39:54 +0000 (11:39 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Thu, 10 Dec 2009 15:45:56 +0000 (09:45 -0600)
This issue was discovered during 10G iscsi testing

Default value of 'sq_size' module parameter is '0' which means driver
should use predefined SQ queue size when setting up iscsi connection.

roundup_pow_of_two(0) results in '1' and forces driver to setup
connections with send queue size of '1' and results in lower
performance as well

Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/bnx2i/bnx2i_init.c

index 1dba86c931e0c4c03730352ee5bcdcc8dbbb0e23..0307f85b4e2eff84824515e9a33033798e41e4e7 100644 (file)
@@ -367,7 +367,7 @@ static int __init bnx2i_mod_init(void)
 
        printk(KERN_INFO "%s", version);
 
-       if (!is_power_of_2(sq_size))
+       if (sq_size && !is_power_of_2(sq_size))
                sq_size = roundup_pow_of_two(sq_size);
 
        mutex_init(&bnx2i_dev_lock);