aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/host.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/isci/host.c')
-rw-r--r--drivers/scsi/isci/host.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c
index 26072f1e9852..6981b773a88d 100644
--- a/drivers/scsi/isci/host.c
+++ b/drivers/scsi/isci/host.c
@@ -531,6 +531,9 @@ static void sci_controller_process_completions(struct isci_host *ihost)
531 break; 531 break;
532 532
533 case SCU_COMPLETION_TYPE_EVENT: 533 case SCU_COMPLETION_TYPE_EVENT:
534 sci_controller_event_completion(ihost, ent);
535 break;
536
534 case SCU_COMPLETION_TYPE_NOTIFY: { 537 case SCU_COMPLETION_TYPE_NOTIFY: {
535 event_cycle ^= ((event_get+1) & SCU_MAX_EVENTS) << 538 event_cycle ^= ((event_get+1) & SCU_MAX_EVENTS) <<
536 (SMU_COMPLETION_QUEUE_GET_EVENT_CYCLE_BIT_SHIFT - SCU_MAX_EVENTS_SHIFT); 539 (SMU_COMPLETION_QUEUE_GET_EVENT_CYCLE_BIT_SHIFT - SCU_MAX_EVENTS_SHIFT);
@@ -1091,6 +1094,7 @@ static void isci_host_completion_routine(unsigned long data)
1091 struct isci_request *request; 1094 struct isci_request *request;
1092 struct isci_request *next_request; 1095 struct isci_request *next_request;
1093 struct sas_task *task; 1096 struct sas_task *task;
1097 u16 active;
1094 1098
1095 INIT_LIST_HEAD(&completed_request_list); 1099 INIT_LIST_HEAD(&completed_request_list);
1096 INIT_LIST_HEAD(&errored_request_list); 1100 INIT_LIST_HEAD(&errored_request_list);
@@ -1181,6 +1185,13 @@ static void isci_host_completion_routine(unsigned long data)
1181 } 1185 }
1182 } 1186 }
1183 1187
1188 /* the coalesence timeout doubles at each encoding step, so
1189 * update it based on the ilog2 value of the outstanding requests
1190 */
1191 active = isci_tci_active(ihost);
1192 writel(SMU_ICC_GEN_VAL(NUMBER, active) |
1193 SMU_ICC_GEN_VAL(TIMER, ISCI_COALESCE_BASE + ilog2(active)),
1194 &ihost->smu_registers->interrupt_coalesce_control);
1184} 1195}
1185 1196
1186/** 1197/**
@@ -1471,7 +1482,7 @@ static void sci_controller_ready_state_enter(struct sci_base_state_machine *sm)
1471 struct isci_host *ihost = container_of(sm, typeof(*ihost), sm); 1482 struct isci_host *ihost = container_of(sm, typeof(*ihost), sm);
1472 1483
1473 /* set the default interrupt coalescence number and timeout value. */ 1484 /* set the default interrupt coalescence number and timeout value. */
1474 sci_controller_set_interrupt_coalescence(ihost, 0x10, 250); 1485 sci_controller_set_interrupt_coalescence(ihost, 0, 0);
1475} 1486}
1476 1487
1477static void sci_controller_ready_state_exit(struct sci_base_state_machine *sm) 1488static void sci_controller_ready_state_exit(struct sci_base_state_machine *sm)