Lines Matching refs:persist

55 	ret = pci_read_config_word(dev->persist->pdev, 0, &vendor_id);  in read_vendor_id()
76 if (!pci_channel_offline(dev->persist->pdev)) { in mlx4_reset_master()
103 if (pci_channel_offline(dev->persist->pdev)) in mlx4_reset_slave()
163 void mlx4_enter_error_state(struct mlx4_dev_persistent *persist) in mlx4_enter_error_state() argument
171 mutex_lock(&persist->device_state_mutex); in mlx4_enter_error_state()
172 if (persist->state & MLX4_DEVICE_STATE_INTERNAL_ERROR) in mlx4_enter_error_state()
175 dev = persist->dev; in mlx4_enter_error_state()
190 if (!pci_channel_offline(dev->persist->pdev)) in mlx4_enter_error_state()
193 dev->persist->state |= MLX4_DEVICE_STATE_INTERNAL_ERROR; in mlx4_enter_error_state()
194 mutex_unlock(&persist->device_state_mutex); in mlx4_enter_error_state()
202 mutex_unlock(&persist->device_state_mutex); in mlx4_enter_error_state()
205 static void mlx4_handle_error_state(struct mlx4_dev_persistent *persist) in mlx4_handle_error_state() argument
209 mlx4_enter_error_state(persist); in mlx4_handle_error_state()
210 mutex_lock(&persist->interface_state_mutex); in mlx4_handle_error_state()
211 if (persist->interface_state & MLX4_INTERFACE_STATE_UP && in mlx4_handle_error_state()
212 !(persist->interface_state & MLX4_INTERFACE_STATE_DELETION)) { in mlx4_handle_error_state()
213 err = mlx4_restart_one(persist->pdev); in mlx4_handle_error_state()
214 mlx4_info(persist->dev, "mlx4_restart_one was ended, ret=%d\n", in mlx4_handle_error_state()
217 mutex_unlock(&persist->interface_state_mutex); in mlx4_handle_error_state()
249 if (dev->persist->state & MLX4_DEVICE_STATE_INTERNAL_ERROR) { in poll_catas()
260 queue_work(dev->persist->catas_wq, &dev->persist->catas_work); in poll_catas()
265 struct mlx4_dev_persistent *persist = in catas_reset() local
269 mlx4_handle_error_state(persist); in catas_reset()
282 addr = pci_resource_start(dev->persist->pdev, in mlx4_start_catas_poll()
310 if (dev->persist->interface_state & MLX4_INTERFACE_STATE_DELETION) in mlx4_stop_catas_poll()
311 flush_workqueue(dev->persist->catas_wq); in mlx4_stop_catas_poll()
316 INIT_WORK(&dev->persist->catas_work, catas_reset); in mlx4_catas_init()
317 dev->persist->catas_wq = create_singlethread_workqueue("mlx4_health"); in mlx4_catas_init()
318 if (!dev->persist->catas_wq) in mlx4_catas_init()
326 if (dev->persist->catas_wq) { in mlx4_catas_end()
327 destroy_workqueue(dev->persist->catas_wq); in mlx4_catas_end()
328 dev->persist->catas_wq = NULL; in mlx4_catas_end()