Thread (15 messages) 15 messages, 5 authors, 2016-09-08

Re: [PATCH net-next V2 6/6] net/mlx5: Add handling for port module event

flat view

From: Saeed Mahameed <hidden>
Date: 2016-09-07 14:50:58

On Tue, Sep 6, 2016 at 7:15 PM, Joe Perches [off-list ref] wrote:
On Tue, 2016-09-06 at 19:04 +0300, Saeed Mahameed wrote:
quoted
From: Huy Nguyen <redacted>
[]
quoted
+void mlx5_port_module_event(struct mlx5_core_dev *dev, struct mlx5_eqe *eqe)
+{
quoted
+   struct mlx5_eqe_port_module *module_event_eqe;
+   u8 module_status;
+   u8 module_num;
+   u8 error_type;
+
quoted
+   module_event_eqe = &eqe->data.port_module;
+   module_num = module_event_eqe->module;
+   module_status = module_event_eqe->module_status &
+                   PORT_MODULE_EVENT_MODULE_STATUS_MASK;
+   error_type = module_event_eqe->error_type &
+                PORT_MODULE_EVENT_ERROR_TYPE_MASK;
+
quoted
+   switch (module_status) {
+   case MLX5_MODULE_STATUS_PLUGGED:
+             mlx5_core_info(dev, "Module %u, status: plugged", module_num);

Missing format '\n' line terminations
Right, will fix this.

Thanks
quoted
+             break;
+
quoted
+   case MLX5_MODULE_STATUS_UNPLUGGED:
+           mlx5_core_info(dev, "Module %u, status: unplugged", module_num);
+           break;
+
quoted
+   case MLX5_MODULE_STATUS_ERROR:
+           mlx5_core_info(dev, "Module %u, status: error, %s", module_num,
+                          mlx5_port_event_error_type_to_string(error_type));
+           break;
+
quoted
+   default:
+           mlx5_core_info(dev, "Module %u, unknown module status %x",
+                          module_num, module_status);
+     }
Should any of these be ratelimited?
Huy is checking with the HW/FW guys.  they shouldn't flood the driver
by design, but to be
in the safe side, we will double check.

Thanks,
Saeed.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help