mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-24 18:38:38 +00:00
IB/ehca: Fix HW level autodetection
Autodetection was missing a few HW revisions, causing certain eHCA1 revisions to be treated like eHCA2. Fixed. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
8fcea95a2a
commit
fbb9318be4
@ -263,22 +263,27 @@ int ehca_sense_attributes(struct ehca_shca *shca)
|
|||||||
|
|
||||||
ehca_gen_dbg(" ... hardware version=%x:%x", hcaaver, revid);
|
ehca_gen_dbg(" ... hardware version=%x:%x", hcaaver, revid);
|
||||||
|
|
||||||
if ((hcaaver == 1) && (revid == 0))
|
if (hcaaver == 1) {
|
||||||
shca->hw_level = 0x11;
|
if (revid <= 3)
|
||||||
else if ((hcaaver == 1) && (revid == 1))
|
shca->hw_level = 0x10 | (revid + 1);
|
||||||
shca->hw_level = 0x12;
|
else
|
||||||
else if ((hcaaver == 1) && (revid == 2))
|
shca->hw_level = 0x14;
|
||||||
shca->hw_level = 0x13;
|
} else if (hcaaver == 2) {
|
||||||
else if ((hcaaver == 2) && (revid == 0))
|
if (revid == 0)
|
||||||
shca->hw_level = 0x21;
|
shca->hw_level = 0x21;
|
||||||
else if ((hcaaver == 2) && (revid == 0x10))
|
else if (revid == 0x10)
|
||||||
shca->hw_level = 0x22;
|
shca->hw_level = 0x22;
|
||||||
else {
|
else if (revid == 0x20 || revid == 0x21)
|
||||||
|
shca->hw_level = 0x23;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!shca->hw_level) {
|
||||||
ehca_gen_warn("unknown hardware version"
|
ehca_gen_warn("unknown hardware version"
|
||||||
" - assuming default level");
|
" - assuming default level");
|
||||||
shca->hw_level = 0x22;
|
shca->hw_level = 0x22;
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
|
shca->hw_level = ehca_hw_level;
|
||||||
ehca_gen_dbg(" ... hardware level=%x", shca->hw_level);
|
ehca_gen_dbg(" ... hardware level=%x", shca->hw_level);
|
||||||
|
|
||||||
shca->sport[0].rate = IB_RATE_30_GBPS;
|
shca->sport[0].rate = IB_RATE_30_GBPS;
|
||||||
|
Loading…
Reference in New Issue
Block a user