diff options
| author | Marcin Tomczak <marcin.tomczak@intel.com> | 2012-01-04 04:33:36 -0500 |
|---|---|---|
| committer | James Bottomley <JBottomley@Parallels.com> | 2012-01-16 02:47:27 -0500 |
| commit | 0953dbea1d9a84c8443b5f5bb45229a6c9d7f9f3 (patch) | |
| tree | bb167391780955add1754646ec7689be97d781d7 | |
| parent | be778341812dc75b1c515fab6ebd39c0daf1e2bc (diff) | |
[SCSI] isci: fix start OOB
Split scu_link_layer_start_oob function to reset and enable and
add flush after all steps.
Signed-off-by: Marcin Tomczak <marcin.tomczak@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| -rw-r--r-- | drivers/scsi/isci/phy.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c index 61000cde84c7..fe18acfd6eb3 100644 --- a/drivers/scsi/isci/phy.c +++ b/drivers/scsi/isci/phy.c | |||
| @@ -1098,24 +1098,25 @@ static void scu_link_layer_stop_protocol_engine( | |||
| 1098 | writel(enable_spinup_value, &iphy->link_layer_registers->notify_enable_spinup_control); | 1098 | writel(enable_spinup_value, &iphy->link_layer_registers->notify_enable_spinup_control); |
| 1099 | } | 1099 | } |
| 1100 | 1100 | ||
| 1101 | /** | 1101 | static void scu_link_layer_start_oob(struct isci_phy *iphy) |
| 1102 | * | ||
| 1103 | * | ||
| 1104 | * This method will start the OOB/SN state machine for this struct isci_phy object. | ||
| 1105 | */ | ||
| 1106 | static void scu_link_layer_start_oob( | ||
| 1107 | struct isci_phy *iphy) | ||
| 1108 | { | 1102 | { |
| 1109 | u32 scu_sas_pcfg_value; | 1103 | struct scu_link_layer_registers __iomem *ll = iphy->link_layer_registers; |
| 1110 | 1104 | u32 val; | |
| 1111 | scu_sas_pcfg_value = | 1105 | |
| 1112 | readl(&iphy->link_layer_registers->phy_configuration); | 1106 | /** Reset OOB sequence - start */ |
| 1113 | scu_sas_pcfg_value |= SCU_SAS_PCFG_GEN_BIT(OOB_ENABLE); | 1107 | val = readl(&ll->phy_configuration); |
| 1114 | scu_sas_pcfg_value &= | 1108 | val &= ~(SCU_SAS_PCFG_GEN_BIT(OOB_RESET) | |
| 1115 | ~(SCU_SAS_PCFG_GEN_BIT(OOB_RESET) | | 1109 | SCU_SAS_PCFG_GEN_BIT(HARD_RESET)); |
| 1116 | SCU_SAS_PCFG_GEN_BIT(HARD_RESET)); | 1110 | writel(val, &ll->phy_configuration); |
| 1117 | writel(scu_sas_pcfg_value, | 1111 | readl(&ll->phy_configuration); /* flush */ |
| 1118 | &iphy->link_layer_registers->phy_configuration); | 1112 | /** Reset OOB sequence - end */ |
| 1113 | |||
| 1114 | /** Start OOB sequence - start */ | ||
| 1115 | val = readl(&ll->phy_configuration); | ||
| 1116 | val |= SCU_SAS_PCFG_GEN_BIT(OOB_ENABLE); | ||
| 1117 | writel(val, &ll->phy_configuration); | ||
| 1118 | readl(&ll->phy_configuration); /* flush */ | ||
| 1119 | /** Start OOB sequence - end */ | ||
| 1119 | } | 1120 | } |
| 1120 | 1121 | ||
| 1121 | /** | 1122 | /** |
