diff options
author | Lee Jones <lee.jones@linaro.org> | 2014-08-28 09:59:50 -0400 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2014-09-12 02:05:31 -0400 |
commit | a6cc1b9478e769aca95d3a1bcb071d38b3f6bc30 (patch) | |
tree | 2c695c33859019ecbdf77026bf6c5602fbe1b17e /drivers/phy | |
parent | fbb1a770039d3900f5130bab949b757f6f7fb373 (diff) |
phy: miphy365x: Fix off-by-one error
We index the RX/TX speed select values in the following way:
rx_tx_spd[miphy_phy->sata_gen];
However rx_tx_spd[] starts at index zero and the SATA_GENx's start
at one. In this patch we pad out the first element in rx_tx_spd[]
in an attempt to realign the values.
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Reported-by: Gabriel Fernandez <gabriel.fernandez@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy')
-rw-r--r-- | drivers/phy/phy-miphy365x.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/phy/phy-miphy365x.c b/drivers/phy/phy-miphy365x.c index e111baf187ce..e0fb7a1e5a5a 100644 --- a/drivers/phy/phy-miphy365x.c +++ b/drivers/phy/phy-miphy365x.c | |||
@@ -163,6 +163,7 @@ enum miphy_sata_gen { | |||
163 | }; | 163 | }; |
164 | 164 | ||
165 | static u8 rx_tx_spd[] = { | 165 | static u8 rx_tx_spd[] = { |
166 | 0, /* GEN0 doesn't exist. */ | ||
166 | TX_SPDSEL_GEN1_VAL | RX_SPDSEL_GEN1_VAL, | 167 | TX_SPDSEL_GEN1_VAL | RX_SPDSEL_GEN1_VAL, |
167 | TX_SPDSEL_GEN2_VAL | RX_SPDSEL_GEN2_VAL, | 168 | TX_SPDSEL_GEN2_VAL | RX_SPDSEL_GEN2_VAL, |
168 | TX_SPDSEL_GEN3_VAL | RX_SPDSEL_GEN3_VAL | 169 | TX_SPDSEL_GEN3_VAL | RX_SPDSEL_GEN3_VAL |