3ware force 60 second timeout
adam radford
maintainerPATCH 1/1 3ware force 60 second timeout
James/linux-scsi,
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.
-Adam
Note: This patch is included in-line below and also as an attachment.
diff -Naur linux-2.6.33-git15/drivers/scsi/3w-9xxx.c linux-2.6.33-git16/drivers/scsi/3w-9xxx.c
--- linux-2.6.33-git15/drivers/scsi/3w-9xxx.c 2010-02-24
10:52:17.000000000 -0800
+++ linux-2.6.33-git16/drivers/scsi/3w-9xxx.c 2010-03-08
11:30:08.000000000 -0800
@@ -1,10 +1,11 @@
/*
3w-9xxx.c -- 3ware 9000 Storage Controller device driver for Linux.
- Written By: Adam Radford <[email protected]> - Modifications By: Tom Couch <[email protected]> + Written By: Adam Radford <[email protected]> + Modifications By: Tom Couch <[email protected]>
Copyright (C) 2004-2009 Applied Micro Circuits Corporation.
+ Copyright (C) 2010 LSI Corporation.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
@@ -40,10 +41,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Bugs/Comments/Suggestions should be mailed to:
- [email protected]
+ [email protected]
For more information, goto:
- http://www.amcc.com
+ http://www.lsi.com
Note: This version of the driver does not contain a bundled firmware
image.
@@ -77,6 +78,7 @@
Use pci_resource_len() for ioremap().
2.26.02.012 - Add power management support.
2.26.02.013 - Fix bug in twa_load_sgl().+ 2.26.02.014 - Force 60 second timeout default.
*/
#include <linux/module.h>
@@ -101,14 +103,14 @@
#include "3w-9xxx.h"
/* Globals */
-#define TW_DRIVER_VERSION "2.26.02.013"
+#define TW_DRIVER_VERSION "2.26.02.014"
static TW_Device_Extension *twa_device_extension_list[TW_MAX_SLOT]; static unsigned int twa_device_extension_count;
static int twa_major = -1;
extern struct timezone sys_tz;
/* Module parameters */
-MODULE_AUTHOR ("AMCC");
+MODULE_AUTHOR ("LSI");
MODULE_DESCRIPTION ("3ware 9000 Storage Controller Linux Driver"); MODULE_LICENSE("GPL"); MODULE_VERSION(TW_DRIVER_VERSION);
@@ -1989,6 +1991,15 @@
scsi_dma_unmap(cmd);
} /* End twa_unmap_scsi_data() */
+/* This function gets called when a disk is coming on-line */ +static int twa_slave_configure(struct scsi_device *sdev)
+{
+ /* Force 60 second timeout */
+ blk_queue_rq_timeout(sdev->request_queue, 60 * HZ);
+
+ return 0;
+} /* End twa_slave_configure() */
+
/* scsi_host_template initializer */
static struct scsi_host_template driver_template = {
.module = THIS_MODULE,
@@ -1998,6 +2009,7 @@
.bios_param = twa_scsi_biosparam,
.change_queue_depth = twa_change_queue_depth,
.can_queue = TW_Q_LENGTH-2,
+ .slave_configure = twa_slave_configure,
.this_id = -1,
.sg_tablesize = TW_APACHE_MAX_SGL_LENGTH,
.max_sectors = TW_MAX_SECTORS,
diff -Naur linux-2.6.33-git15/drivers/scsi/3w-9xxx.h linux-2.6.33-git16/drivers/scsi/3w-9xxx.h
--- linux-2.6.33-git15/drivers/scsi/3w-9xxx.h 2010-02-24
10:52:17.000000000 -0800
+++ linux-2.6.33-git16/drivers/scsi/3w-9xxx.h 2010-03-08
11:30:09.000000000 -0800
@@ -1,10 +1,11 @@
/*
3w-9xxx.h -- 3ware 9000 Storage Controller device driver for Linux.
- Written By: Adam Radford <[email protected]> - Modifications By: Tom Couch <[email protected]> + Written By: Adam Radford <[email protected]> + Modifications By: Tom Couch <[email protected]>
Copyright (C) 2004-2009 Applied Micro Circuits Corporation.
+ Copyright (C) 2010 LSI Corporation.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
@@ -40,10 +41,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Bugs/Comments/Suggestions should be mailed to:
- [email protected]
+ [email protected]
For more information, goto:
- http://www.amcc.com
+ http://www.lsi.com
*/
#ifndef _3W_9XXX_H
diff -Naur linux-2.6.33-git15/drivers/scsi/3w-xxxx.c linux-2.6.33-git16/drivers/scsi/3w-xxxx.c
--- linux-2.6.33-git15/drivers/scsi/3w-xxxx.c 2010-02-24
10:52:17.000000000 -0800
+++ linux-2.6.33-git16/drivers/scsi/3w-xxxx.c 2010-03-08
11:30:18.000000000 -0800
@@ -1,12 +1,12 @@
/*
3w-xxxx.c -- 3ware Storage Controller device driver for Linux.
- Written By: Adam Radford <[email protected]>
+ Written By: Adam Radford <[email protected]>
Modifications By: Joel Jacobson <[email protected]>
Arnaldo Carvalho de Melo <[email protected]>
Brad Strand <[email protected]>
- Copyright (C) 1999-2009 3ware Inc.
+ Copyright (C) 1999-2010 3ware Inc.
Kernel compatibility By: Andre Hedrick <[email protected]>
Non-Copyright (C) 2000 Andre Hedrick <[email protected]>
@@ -47,10 +47,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Bugs/Comments/Suggestions should be mailed to:
- [email protected]
+ [email protected]
For more information, goto:
- http://www.amcc.com
+ http://www.lsi.com
History
-------@@ -194,6 +194,7 @@
1.26.02.002 - Free irq handler in __tw_shutdown().
Turn on RCD bit for caching mode page. Serialize reset code.
+ 1.26.02.003 - Force 60 second timeout default.
*/
#include <linux/module.h>
@@ -218,13 +219,13 @@
#include "3w-xxxx.h"
/* Globals */
-#define TW_DRIVER_VERSION "1.26.02.002"
+#define TW_DRIVER_VERSION "1.26.02.003"
static TW_Device_Extension *tw_device_extension_list[TW_MAX_SLOT]; static int tw_device_extension_count = 0;
static int twe_major = -1;
/* Module parameters */
-MODULE_AUTHOR("AMCC");
+MODULE_AUTHOR("LSI");
MODULE_DESCRIPTION("3ware Storage Controller Linux Driver"); MODULE_LICENSE("GPL"); MODULE_VERSION(TW_DRIVER_VERSION);
@@ -2244,6 +2245,15 @@
__tw_shutdown(tw_dev);
} /* End tw_shutdown() */
+/* This function gets called when a disk is coming online */ +static int tw_slave_configure(struct scsi_device *sdev) +{
+ /* Force 60 second timeout */
+ blk_queue_rq_timeout(sdev->request_queue, 60 * HZ);
+
+ return 0;
+} /* End tw_slave_configure() */
+
static struct scsi_host_template driver_template = {
.module = THIS_MODULE,
.name = "3ware Storage Controller",
@@ -2252,6 +2262,7 @@
.bios_param = tw_scsi_biosparam,
.change_queue_depth = tw_change_queue_depth,
.can_queue = TW_Q_LENGTH-2,
+ .slave_configure = tw_slave_configure,
.this_id = -1,
.sg_tablesize = TW_MAX_SGL_LENGTH,
.max_sectors = TW_MAX_SECTORS,
diff -Naur linux-2.6.33-git15/drivers/scsi/3w-xxxx.h linux-2.6.33-git16/drivers/scsi/3w-xxxx.h
--- linux-2.6.33-git15/drivers/scsi/3w-xxxx.h 2010-02-24
10:52:17.000000000 -0800
+++ linux-2.6.33-git16/drivers/scsi/3w-xxxx.h 2010-03-08
11:30:21.000000000 -0800
@@ -1,12 +1,12 @@
/*
3w-xxxx.h -- 3ware Storage Controller device driver for Linux.
- Written By: Adam Radford <[email protected]>
+ Written By: Adam Radford <[email protected]>
Modifications By: Joel Jacobson <[email protected]>
Arnaldo Carvalho de Melo <[email protected]>
Brad Strand <[email protected]>
- Copyright (C) 1999-2009 3ware Inc.
+ Copyright (C) 1999-2010 3ware Inc.
Kernel compatiblity By: Andre Hedrick <[email protected]>
Non-Copyright (C) 2000 Andre Hedrick <[email protected]>
@@ -45,10 +45,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Bugs/Comments/Suggestions should be mailed to:
- [email protected]
+ [email protected]
For more information, goto:
- http://www.amcc.com
+ http://www.lsi.com
*/
#ifndef _3W_XXXX_H
drivers/scsi/3w-9xxx.c +18 -6
@@ -1,10 +1,11 @@/* 3w-9xxx.c -- 3ware 9000 Storage Controller device driver for Linux. -Written By: Adam Radford <[email protected]> -Modifications By: Tom Couch <[email protected]> +Written By: Adam Radford <[email protected]> +Modifications By: Tom Couch <[email protected]> Copyright (C) 2004-2009 Applied Micro Circuits Corporation. +Copyright (C) 2010 LSI Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
@@ -40,10 +41,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Bugs/Comments/Suggestions should be mailed to: - [email protected] + [email protected] For more information, goto: - http://www.amcc.com + http://www.lsi.com Note: This version of the driver does not contain a bundled firmware image.
@@ -77,6 +78,7 @@Use pci_resource_len() for ioremap(). 2.26.02.012 - Add power management support. 2.26.02.013 - Fix bug in twa_load_sgl(). +2.26.02.014 - Force 60 second timeout default. */ #include <linux/module.h>
@@ -101,14 +103,14 @@#include "3w-9xxx.h" /* Globals */ -#define TW_DRIVER_VERSION "2.26.02.013" +#define TW_DRIVER_VERSION "2.26.02.014"static TW_Device_Extension *twa_device_extension_list[TW_MAX_SLOT ];static unsigned int twa_device_extension_count;static int twa_major =-1 ;extern struct timezone sys_tz;/* Module parameters */ -MODULE_AUTHOR ("AMCC" ); +MODULE_AUTHOR ("LSI" );MODULE_DESCRIPTION ("3ware 9000 Storage Controller Linux Driver" );MODULE_LICENSE ("GPL" );MODULE_VERSION (TW_DRIVER_VERSION );
@@ -1989,6 +1991,15 @@scsi_dma_unmap (cmd); }/* End twa_unmap_scsi_data() */ +/* This function gets called when a disk is coming on-line */ +static int twa_slave_configure (struct scsi_device *sdev) +{ +/* Force 60 second timeout */ +blk_queue_rq_timeout (sdev->request_queue,60 *HZ ); + +return 0 ; +}/* End twa_slave_configure() */ +/* scsi_host_template initializer */ static struct scsi_host_template driver_template = { .module =THIS_MODULE ,
@@ -1998,6 +2009,7 @@ .bios_param = twa_scsi_biosparam, .change_queue_depth = twa_change_queue_depth, .can_queue = TW_Q_LENGTH-2, + .slave_configure = twa_slave_configure, .this_id = -1, .sg_tablesize = TW_APACHE_MAX_SGL_LENGTH, .max_sectors = TW_MAX_SECTORS,
drivers/scsi/3w-9xxx.h +5 -4
@@ -1,10 +1,11 @@/* 3w-9xxx.h -- 3ware 9000 Storage Controller device driver for Linux. -Written By: Adam Radford <[email protected]> -Modifications By: Tom Couch <[email protected]> +Written By: Adam Radford <[email protected]> +Modifications By: Tom Couch <[email protected]> Copyright (C) 2004-2009 Applied Micro Circuits Corporation. +Copyright (C) 2010 LSI Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
@@ -40,10 +41,10 @@Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Bugs/Comments/Suggestions should be mailed to: -[email protected] +[email protected] For more information, goto: -http://www.amcc.com +http://www.lsi.com */ #ifndef _3W_9XXX_H
drivers/scsi/3w-xxxx.c +17 -6
@@ -1,12 +1,12 @@/* 3w-xxxx.c -- 3ware Storage Controller device driver for Linux. -Written By: Adam Radford <[email protected]> +Written By: Adam Radford <[email protected]> Modifications By: Joel Jacobson <[email protected]> Arnaldo Carvalho de Melo <[email protected]> Brad Strand <[email protected]> -Copyright (C) 1999-2009 3ware Inc. +Copyright (C) 1999-2010 3ware Inc. Kernel compatibility By: Andre Hedrick <[email protected]> Non-Copyright (C) 2000 Andre Hedrick <[email protected]>
@@ -47,10 +47,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Bugs/Comments/Suggestions should be mailed to: - [email protected] + [email protected] For more information, goto: - http://www.amcc.com + http://www.lsi.com History -------
@@ -194,6 +194,7 @@1.26.02.002 - Free irq handler in __tw_shutdown(). Turn on RCD bit for caching mode page. Serialize reset code. +1.26.02.003 - Force 60 second timeout default. */ #include <linux/module.h>
@@ -218,13 +219,13 @@#include "3w-xxxx.h" /* Globals */ -#define TW_DRIVER_VERSION "1.26.02.002" +#define TW_DRIVER_VERSION "1.26.02.003"static TW_Device_Extension *tw_device_extension_list[TW_MAX_SLOT ];static int tw_device_extension_count =0 ;static int twe_major =-1 ;/* Module parameters */ -MODULE_AUTHOR ("AMCC" ); +MODULE_AUTHOR ("LSI" );MODULE_DESCRIPTION ("3ware Storage Controller Linux Driver" );MODULE_LICENSE ("GPL" );MODULE_VERSION (TW_DRIVER_VERSION );
@@ -2244,6 +2245,15 @@__tw_shutdown (tw_dev); }/* End tw_shutdown() */ +/* This function gets called when a disk is coming online */ +static int tw_slave_configure (struct scsi_device *sdev) +{ +/* Force 60 second timeout */ +blk_queue_rq_timeout (sdev->request_queue,60 *HZ ); + +return 0 ; +}/* End tw_slave_configure() */ +static struct scsi_host_template driver_template = { .module =THIS_MODULE , .name ="3ware Storage Controller" ,
@@ -2252,6 +2262,7 @@ .bios_param = tw_scsi_biosparam, .change_queue_depth = tw_change_queue_depth, .can_queue = TW_Q_LENGTH-2, + .slave_configure = tw_slave_configure, .this_id = -1, .sg_tablesize = TW_MAX_SGL_LENGTH, .max_sectors = TW_MAX_SECTORS,
drivers/scsi/3w-xxxx.h +4 -4
@@ -1,12 +1,12 @@/* 3w-xxxx.h -- 3ware Storage Controller device driver for Linux. - Written By: Adam Radford <[email protected]> +Written By: Adam Radford <[email protected]> Modifications By: Joel Jacobson <[email protected]> Arnaldo Carvalho de Melo <[email protected]> Brad Strand <[email protected]> -Copyright (C) 1999-2009 3ware Inc. +Copyright (C) 1999-2010 3ware Inc. Kernel compatiblity By: Andre Hedrick <[email protected]> Non-Copyright (C) 2000 Andre Hedrick <[email protected]>
@@ -45,10 +45,10 @@Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Bugs/Comments/Suggestions should be mailed to: -[email protected] +[email protected] For more information, goto: -http://www.amcc.com +http://www.lsi.com */ #ifndef _3W_XXXX_H