diff options
Diffstat (limited to 'drivers/scsi/isci/host.c')
-rw-r--r-- | drivers/scsi/isci/host.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c index 6ca9b26bb2fb..d4bf9c12ecd4 100644 --- a/drivers/scsi/isci/host.c +++ b/drivers/scsi/isci/host.c | |||
@@ -649,15 +649,13 @@ static void isci_host_start_complete(struct isci_host *ihost, enum sci_status co | |||
649 | 649 | ||
650 | int isci_host_scan_finished(struct Scsi_Host *shost, unsigned long time) | 650 | int isci_host_scan_finished(struct Scsi_Host *shost, unsigned long time) |
651 | { | 651 | { |
652 | struct isci_host *ihost = SHOST_TO_SAS_HA(shost)->lldd_ha; | 652 | struct sas_ha_struct *ha = SHOST_TO_SAS_HA(shost); |
653 | struct isci_host *ihost = ha->lldd_ha; | ||
653 | 654 | ||
654 | if (test_bit(IHOST_START_PENDING, &ihost->flags)) | 655 | if (test_bit(IHOST_START_PENDING, &ihost->flags)) |
655 | return 0; | 656 | return 0; |
656 | 657 | ||
657 | /* todo: use sas_flush_discovery once it is upstream */ | 658 | sas_drain_work(ha); |
658 | scsi_flush_work(shost); | ||
659 | |||
660 | scsi_flush_work(shost); | ||
661 | 659 | ||
662 | dev_dbg(&ihost->pdev->dev, | 660 | dev_dbg(&ihost->pdev->dev, |
663 | "%s: ihost->status = %d, time = %ld\n", | 661 | "%s: ihost->status = %d, time = %ld\n", |
@@ -1490,6 +1488,15 @@ sci_controller_set_interrupt_coalescence(struct isci_host *ihost, | |||
1490 | static void sci_controller_ready_state_enter(struct sci_base_state_machine *sm) | 1488 | static void sci_controller_ready_state_enter(struct sci_base_state_machine *sm) |
1491 | { | 1489 | { |
1492 | struct isci_host *ihost = container_of(sm, typeof(*ihost), sm); | 1490 | struct isci_host *ihost = container_of(sm, typeof(*ihost), sm); |
1491 | u32 val; | ||
1492 | |||
1493 | /* enable clock gating for power control of the scu unit */ | ||
1494 | val = readl(&ihost->smu_registers->clock_gating_control); | ||
1495 | val &= ~(SMU_CGUCR_GEN_BIT(REGCLK_ENABLE) | | ||
1496 | SMU_CGUCR_GEN_BIT(TXCLK_ENABLE) | | ||
1497 | SMU_CGUCR_GEN_BIT(XCLK_ENABLE)); | ||
1498 | val |= SMU_CGUCR_GEN_BIT(IDLE_ENABLE); | ||
1499 | writel(val, &ihost->smu_registers->clock_gating_control); | ||
1493 | 1500 | ||
1494 | /* set the default interrupt coalescence number and timeout value. */ | 1501 | /* set the default interrupt coalescence number and timeout value. */ |
1495 | sci_controller_set_interrupt_coalescence(ihost, 0, 0); | 1502 | sci_controller_set_interrupt_coalescence(ihost, 0, 0); |