linux/drivers/infiniband/hw/mthca/mthca_main.c

/*
 * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
 * Copyright (c) 2005 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/module.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
#include <linux/gfp.h>

#include "mthca_dev.h"
#include "mthca_config_reg.h"
#include "mthca_cmd.h"
#include "mthca_profile.h"
#include "mthca_memfree.h"
#include "mthca_wqe.h"

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();

#ifdef CONFIG_INFINIBAND_MTHCA_DEBUG

int mthca_debug_level =;
module_param_named(debug_level, mthca_debug_level, int, 0644);
MODULE_PARM_DESC();

#endif /* CONFIG_INFINIBAND_MTHCA_DEBUG */

#ifdef CONFIG_PCI_MSI

static int msi_x =;
module_param(msi_x, int, 0444);
MODULE_PARM_DESC();

#else /* CONFIG_PCI_MSI */

#define msi_x

#endif /* CONFIG_PCI_MSI */

static int tune_pci =;
module_param(tune_pci, int, 0444);
MODULE_PARM_DESC();

DEFINE_MUTEX();

#define MTHCA_DEFAULT_NUM_QP
#define MTHCA_DEFAULT_RDB_PER_QP
#define MTHCA_DEFAULT_NUM_CQ
#define MTHCA_DEFAULT_NUM_MCG
#define MTHCA_DEFAULT_NUM_MPT
#define MTHCA_DEFAULT_NUM_MTT
#define MTHCA_DEFAULT_NUM_UDAV
#define MTHCA_DEFAULT_NUM_RESERVED_MTTS
#define MTHCA_DEFAULT_NUM_UARC_SIZE

static struct mthca_profile hca_profile =;

module_param_named(num_qp, hca_profile.num_qp, int, 0444);
MODULE_PARM_DESC();

module_param_named(rdb_per_qp, hca_profile.rdb_per_qp, int, 0444);
MODULE_PARM_DESC();

module_param_named(num_cq, hca_profile.num_cq, int, 0444);
MODULE_PARM_DESC();

module_param_named(num_mcg, hca_profile.num_mcg, int, 0444);
MODULE_PARM_DESC();

module_param_named(num_mpt, hca_profile.num_mpt, int, 0444);
MODULE_PARM_DESC();

module_param_named(num_mtt, hca_profile.num_mtt, int, 0444);
MODULE_PARM_DESC();

module_param_named(num_udav, hca_profile.num_udav, int, 0444);
MODULE_PARM_DESC();

module_param_named(fmr_reserved_mtts, hca_profile.fmr_reserved_mtts, int, 0444);
MODULE_PARM_DESC();

static int log_mtts_per_seg =;
module_param_named(log_mtts_per_seg, log_mtts_per_seg, int, 0444);
MODULE_PARM_DESC();

static char mthca_version[] =;

static int mthca_tune_pci(struct mthca_dev *mdev)
{}

static int mthca_dev_lim(struct mthca_dev *mdev, struct mthca_dev_lim *dev_lim)
{}

static int mthca_init_tavor(struct mthca_dev *mdev)
{}

static int mthca_load_fw(struct mthca_dev *mdev)
{}

static int mthca_init_icm(struct mthca_dev *mdev,
			  struct mthca_dev_lim *dev_lim,
			  struct mthca_init_hca_param *init_hca,
			  u64 icm_size)
{}

static void mthca_free_icms(struct mthca_dev *mdev)
{}

static int mthca_init_arbel(struct mthca_dev *mdev)
{}

static void mthca_close_hca(struct mthca_dev *mdev)
{}

static int mthca_init_hca(struct mthca_dev *mdev)
{}

static int mthca_setup_hca(struct mthca_dev *dev)
{}

static int mthca_enable_msi_x(struct mthca_dev *mdev)
{}

/* Types of supported HCA */
enum {};

#define MTHCA_FW_VER(major, minor, subminor)

static struct {} mthca_hca_table[] =;

static int __mthca_init_one(struct pci_dev *pdev, int hca_type)
{}

static void __mthca_remove_one(struct pci_dev *pdev)
{}

int __mthca_restart_one(struct pci_dev *pdev)
{}

static int mthca_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
{}

static void mthca_remove_one(struct pci_dev *pdev)
{}

static const struct pci_device_id mthca_pci_table[] =;

MODULE_DEVICE_TABLE(pci, mthca_pci_table);

static struct pci_driver mthca_driver =;

static void __init __mthca_check_profile_val(const char *name, int *pval,
					     int pval_default)
{}

#define mthca_check_profile_val(name, default)

static void __init mthca_validate_profile(void)
{}

static int __init mthca_init(void)
{}

static void __exit mthca_cleanup(void)
{}

module_init();
module_exit(mthca_cleanup);