diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-02 22:01:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-02 22:01:32 -0400 |
commit | 3151367f8778a1789d6f6e6f6c642681b6cd6d64 (patch) | |
tree | 1869d5429a25abd994ae94079808b8db060ec6f3 /drivers/scsi/isci/host.c | |
parent | 16642a2e7be23bbda013fc32d8f6c68982eab603 (diff) | |
parent | fe709ed827d370e6b0c0a9f9456da1c22bdcd118 (diff) |
Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull first round of SCSI updates from James Bottomley:
"This is a large set of updates, mostly for drivers (qla2xxx [including
support for new 83xx based card], qla4xxx, mpt2sas, bfa, zfcp, hpsa,
be2iscsi, isci, lpfc, ipr, ibmvfc, ibmvscsi, megaraid_sas).
There's also a rework for tape adding virtually unlimited numbers of
tape drives plus a set of dif fixes for sd and a fix for a live lock
on hot remove of SCSI devices.
This round includes a signed tag pull of isci-for-3.6
Signed-off-by: James Bottomley <JBottomley@Parallels.com>"
Fix up trivial conflict in drivers/scsi/qla2xxx/qla_nx.c due to new PCI
helper function use in a function that was removed by this pull.
* tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (198 commits)
[SCSI] st: remove st_mutex
[SCSI] sd: Ensure we correctly disable devices with unknown protection type
[SCSI] hpsa: gen8plus Smart Array IDs
[SCSI] qla4xxx: Update driver version to 5.03.00-k1
[SCSI] qla4xxx: Disable generating pause frames for ISP83XX
[SCSI] qla4xxx: Fix double clearing of risc_intr for ISP83XX
[SCSI] qla4xxx: IDC implementation for Loopback
[SCSI] qla4xxx: update copyrights in LICENSE.qla4xxx
[SCSI] qla4xxx: Fix panic while rmmod
[SCSI] qla4xxx: Fail probe_adapter if IRQ allocation fails
[SCSI] qla4xxx: Prevent MSI/MSI-X falling back to INTx for ISP82XX
[SCSI] qla4xxx: Update idc reg in case of PCI AER
[SCSI] qla4xxx: Fix double IDC locking in qla4_8xxx_error_recovery
[SCSI] qla4xxx: Clear interrupt while unloading driver for ISP83XX
[SCSI] qla4xxx: Print correct IDC version
[SCSI] qla4xxx: Added new mbox cmd to pass driver version to FW
[SCSI] scsi_dh_alua: Enable STPG for unavailable ports
[SCSI] scsi_remove_target: fix softlockup regression on hot remove
[SCSI] ibmvscsi: Fix host config length field overflow
[SCSI] ibmvscsi: Remove backend abstraction
...
Diffstat (limited to 'drivers/scsi/isci/host.c')
-rw-r--r-- | drivers/scsi/isci/host.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c index b334fdc1726a..609dafd661d1 100644 --- a/drivers/scsi/isci/host.c +++ b/drivers/scsi/isci/host.c | |||
@@ -1044,7 +1044,7 @@ static enum sci_status sci_controller_start(struct isci_host *ihost, | |||
1044 | return SCI_SUCCESS; | 1044 | return SCI_SUCCESS; |
1045 | } | 1045 | } |
1046 | 1046 | ||
1047 | void isci_host_scan_start(struct Scsi_Host *shost) | 1047 | void isci_host_start(struct Scsi_Host *shost) |
1048 | { | 1048 | { |
1049 | struct isci_host *ihost = SHOST_TO_SAS_HA(shost)->lldd_ha; | 1049 | struct isci_host *ihost = SHOST_TO_SAS_HA(shost)->lldd_ha; |
1050 | unsigned long tmo = sci_controller_get_suggested_start_timeout(ihost); | 1050 | unsigned long tmo = sci_controller_get_suggested_start_timeout(ihost); |
@@ -1079,7 +1079,6 @@ static void sci_controller_completion_handler(struct isci_host *ihost) | |||
1079 | 1079 | ||
1080 | void ireq_done(struct isci_host *ihost, struct isci_request *ireq, struct sas_task *task) | 1080 | void ireq_done(struct isci_host *ihost, struct isci_request *ireq, struct sas_task *task) |
1081 | { | 1081 | { |
1082 | task->lldd_task = NULL; | ||
1083 | if (!test_bit(IREQ_ABORT_PATH_ACTIVE, &ireq->flags) && | 1082 | if (!test_bit(IREQ_ABORT_PATH_ACTIVE, &ireq->flags) && |
1084 | !(task->task_state_flags & SAS_TASK_STATE_ABORTED)) { | 1083 | !(task->task_state_flags & SAS_TASK_STATE_ABORTED)) { |
1085 | if (test_bit(IREQ_COMPLETE_IN_TARGET, &ireq->flags)) { | 1084 | if (test_bit(IREQ_COMPLETE_IN_TARGET, &ireq->flags)) { |
@@ -1087,16 +1086,19 @@ void ireq_done(struct isci_host *ihost, struct isci_request *ireq, struct sas_ta | |||
1087 | dev_dbg(&ihost->pdev->dev, | 1086 | dev_dbg(&ihost->pdev->dev, |
1088 | "%s: Normal - ireq/task = %p/%p\n", | 1087 | "%s: Normal - ireq/task = %p/%p\n", |
1089 | __func__, ireq, task); | 1088 | __func__, ireq, task); |
1090 | 1089 | task->lldd_task = NULL; | |
1091 | task->task_done(task); | 1090 | task->task_done(task); |
1092 | } else { | 1091 | } else { |
1093 | dev_dbg(&ihost->pdev->dev, | 1092 | dev_dbg(&ihost->pdev->dev, |
1094 | "%s: Error - ireq/task = %p/%p\n", | 1093 | "%s: Error - ireq/task = %p/%p\n", |
1095 | __func__, ireq, task); | 1094 | __func__, ireq, task); |
1096 | 1095 | if (sas_protocol_ata(task->task_proto)) | |
1096 | task->lldd_task = NULL; | ||
1097 | sas_task_abort(task); | 1097 | sas_task_abort(task); |
1098 | } | 1098 | } |
1099 | } | 1099 | } else |
1100 | task->lldd_task = NULL; | ||
1101 | |||
1100 | if (test_and_clear_bit(IREQ_ABORT_PATH_ACTIVE, &ireq->flags)) | 1102 | if (test_and_clear_bit(IREQ_ABORT_PATH_ACTIVE, &ireq->flags)) |
1101 | wake_up_all(&ihost->eventq); | 1103 | wake_up_all(&ihost->eventq); |
1102 | 1104 | ||
@@ -1120,10 +1122,16 @@ void isci_host_completion_routine(unsigned long data) | |||
1120 | sci_controller_completion_handler(ihost); | 1122 | sci_controller_completion_handler(ihost); |
1121 | spin_unlock_irq(&ihost->scic_lock); | 1123 | spin_unlock_irq(&ihost->scic_lock); |
1122 | 1124 | ||
1123 | /* the coalesence timeout doubles at each encoding step, so | 1125 | /* |
1126 | * we subtract SCI_MAX_PORTS to account for the number of dummy TCs | ||
1127 | * issued for hardware issue workaround | ||
1128 | */ | ||
1129 | active = isci_tci_active(ihost) - SCI_MAX_PORTS; | ||
1130 | |||
1131 | /* | ||
1132 | * the coalesence timeout doubles at each encoding step, so | ||
1124 | * update it based on the ilog2 value of the outstanding requests | 1133 | * update it based on the ilog2 value of the outstanding requests |
1125 | */ | 1134 | */ |
1126 | active = isci_tci_active(ihost); | ||
1127 | writel(SMU_ICC_GEN_VAL(NUMBER, active) | | 1135 | writel(SMU_ICC_GEN_VAL(NUMBER, active) | |
1128 | SMU_ICC_GEN_VAL(TIMER, ISCI_COALESCE_BASE + ilog2(active)), | 1136 | SMU_ICC_GEN_VAL(TIMER, ISCI_COALESCE_BASE + ilog2(active)), |
1129 | &ihost->smu_registers->interrupt_coalesce_control); | 1137 | &ihost->smu_registers->interrupt_coalesce_control); |
@@ -1973,7 +1981,7 @@ static void sci_controller_afe_initialization(struct isci_host *ihost) | |||
1973 | } | 1981 | } |
1974 | 1982 | ||
1975 | for (phy_id = 0; phy_id < SCI_MAX_PHYS; phy_id++) { | 1983 | for (phy_id = 0; phy_id < SCI_MAX_PHYS; phy_id++) { |
1976 | struct scu_afe_transceiver *xcvr = &afe->scu_afe_xcvr[phy_id]; | 1984 | struct scu_afe_transceiver __iomem *xcvr = &afe->scu_afe_xcvr[phy_id]; |
1977 | const struct sci_phy_oem_params *oem_phy = &oem->phys[phy_id]; | 1985 | const struct sci_phy_oem_params *oem_phy = &oem->phys[phy_id]; |
1978 | int cable_length_long = | 1986 | int cable_length_long = |
1979 | is_long_cable(phy_id, cable_selection_mask); | 1987 | is_long_cable(phy_id, cable_selection_mask); |