[PATCH] aacraid: Fix for controller load based timeouts

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>

authored by Mark Haverkamp and committed by Linus Torvalds 43f2f3d3 2757a71c

+3 -6
+1 -5
drivers/scsi/aacraid/aacraid.h
··· 15 15 #define AAC_MAX_LUN (8) 16 16 17 17 #define AAC_MAX_HOSTPHYSMEMPAGES (0xfffff) 18 - /* 19 - * max_sectors is an unsigned short, otherwise limit is 0x100000000 / 512 20 - * Linux has starvation problems if we permit larger than 4MB I/O ... 21 - */ 22 - #define AAC_MAX_32BIT_SGBCOUNT ((unsigned short)8192) 18 + #define AAC_MAX_32BIT_SGBCOUNT ((unsigned short)512) 23 19 24 20 /* 25 21 * These macros convert from physical channels to virtual channels
+2 -1
drivers/scsi/aacraid/linit.c
··· 374 374 else 375 375 scsi_adjust_queue_depth(sdev, 0, 1); 376 376 377 - if (host->max_sectors < AAC_MAX_32BIT_SGBCOUNT) 377 + if (!(((struct aac_dev *)host->hostdata)->adapter_info.options 378 + & AAC_OPT_NEW_COMM)) 378 379 blk_queue_max_segment_size(sdev->request_queue, 65536); 379 380 380 381 return 0;