]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] aacraid: Fix for controller load based timeouts
authorMark Haverkamp <markh@osdl.org>
Tue, 2 Aug 2005 04:11:37 +0000 (21:11 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 2 Aug 2005 04:37:59 +0000 (21:37 -0700)
Martin Drab found that he could get aacraid timeouts with high load on his
controller / disk drive combinations.  After some experimentation Mark
Salyzyn has come up with a patch to reduce the default max_sectors to
something that will keep the controller from being overloaded and will
eliminate the timeout issues.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Acked-by: Mark Salyzyn <mark_salyzyn@adaptec.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/scsi/aacraid/aacraid.h
drivers/scsi/aacraid/linit.c

index 3a11a536c0dab39e351f8db5e969f1e6c72220c8..4ab07861b457fd80c1af736cb17dd633119228e6 100644 (file)
 #define AAC_MAX_LUN            (8)
 
 #define AAC_MAX_HOSTPHYSMEMPAGES (0xfffff)
-/*
- *  max_sectors is an unsigned short, otherwise limit is 0x100000000 / 512
- * Linux has starvation problems if we permit larger than 4MB I/O ...
- */
-#define AAC_MAX_32BIT_SGBCOUNT ((unsigned short)8192)
+#define AAC_MAX_32BIT_SGBCOUNT ((unsigned short)512)
 
 /*
  * These macros convert from physical channels to virtual channels
index c1a4f978fcbad1156f9badd33af44f122e2bf5ed..562da90480a1426346ceba19efe54108e4043826 100644 (file)
@@ -374,7 +374,8 @@ static int aac_slave_configure(struct scsi_device *sdev)
        else
                scsi_adjust_queue_depth(sdev, 0, 1);
 
-       if (host->max_sectors < AAC_MAX_32BIT_SGBCOUNT)
+       if (!(((struct aac_dev *)host->hostdata)->adapter_info.options
+         & AAC_OPT_NEW_COMM))
                blk_queue_max_segment_size(sdev->request_queue, 65536);
 
        return 0;