hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
....@@ -306,7 +306,7 @@
306306 hw->phy.phy_semaphore_mask = IXGBE_GSSR_SHARED_I2C_SM;
307307 ixgbe_setup_mux_ctl(hw);
308308 ixgbe_check_cs4227(hw);
309
- /* Fallthrough */
309
+ fallthrough;
310310 case IXGBE_DEV_ID_X550EM_A_SFP_N:
311311 return ixgbe_identify_module_generic(hw);
312312 case IXGBE_DEV_ID_X550EM_X_KX4:
....@@ -325,7 +325,7 @@
325325 hw->phy.phy_semaphore_mask = IXGBE_GSSR_PHY1_SM;
326326 else
327327 hw->phy.phy_semaphore_mask = IXGBE_GSSR_PHY0_SM;
328
- /* Fallthrough */
328
+ fallthrough;
329329 case IXGBE_DEV_ID_X550EM_X_10G_T:
330330 return ixgbe_identify_phy_generic(hw);
331331 case IXGBE_DEV_ID_X550EM_X_1G_T:
....@@ -1245,6 +1245,20 @@
12451245 hw->mac.ops.set_lan_id(hw);
12461246
12471247 return 0;
1248
+}
1249
+
1250
+/**
1251
+ * ixgbe_fw_recovery_mode - Check FW NVM recovery mode
1252
+ * @hw: pointer t hardware structure
1253
+ *
1254
+ * Returns true if in FW NVM recovery mode.
1255
+ */
1256
+static bool ixgbe_fw_recovery_mode_X550(struct ixgbe_hw *hw)
1257
+{
1258
+ u32 fwsm;
1259
+
1260
+ fwsm = IXGBE_READ_REG(hw, IXGBE_FWSM(hw));
1261
+ return !!(fwsm & IXGBE_FWSM_FW_NVM_RECOVERY_MODE);
12481262 }
12491263
12501264 /** ixgbe_disable_rx_x550 - Disable RX unit
....@@ -2289,7 +2303,7 @@
22892303 break;
22902304 }
22912305 }
2292
- /* fall through */
2306
+ fallthrough;
22932307 default:
22942308 *speed = IXGBE_LINK_SPEED_10GB_FULL |
22952309 IXGBE_LINK_SPEED_1GB_FULL;
....@@ -2871,7 +2885,7 @@
28712885 * through to the fc_full statement. Later, we will
28722886 * disable the adapter's ability to send PAUSE frames.
28732887 */
2874
- /* Fallthrough */
2888
+ fallthrough;
28752889 case ixgbe_fc_full:
28762890 pause = true;
28772891 asm_dir = true;
....@@ -3270,7 +3284,7 @@
32703284 case IXGBE_DEV_ID_X550EM_A_SGMII:
32713285 case IXGBE_DEV_ID_X550EM_A_SGMII_L:
32723286 hw->phy.type = ixgbe_phy_sgmii;
3273
- /* Fallthrough */
3287
+ fallthrough;
32743288 case IXGBE_DEV_ID_X550EM_X_KR:
32753289 case IXGBE_DEV_ID_X550EM_X_KX4:
32763290 case IXGBE_DEV_ID_X550EM_X_XFI:
....@@ -3821,6 +3835,7 @@
38213835 .enable_rx_buff = &ixgbe_enable_rx_buff_generic, \
38223836 .get_thermal_sensor_data = NULL, \
38233837 .init_thermal_sensor_thresh = NULL, \
3838
+ .fw_recovery_mode = &ixgbe_fw_recovery_mode_X550, \
38243839 .enable_rx = &ixgbe_enable_rx_generic, \
38253840 .disable_rx = &ixgbe_disable_rx_x550, \
38263841