diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ipr.c | 40 |
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 | **/ | ||
4665 | enum 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 | |||
4688 | static struct scsi_transport_template ipr_transport_template = { | ||
4689 | .eh_timed_out = ipr_scsi_timed_out | ||
4690 | }; | ||
4691 | |||
4692 | static struct scsi_host_template driver_template = { | 4661 | static 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 | ||