]> err.no Git - linux-2.6/commitdiff
[SCSI] aacraid: Fix default FIB size
authorMark Haverkamp <markh@osdl.org>
Wed, 11 Jan 2006 17:28:07 +0000 (09:28 -0800)
committerJames Bottomley <jejb@mulgrave.(none)>
Thu, 12 Jan 2006 17:54:29 +0000 (11:54 -0600)
Received from Mark Salyzyn.

If the adapter has not instructed us otherwise that it can handle a
'large' FIB, then it can handle at most a 2KB FIB.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/aacraid/commctrl.c

index ef623bd965f52fade74db0e16e8a7a61f29610f8..4fe79cd7c957664bf8a686b18d46fe490b131d7a 100644 (file)
@@ -85,6 +85,10 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg)
        if (size < le16_to_cpu(kfib->header.SenderSize))
                size = le16_to_cpu(kfib->header.SenderSize);
        if (size > dev->max_fib_size) {
+               if (size > 2048) {
+                       retval = -EINVAL;
+                       goto cleanup;
+               }
                /* Highjack the hw_fib */
                hw_fib = fibptr->hw_fib;
                hw_fib_pa = fibptr->hw_fib_pa;