aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--drivers/scsi/3w-9xxx.c24
-rw-r--r--drivers/scsi/3w-9xxx.h9
-rw-r--r--drivers/scsi/3w-xxxx.c23
-rw-r--r--drivers/scsi/3w-xxxx.h8
4 files changed, 44 insertions, 20 deletions
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index e9788f55ab13..1bb774becf25 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -1,10 +1,11 @@
1/* 1/*
2 3w-9xxx.c -- 3ware 9000 Storage Controller device driver for Linux. 2 3w-9xxx.c -- 3ware 9000 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: Tom Couch <linuxraid@amcc.com> 5 Modifications By: Tom Couch <linuxraid@lsi.com>
6 6
7 Copyright (C) 2004-2009 Applied Micro Circuits Corporation. 7 Copyright (C) 2004-2009 Applied Micro Circuits Corporation.
8 Copyright (C) 2010 LSI Corporation.
8 9
9 This program is free software; you can redistribute it and/or modify 10 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 11 it under the terms of the GNU General Public License as published by
@@ -40,10 +41,10 @@
40 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 41 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
41 42
42 Bugs/Comments/Suggestions should be mailed to: 43 Bugs/Comments/Suggestions should be mailed to:
43 linuxraid@amcc.com 44 linuxraid@lsi.com
44 45
45 For more information, goto: 46 For more information, goto:
46 http://www.amcc.com 47 http://www.lsi.com
47 48
48 Note: This version of the driver does not contain a bundled firmware 49 Note: This version of the driver does not contain a bundled firmware
49 image. 50 image.
@@ -77,6 +78,7 @@
77 Use pci_resource_len() for ioremap(). 78 Use pci_resource_len() for ioremap().
78 2.26.02.012 - Add power management support. 79 2.26.02.012 - Add power management support.
79 2.26.02.013 - Fix bug in twa_load_sgl(). 80 2.26.02.013 - Fix bug in twa_load_sgl().
81 2.26.02.014 - Force 60 second timeout default.
80*/ 82*/
81 83
82#include <linux/module.h> 84#include <linux/module.h>
@@ -102,14 +104,14 @@
102#include "3w-9xxx.h" 104#include "3w-9xxx.h"
103 105
104/* Globals */ 106/* Globals */
105#define TW_DRIVER_VERSION "2.26.02.013" 107#define TW_DRIVER_VERSION "2.26.02.014"
106static TW_Device_Extension *twa_device_extension_list[TW_MAX_SLOT]; 108static TW_Device_Extension *twa_device_extension_list[TW_MAX_SLOT];
107static unsigned int twa_device_extension_count; 109static unsigned int twa_device_extension_count;
108static int twa_major = -1; 110static int twa_major = -1;
109extern struct timezone sys_tz; 111extern struct timezone sys_tz;
110 112
111/* Module parameters */ 113/* Module parameters */
112MODULE_AUTHOR ("AMCC"); 114MODULE_AUTHOR ("LSI");
113MODULE_DESCRIPTION ("3ware 9000 Storage Controller Linux Driver"); 115MODULE_DESCRIPTION ("3ware 9000 Storage Controller Linux Driver");
114MODULE_LICENSE("GPL"); 116MODULE_LICENSE("GPL");
115MODULE_VERSION(TW_DRIVER_VERSION); 117MODULE_VERSION(TW_DRIVER_VERSION);
@@ -1990,6 +1992,15 @@ static void twa_unmap_scsi_data(TW_Device_Extension *tw_dev, int request_id)
1990 scsi_dma_unmap(cmd); 1992 scsi_dma_unmap(cmd);
1991} /* End twa_unmap_scsi_data() */ 1993} /* End twa_unmap_scsi_data() */
1992 1994
1995/* This function gets called when a disk is coming on-line */
1996static int twa_slave_configure(struct scsi_device *sdev)
1997{
1998 /* Force 60 second timeout */
1999 blk_queue_rq_timeout(sdev->request_queue, 60 * HZ);
2000
2001 return 0;
2002} /* End twa_slave_configure() */
2003
1993/* scsi_host_template initializer */ 2004/* scsi_host_template initializer */
1994static struct scsi_host_template driver_template = { 2005static struct scsi_host_template driver_template = {
1995 .module = THIS_MODULE, 2006 .module = THIS_MODULE,
@@ -1999,6 +2010,7 @@ static struct scsi_host_template driver_template = {
1999 .bios_param = twa_scsi_biosparam, 2010 .bios_param = twa_scsi_biosparam,
2000 .change_queue_depth = twa_change_queue_depth, 2011 .change_queue_depth = twa_change_queue_depth,
2001 .can_queue = TW_Q_LENGTH-2, 2012 .can_queue = TW_Q_LENGTH-2,
2013 .slave_configure = twa_slave_configure,
2002 .this_id = -1, 2014 .this_id = -1,
2003 .sg_tablesize = TW_APACHE_MAX_SGL_LENGTH, 2015 .sg_tablesize = TW_APACHE_MAX_SGL_LENGTH,
2004 .max_sectors = TW_MAX_SECTORS, 2016 .max_sectors = TW_MAX_SECTORS,
diff --git a/drivers/scsi/3w-9xxx.h b/drivers/scsi/3w-9xxx.h
index 2893eec78ed2..3343824855d0 100644
--- a/drivers/scsi/3w-9xxx.h
+++ b/drivers/scsi/3w-9xxx.h
@@ -1,10 +1,11 @@
1/* 1/*
2 3w-9xxx.h -- 3ware 9000 Storage Controller device driver for Linux. 2 3w-9xxx.h -- 3ware 9000 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: Tom Couch <linuxraid@amcc.com> 5 Modifications By: Tom Couch <linuxraid@lsi.com>
6 6
7 Copyright (C) 2004-2009 Applied Micro Circuits Corporation. 7 Copyright (C) 2004-2009 Applied Micro Circuits Corporation.
8 Copyright (C) 2010 LSI Corporation.
8 9
9 This program is free software; you can redistribute it and/or modify 10 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 11 it under the terms of the GNU General Public License as published by
@@ -40,10 +41,10 @@
40 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 41 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
41 42
42 Bugs/Comments/Suggestions should be mailed to: 43 Bugs/Comments/Suggestions should be mailed to:
43 linuxraid@amcc.com 44 linuxraid@lsi.com
44 45
45 For more information, goto: 46 For more information, goto:
46 http://www.amcc.com 47 http://www.lsi.com
47*/ 48*/
48 49
49#ifndef _3W_9XXX_H 50#ifndef _3W_9XXX_H
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,
diff --git a/drivers/scsi/3w-xxxx.h b/drivers/scsi/3w-xxxx.h
index a5a2ba2561d9..8b9f9d17e7fe 100644
--- a/drivers/scsi/3w-xxxx.h
+++ b/drivers/scsi/3w-xxxx.h
@@ -1,12 +1,12 @@
1/* 1/*
2 3w-xxxx.h -- 3ware Storage Controller device driver for Linux. 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 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 compatiblity By: Andre Hedrick <andre@suse.com> 11 Kernel compatiblity 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>
@@ -45,10 +45,10 @@
45 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 45 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
46 46
47 Bugs/Comments/Suggestions should be mailed to: 47 Bugs/Comments/Suggestions should be mailed to:
48 linuxraid@amcc.com 48 linuxraid@lsi.com
49 49
50 For more information, goto: 50 For more information, goto:
51 http://www.amcc.com 51 http://www.lsi.com
52*/ 52*/
53 53
54#ifndef _3W_XXXX_H 54#ifndef _3W_XXXX_H