aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/3w-xxxx.c
diff options
context:
space:
mode:
authoradam radford <aradford@gmail.com>2010-03-08 15:37:46 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-04-11 10:23:25 -0400
commit4deedd845a322b3d356d80c87e2d9fcf50aa04be (patch)
tree99623190d969267bfa3634be11b5fe01b104ca9e /drivers/scsi/3w-xxxx.c
parentbc0beb44f27dc068c1daefc79826c07e0b22ef6c (diff)
[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>
Diffstat (limited to 'drivers/scsi/3w-xxxx.c')
-rw-r--r--drivers/scsi/3w-xxxx.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index 5faf903ca8c8..d119a614bf7d 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -1,12 +1,12 @@
1/* 1/*
2 3w-xxxx.c -- 3ware Storage Controller device driver for Linux. 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 Modifications By: Joel Jacobson <linux@3ware.com> 5 Modifications By: Joel Jacobson <linux@3ware.com>
6 Arnaldo Carvalho de Melo <acme@conectiva.com.br> 6 Arnaldo Carvalho de Melo <acme@conectiva.com.br>
7 Brad Strand <linux@3ware.com> 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 Kernel compatibility By: Andre Hedrick <andre@suse.com> 11 Kernel compatibility By: Andre Hedrick <andre@suse.com>
12 Non-Copyright (C) 2000 Andre Hedrick <andre@suse.com> 12 Non-Copyright (C) 2000 Andre Hedrick <andre@suse.com>
@@ -47,10 +47,10 @@
47 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 47 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
48 48
49 Bugs/Comments/Suggestions should be mailed to: 49 Bugs/Comments/Suggestions should be mailed to:
50 linuxraid@amcc.com 50 linuxraid@lsi.com
51 51
52 For more information, goto: 52 For more information, goto:
53 http://www.amcc.com 53 http://www.lsi.com
54 54
55 History 55 History
56 ------- 56 -------
@@ -194,6 +194,7 @@
194 1.26.02.002 - Free irq handler in __tw_shutdown(). 194 1.26.02.002 - Free irq handler in __tw_shutdown().
195 Turn on RCD bit for caching mode page. 195 Turn on RCD bit for caching mode page.
196 Serialize reset code. 196 Serialize reset code.
197 1.26.02.003 - Force 60 second timeout default.
197*/ 198*/
198 199
199#include <linux/module.h> 200#include <linux/module.h>
@@ -219,13 +220,13 @@
219#include "3w-xxxx.h" 220#include "3w-xxxx.h"
220 221
221/* Globals */ 222/* Globals */
222#define TW_DRIVER_VERSION "1.26.02.002" 223#define TW_DRIVER_VERSION "1.26.02.003"
223static TW_Device_Extension *tw_device_extension_list[TW_MAX_SLOT]; 224static TW_Device_Extension *tw_device_extension_list[TW_MAX_SLOT];
224static int tw_device_extension_count = 0; 225static int tw_device_extension_count = 0;
225static int twe_major = -1; 226static int twe_major = -1;
226 227
227/* Module parameters */ 228/* Module parameters */
228MODULE_AUTHOR("AMCC"); 229MODULE_AUTHOR("LSI");
229MODULE_DESCRIPTION("3ware Storage Controller Linux Driver"); 230MODULE_DESCRIPTION("3ware Storage Controller Linux Driver");
230MODULE_LICENSE("GPL"); 231MODULE_LICENSE("GPL");
231MODULE_VERSION(TW_DRIVER_VERSION); 232MODULE_VERSION(TW_DRIVER_VERSION);
@@ -2245,6 +2246,15 @@ static void tw_shutdown(struct pci_dev *pdev)
2245 __tw_shutdown(tw_dev); 2246 __tw_shutdown(tw_dev);
2246} /* End tw_shutdown() */ 2247} /* End tw_shutdown() */
2247 2248
2249/* This function gets called when a disk is coming online */
2250static int tw_slave_configure(struct scsi_device *sdev)
2251{
2252 /* Force 60 second timeout */
2253 blk_queue_rq_timeout(sdev->request_queue, 60 * HZ);
2254
2255 return 0;
2256} /* End tw_slave_configure() */
2257
2248static struct scsi_host_template driver_template = { 2258static struct scsi_host_template driver_template = {
2249 .module = THIS_MODULE, 2259 .module = THIS_MODULE,
2250 .name = "3ware Storage Controller", 2260 .name = "3ware Storage Controller",
@@ -2253,6 +2263,7 @@ static struct scsi_host_template driver_template = {
2253 .bios_param = tw_scsi_biosparam, 2263 .bios_param = tw_scsi_biosparam,
2254 .change_queue_depth = tw_change_queue_depth, 2264 .change_queue_depth = tw_change_queue_depth,
2255 .can_queue = TW_Q_LENGTH-2, 2265 .can_queue = TW_Q_LENGTH-2,
2266 .slave_configure = tw_slave_configure,
2256 .this_id = -1, 2267 .this_id = -1,
2257 .sg_tablesize = TW_MAX_SGL_LENGTH, 2268 .sg_tablesize = TW_MAX_SGL_LENGTH,
2258 .max_sectors = TW_MAX_SECTORS, 2269 .max_sectors = TW_MAX_SECTORS,