Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171258482
D59548.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D59548.diff
View Options
diff --git a/sys/dev/aq/aq_irq.c b/sys/dev/aq/aq_irq.c
--- a/sys/dev/aq/aq_irq.c
+++ b/sys/dev/aq/aq_irq.c
@@ -178,6 +178,21 @@
device_printf(aq_dev->dev, "PHY over-temperature warning\n");
}
+/* Arm after aq_hw_init(): its reset re-provisions the PHY. */
+static void
+aq_thermal_arm(struct aq_dev *aq_dev)
+{
+ struct aq_hw *hw = &aq_dev->hw;
+ int err;
+
+ if (hw->fw_ops->thermal_arm == NULL)
+ return;
+ err = hw->fw_ops->thermal_arm(hw);
+ if (err != 0 && err != ENOTSUP)
+ device_printf(aq_dev->dev,
+ "could not arm PHY thermal shutdown, error %d\n", err);
+}
+
/* Recover after cooldown: A1 needs a PHY reset then re-init, A2 re-inits alone. */
static void
aq_thermal_poll(struct aq_dev *aq_dev)
@@ -347,6 +362,7 @@
if (!aq_dev->linkup) {
aq_link_report_up(aq_dev, link_speed, &fc_neg);
aq_dev->phy_fault_last = 0;
+ aq_thermal_arm(aq_dev);
} else
device_printf(aq_dev->dev, "link speed=%d\n",
link_speed);
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
@@ -799,14 +799,6 @@
softc->init_failed = false;
softc->init_retries = 0;
- /* aq_hw_init reloads the PHY, resetting the thermal-shutdown arming. */
- 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);
aq_update_vlan_filters(softc);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Sep 10, 10:10 PM (12 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38669917
Default Alt Text
D59548.diff (1 KB)
Attached To
Mode
D59548: aq(4): arm the PHY thermal shutdown once the link is up
Attached
Detach File
Event Timeline
Log In to Comment