aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBrian King <brking@us.ibm.com>2006-11-21 11:28:23 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-11-22 13:21:03 -0500
commit7402ecef94f416dcf03af7435c404a4079683d96 (patch)
tree7a5b3d410ab6199c1d6fbb062b87a731381847e3 /drivers
parentefbbdd846d41221396c094ff6df35246bdcf889e (diff)
[SCSI] ipr: Remove ipr_scsi_timed_out
Remove ipr's usage of the scsi transport eh_timed_out for handling SATA timeouts. This was only needed in order to set some flags on the qc prior to calling ata_do_eh. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/ipr.c40
1 files changed, 4 insertions, 36 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index f1e01b6ff7c0..e32c3f8848ba 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -79,7 +79,6 @@
79#include <scsi/scsi_tcq.h> 79#include <scsi/scsi_tcq.h>
80#include <scsi/scsi_eh.h> 80#include <scsi/scsi_eh.h>
81#include <scsi/scsi_cmnd.h> 81#include <scsi/scsi_cmnd.h>
82#include <scsi/scsi_transport.h>
83#include "ipr.h" 82#include "ipr.h"
84 83
85/* 84/*
@@ -3643,6 +3642,10 @@ static int __ipr_eh_dev_reset(struct scsi_cmnd * scsi_cmd)
3643 if (ipr_cmd->ioarcb.res_handle == res->cfgte.res_handle) { 3642 if (ipr_cmd->ioarcb.res_handle == res->cfgte.res_handle) {
3644 if (ipr_cmd->scsi_cmd) 3643 if (ipr_cmd->scsi_cmd)
3645 ipr_cmd->done = ipr_scsi_eh_done; 3644 ipr_cmd->done = ipr_scsi_eh_done;
3645 if (ipr_cmd->qc && !(ipr_cmd->qc->flags & ATA_QCFLAG_FAILED)) {
3646 ipr_cmd->qc->err_mask |= AC_ERR_TIMEOUT;
3647 ipr_cmd->qc->flags |= ATA_QCFLAG_FAILED;
3648 }
3646 } 3649 }
3647 } 3650 }
3648 3651
@@ -4655,40 +4658,6 @@ static const char * ipr_ioa_info(struct Scsi_Host *host)
4655 return buffer; 4658 return buffer;
4656} 4659}
4657 4660
4658/**
4659 * ipr_scsi_timed_out - Handle scsi command timeout
4660 * @scsi_cmd: scsi command struct
4661 *
4662 * Return value:
4663 * EH_NOT_HANDLED
4664 **/
4665enum scsi_eh_timer_return ipr_scsi_timed_out(struct scsi_cmnd *scsi_cmd)
4666{
4667 struct ipr_ioa_cfg *ioa_cfg;
4668 struct ipr_cmnd *ipr_cmd;
4669 unsigned long flags;
4670
4671 ENTER;
4672 spin_lock_irqsave(scsi_cmd->device->host->host_lock, flags);
4673 ioa_cfg = (struct ipr_ioa_cfg *)scsi_cmd->device->host->hostdata;
4674
4675 list_for_each_entry(ipr_cmd, &ioa_cfg->pending_q, queue) {
4676 if (ipr_cmd->qc && ipr_cmd->qc->scsicmd == scsi_cmd) {
4677 ipr_cmd->qc->err_mask |= AC_ERR_TIMEOUT;
4678 ipr_cmd->qc->flags |= ATA_QCFLAG_FAILED;
4679 break;
4680 }
4681 }
4682
4683 spin_unlock_irqrestore(scsi_cmd->device->host->host_lock, flags);
4684 LEAVE;
4685 return EH_NOT_HANDLED;
4686}
4687
4688static struct scsi_transport_template ipr_transport_template = {
4689 .eh_timed_out = ipr_scsi_timed_out
4690};
4691
4692static struct scsi_host_template driver_template = { 4661static struct scsi_host_template driver_template = {
4693 .module = THIS_MODULE, 4662 .module = THIS_MODULE,
4694 .name = "IPR", 4663 .name = "IPR",
@@ -7030,7 +6999,6 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev,
7030 6999
7031 ioa_cfg = (struct ipr_ioa_cfg *)host->hostdata; 7000 ioa_cfg = (struct ipr_ioa_cfg *)host->hostdata;
7032 memset(ioa_cfg, 0, sizeof(struct ipr_ioa_cfg)); 7001 memset(ioa_cfg, 0, sizeof(struct ipr_ioa_cfg));
7033 host->transportt = &ipr_transport_template;
7034 ata_host_init(&ioa_cfg->ata_host, &pdev->dev, 7002 ata_host_init(&ioa_cfg->ata_host, &pdev->dev,
7035 sata_port_info.flags, &ipr_sata_ops); 7003 sata_port_info.flags, &ipr_sata_ops);
7036 7004