aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/3w-9xxx.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-9xxx.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-9xxx.c')
-rw-r--r--drivers/scsi/3w-9xxx.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index e9788f55ab1..1bb774becf2 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,