Skip to content

Commit

Permalink
[SCSI] bnx2i: Adjust sq_size module parametr to power of 2 only if a …
Browse files Browse the repository at this point in the history
…non-zero value is specified

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>
  • Loading branch information
Anil Veerabhadrappa authored and James Bottomley committed Dec 10, 2009
1 parent 5d9e1fa commit f8c9abe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/bnx2i/bnx2i_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f8c9abe

Please sign in to comment.