Page MenuHomeFreeBSD

D58853.diff
No OneTemporary

D58853.diff

diff --git a/sys/dev/aq/aq_fw2x.c b/sys/dev/aq/aq_fw2x.c
--- a/sys/dev/aq/aq_fw2x.c
+++ b/sys/dev/aq/aq_fw2x.c
@@ -657,6 +657,9 @@
uint16_t ctrl;
int err;
+ if ((hw->fw_caps & FW2X_CAP_TEMPERATURE) == 0)
+ return (ENOTSUP);
+
mtx_lock(&hw->fw_mtx);
aq_fw2x_phy_id_probe(hw);
err = aq_fw2x_phy_read(hw, AQ_PHY_MMD_GLOBAL, AQ_PHY_THERMAL_CTRL_REG,
diff --git a/sys/dev/aq/aq_main.c b/sys/dev/aq/aq_main.c
--- a/sys/dev/aq/aq_main.c
+++ b/sys/dev/aq/aq_main.c
@@ -782,10 +782,12 @@
softc->init_retries = 0;
/* aq_hw_init reloads the PHY, resetting the thermal-shutdown arming. */
- if (hw->fw_ops->thermal_arm != NULL &&
- hw->fw_ops->thermal_arm(hw) != 0)
- device_printf(softc->dev,
- "could not arm PHY thermal shutdown\n");
+ if (hw->fw_ops->thermal_arm != NULL) {
+ err = hw->fw_ops->thermal_arm(hw);
+ if (err != 0 && err != ENOTSUP)
+ device_printf(softc->dev,
+ "could not arm PHY thermal shutdown\n");
+ }
aq_if_media_status(ctx, &ifmr);

File Metadata

Mime Type
text/plain
Expires
Sun, Aug 30, 11:18 PM (8 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37633599
Default Alt Text
D58853.diff (990 B)

Event Timeline