Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] 3w-xxxx, 3w-9xxx: force 60 second timeout

This small patch forces 60 second timeouts for the older 3w-xxxx &
3w-9xxx drivers for systems that don't contain the udev rule for
setting scsi timeouts to 60 seconds.

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>

authored by

adam radford and committed by
James Bottomley
4deedd84 bc0beb44

+44 -20
+18 -6
drivers/scsi/3w-9xxx.c
··· 1 1 /* 2 2 3w-9xxx.c -- 3ware 9000 Storage Controller device driver for Linux. 3 3 4 - Written By: Adam Radford <linuxraid@amcc.com> 5 - Modifications By: Tom Couch <linuxraid@amcc.com> 4 + Written By: Adam Radford <linuxraid@lsi.com> 5 + Modifications By: Tom Couch <linuxraid@lsi.com> 6 6 7 7 Copyright (C) 2004-2009 Applied Micro Circuits Corporation. 8 + Copyright (C) 2010 LSI Corporation. 8 9 9 10 This program is free software; you can redistribute it and/or modify 10 11 it under the terms of the GNU General Public License as published by ··· 41 40 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 42 41 43 42 Bugs/Comments/Suggestions should be mailed to: 44 - linuxraid@amcc.com 43 + linuxraid@lsi.com 45 44 46 45 For more information, goto: 47 - http://www.amcc.com 46 + http://www.lsi.com 48 47 49 48 Note: This version of the driver does not contain a bundled firmware 50 49 image. ··· 78 77 Use pci_resource_len() for ioremap(). 79 78 2.26.02.012 - Add power management support. 80 79 2.26.02.013 - Fix bug in twa_load_sgl(). 80 + 2.26.02.014 - Force 60 second timeout default. 81 81 */ 82 82 83 83 #include <linux/module.h> ··· 104 102 #include "3w-9xxx.h" 105 103 106 104 /* Globals */ 107 - #define TW_DRIVER_VERSION "2.26.02.013" 105 + #define TW_DRIVER_VERSION "2.26.02.014" 108 106 static TW_Device_Extension *twa_device_extension_list[TW_MAX_SLOT]; 109 107 static unsigned int twa_device_extension_count; 110 108 static int twa_major = -1; 111 109 extern struct timezone sys_tz; 112 110 113 111 /* Module parameters */ 114 - MODULE_AUTHOR ("AMCC"); 112 + MODULE_AUTHOR ("LSI"); 115 113 MODULE_DESCRIPTION ("3ware 9000 Storage Controller Linux Driver"); 116 114 MODULE_LICENSE("GPL"); 117 115 MODULE_VERSION(TW_DRIVER_VERSION); ··· 1992 1990 scsi_dma_unmap(cmd); 1993 1991 } /* End twa_unmap_scsi_data() */ 1994 1992 1993 + /* This function gets called when a disk is coming on-line */ 1994 + static int twa_slave_configure(struct scsi_device *sdev) 1995 + { 1996 + /* Force 60 second timeout */ 1997 + blk_queue_rq_timeout(sdev->request_queue, 60 * HZ); 1998 + 1999 + return 0; 2000 + } /* End twa_slave_configure() */ 2001 + 1995 2002 /* scsi_host_template initializer */ 1996 2003 static struct scsi_host_template driver_template = { 1997 2004 .module = THIS_MODULE, ··· 2010 1999 .bios_param = twa_scsi_biosparam, 2011 2000 .change_queue_depth = twa_change_queue_depth, 2012 2001 .can_queue = TW_Q_LENGTH-2, 2002 + .slave_configure = twa_slave_configure, 2013 2003 .this_id = -1, 2014 2004 .sg_tablesize = TW_APACHE_MAX_SGL_LENGTH, 2015 2005 .max_sectors = TW_MAX_SECTORS,
+5 -4
drivers/scsi/3w-9xxx.h
··· 1 1 /* 2 2 3w-9xxx.h -- 3ware 9000 Storage Controller device driver for Linux. 3 3 4 - Written By: Adam Radford <linuxraid@amcc.com> 5 - Modifications By: Tom Couch <linuxraid@amcc.com> 4 + Written By: Adam Radford <linuxraid@lsi.com> 5 + Modifications By: Tom Couch <linuxraid@lsi.com> 6 6 7 7 Copyright (C) 2004-2009 Applied Micro Circuits Corporation. 8 + Copyright (C) 2010 LSI Corporation. 8 9 9 10 This program is free software; you can redistribute it and/or modify 10 11 it under the terms of the GNU General Public License as published by ··· 41 40 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 42 41 43 42 Bugs/Comments/Suggestions should be mailed to: 44 - linuxraid@amcc.com 43 + linuxraid@lsi.com 45 44 46 45 For more information, goto: 47 - http://www.amcc.com 46 + http://www.lsi.com 48 47 */ 49 48 50 49 #ifndef _3W_9XXX_H
+17 -6
drivers/scsi/3w-xxxx.c
··· 1 1 /* 2 2 3w-xxxx.c -- 3ware Storage Controller device driver for Linux. 3 3 4 - Written By: Adam Radford <linuxraid@amcc.com> 4 + Written By: Adam Radford <linuxraid@lsi.com> 5 5 Modifications By: Joel Jacobson <linux@3ware.com> 6 6 Arnaldo Carvalho de Melo <acme@conectiva.com.br> 7 7 Brad Strand <linux@3ware.com> 8 8 9 - Copyright (C) 1999-2009 3ware Inc. 9 + Copyright (C) 1999-2010 3ware Inc. 10 10 11 11 Kernel compatibility By: Andre Hedrick <andre@suse.com> 12 12 Non-Copyright (C) 2000 Andre Hedrick <andre@suse.com> ··· 47 47 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 48 48 49 49 Bugs/Comments/Suggestions should be mailed to: 50 - linuxraid@amcc.com 50 + linuxraid@lsi.com 51 51 52 52 For more information, goto: 53 - http://www.amcc.com 53 + http://www.lsi.com 54 54 55 55 History 56 56 ------- ··· 194 194 1.26.02.002 - Free irq handler in __tw_shutdown(). 195 195 Turn on RCD bit for caching mode page. 196 196 Serialize reset code. 197 + 1.26.02.003 - Force 60 second timeout default. 197 198 */ 198 199 199 200 #include <linux/module.h> ··· 220 219 #include "3w-xxxx.h" 221 220 222 221 /* Globals */ 223 - #define TW_DRIVER_VERSION "1.26.02.002" 222 + #define TW_DRIVER_VERSION "1.26.02.003" 224 223 static TW_Device_Extension *tw_device_extension_list[TW_MAX_SLOT]; 225 224 static int tw_device_extension_count = 0; 226 225 static int twe_major = -1; 227 226 228 227 /* Module parameters */ 229 - MODULE_AUTHOR("AMCC"); 228 + MODULE_AUTHOR("LSI"); 230 229 MODULE_DESCRIPTION("3ware Storage Controller Linux Driver"); 231 230 MODULE_LICENSE("GPL"); 232 231 MODULE_VERSION(TW_DRIVER_VERSION); ··· 2246 2245 __tw_shutdown(tw_dev); 2247 2246 } /* End tw_shutdown() */ 2248 2247 2248 + /* This function gets called when a disk is coming online */ 2249 + static int tw_slave_configure(struct scsi_device *sdev) 2250 + { 2251 + /* Force 60 second timeout */ 2252 + blk_queue_rq_timeout(sdev->request_queue, 60 * HZ); 2253 + 2254 + return 0; 2255 + } /* End tw_slave_configure() */ 2256 + 2249 2257 static struct scsi_host_template driver_template = { 2250 2258 .module = THIS_MODULE, 2251 2259 .name = "3ware Storage Controller", ··· 2263 2253 .bios_param = tw_scsi_biosparam, 2264 2254 .change_queue_depth = tw_change_queue_depth, 2265 2255 .can_queue = TW_Q_LENGTH-2, 2256 + .slave_configure = tw_slave_configure, 2266 2257 .this_id = -1, 2267 2258 .sg_tablesize = TW_MAX_SGL_LENGTH, 2268 2259 .max_sectors = TW_MAX_SECTORS,
+4 -4
drivers/scsi/3w-xxxx.h
··· 1 1 /* 2 2 3w-xxxx.h -- 3ware Storage Controller device driver for Linux. 3 3 4 - Written By: Adam Radford <linuxraid@amcc.com> 4 + Written By: Adam Radford <linuxraid@lsi.com> 5 5 Modifications By: Joel Jacobson <linux@3ware.com> 6 6 Arnaldo Carvalho de Melo <acme@conectiva.com.br> 7 7 Brad Strand <linux@3ware.com> 8 8 9 - Copyright (C) 1999-2009 3ware Inc. 9 + Copyright (C) 1999-2010 3ware Inc. 10 10 11 11 Kernel compatiblity By: Andre Hedrick <andre@suse.com> 12 12 Non-Copyright (C) 2000 Andre Hedrick <andre@suse.com> ··· 45 45 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 46 46 47 47 Bugs/Comments/Suggestions should be mailed to: 48 - linuxraid@amcc.com 48 + linuxraid@lsi.com 49 49 50 50 For more information, goto: 51 - http://www.amcc.com 51 + http://www.lsi.com 52 52 */ 53 53 54 54 #ifndef _3W_XXXX_H