aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2006-01-17 08:43:14 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2006-01-31 15:39:54 -0500
commitd66c7a0f46ce53f1252e03fe372e39dc2dfff1ea (patch)
treeab84b802bd3b438f4b87aebb02b72aa195016d10 /drivers/message/fusion
parent432b4c8b443af1b60cef7fcf90e8179cd8924f0a (diff)
[SCSI] fusion: setting timeouts in eh threads appropiatley for fc/sas/spi
On Mon, Jan 16, 2006 at 06:53:13PM -0700, Moore, Eric wrote: > The task managment request timeout in the eh threads was set > for U320 timing, which is between 2-5 seconds. > This is too small for FC and SAS. > According to the firmware engineers, Fibre needs to be 40 seconds > and SAS needs to be 10 seconds. The timeout selection should probably be done in a little helper instead of duplicated in a few places. Updated patch below. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion')
-rw-r--r--drivers/message/fusion/mptscsih.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index aa9cde807632..05832a8c5f0b 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -1718,6 +1718,20 @@ mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun
1718 return retval; 1718 return retval;
1719} 1719}
1720 1720
1721static int
1722mptscsih_get_tm_timeout(MPT_ADAPTER *ioc)
1723{
1724 switch (ioc->bus_type) {
1725 case FC:
1726 return 40;
1727 case SAS:
1728 return 10;
1729 case SPI:
1730 default:
1731 return 2;
1732 }
1733}
1734
1721/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 1735/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
1722/** 1736/**
1723 * mptscsih_abort - Abort linux scsi_cmnd routine, new_eh variant 1737 * mptscsih_abort - Abort linux scsi_cmnd routine, new_eh variant
@@ -1789,7 +1803,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
1789 vdev = SCpnt->device->hostdata; 1803 vdev = SCpnt->device->hostdata;
1790 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK, 1804 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK,
1791 vdev->bus_id, vdev->target_id, vdev->lun, 1805 vdev->bus_id, vdev->target_id, vdev->lun,
1792 ctx2abort, 2 /* 2 second timeout */); 1806 ctx2abort, mptscsih_get_tm_timeout(ioc));
1793 1807
1794 printk (KERN_WARNING MYNAM ": %s: task abort: %s (sc=%p)\n", 1808 printk (KERN_WARNING MYNAM ": %s: task abort: %s (sc=%p)\n",
1795 hd->ioc->name, 1809 hd->ioc->name,
@@ -1840,7 +1854,7 @@ mptscsih_dev_reset(struct scsi_cmnd * SCpnt)
1840 vdev = SCpnt->device->hostdata; 1854 vdev = SCpnt->device->hostdata;
1841 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 1855 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET,
1842 vdev->bus_id, vdev->target_id, 1856 vdev->bus_id, vdev->target_id,
1843 0, 0, 5 /* 5 second timeout */); 1857 0, 0, mptscsih_get_tm_timeout(hd->ioc));
1844 1858
1845 printk (KERN_WARNING MYNAM ": %s: target reset: %s (sc=%p)\n", 1859 printk (KERN_WARNING MYNAM ": %s: target reset: %s (sc=%p)\n",
1846 hd->ioc->name, 1860 hd->ioc->name,
@@ -1890,7 +1904,7 @@ mptscsih_bus_reset(struct scsi_cmnd * SCpnt)
1890 1904
1891 vdev = SCpnt->device->hostdata; 1905 vdev = SCpnt->device->hostdata;
1892 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS, 1906 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS,
1893 vdev->bus_id, 0, 0, 0, 5 /* 5 second timeout */); 1907 vdev->bus_id, 0, 0, 0, mptscsih_get_tm_timeout(hd->ioc));
1894 1908
1895 printk (KERN_WARNING MYNAM ": %s: bus reset: %s (sc=%p)\n", 1909 printk (KERN_WARNING MYNAM ": %s: bus reset: %s (sc=%p)\n",
1896 hd->ioc->name, 1910 hd->ioc->name,