mlx5en: add diagnostic in one more case of failed eeprom read preparation

(cherry picked from commit c097967b9a)
This commit is contained in:
Konstantin Belousov 2024-05-05 10:09:07 +03:00
parent 9a8a26aefb
commit ddabe1d3c5

View file

@ -3674,6 +3674,9 @@ mlx5e_ioctl(if_t ifp, u_long command, caddr_t data)
/* Check if module is present before doing an access */
module_status = mlx5_query_module_status(priv->mdev, module_num);
if (module_status != MLX5_MODULE_STATUS_PLUGGED_ENABLED) {
mlx5_en_err(ifp,
"Query module %d status: not plugged (%d), eeprom reading is not supported\n",
module_num, module_status);
error = EINVAL;
goto err_i2c;
}