/* * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include <linux/workqueue.h> #include <linux/module.h> #include "mlx4.h" enum { … }; int mlx4_internal_err_reset = …; module_param_named(internal_err_reset, mlx4_internal_err_reset, int, 0644); MODULE_PARM_DESC(…) …; static int read_vendor_id(struct mlx4_dev *dev) { … } static int mlx4_reset_master(struct mlx4_dev *dev) { … } static int mlx4_reset_slave(struct mlx4_dev *dev) { … } int mlx4_comm_internal_err(u32 slave_read) { … } void mlx4_enter_error_state(struct mlx4_dev_persistent *persist) { … } static void mlx4_handle_error_state(struct mlx4_dev_persistent *persist) { … } static void dump_err_buf(struct mlx4_dev *dev) { … } static void poll_catas(struct timer_list *t) { … } static void catas_reset(struct work_struct *work) { … } void mlx4_start_catas_poll(struct mlx4_dev *dev) { … } void mlx4_stop_catas_poll(struct mlx4_dev *dev) { … } int mlx4_catas_init(struct mlx4_dev *dev) { … } void mlx4_catas_end(struct mlx4_dev *dev) { … }