linux/drivers/net/ethernet/chelsio/cxgb/cxgb2.c

/*****************************************************************************
 *                                                                           *
 * File: cxgb2.c                                                             *
 * $Revision: 1.25 $                                                         *
 * $Date: 2005/06/22 00:43:25 $                                              *
 * Description:                                                              *
 *  Chelsio 10Gb Ethernet Driver.                                            *
 *                                                                           *
 * This program is free software; you can redistribute it and/or modify      *
 * it under the terms of the GNU General Public License, version 2, as       *
 * published by the Free Software Foundation.                                *
 *                                                                           *
 * You should have received a copy of the GNU General Public License along   *
 * with this program; if not, see <http://www.gnu.org/licenses/>.            *
 *                                                                           *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED    *
 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF      *
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.                     *
 *                                                                           *
 * http://www.chelsio.com                                                    *
 *                                                                           *
 * Copyright (c) 2003 - 2005 Chelsio Communications, Inc.                    *
 * All rights reserved.                                                      *
 *                                                                           *
 * Maintainers: [email protected]                                      *
 *                                                                           *
 * Authors: Dimitrios Michailidis   <[email protected]>                         *
 *          Tina Yang               <[email protected]>                     *
 *          Felix Marti             <[email protected]>                      *
 *          Scott Bardone           <[email protected]>                   *
 *          Kurt Ottaway            <[email protected]>                   *
 *          Frank DiMambro          <[email protected]>                      *
 *                                                                           *
 * History:                                                                  *
 *                                                                           *
 ****************************************************************************/

#include "common.h"
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/if_vlan.h>
#include <linux/mii.h>
#include <linux/sockios.h>
#include <linux/dma-mapping.h>
#include <linux/uaccess.h>

#include "cpl5_cmd.h"
#include "regs.h"
#include "gmac.h"
#include "cphy.h"
#include "sge.h"
#include "tp.h"
#include "espi.h"
#include "elmer0.h"

#include <linux/workqueue.h>

static inline void schedule_mac_stats_update(struct adapter *ap, int secs)
{}

static inline void cancel_mac_stats_update(struct adapter *ap)
{}

#define MAX_CMDQ_ENTRIES
#define MAX_CMDQ1_ENTRIES
#define MAX_RX_BUFFERS
#define MAX_RX_JUMBO_BUFFERS
#define MAX_TX_BUFFERS_HIGH
#define MAX_TX_BUFFERS_LOW
#define MAX_TX_BUFFERS
#define MIN_FL_ENTRIES

#define DFLT_MSG_ENABLE

/*
 * The EEPROM is actually bigger but only the first few bytes are used so we
 * only report those.
 */
#define EEPROM_SIZE

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

static int dflt_msg_enable =;

module_param(dflt_msg_enable, int, 0);
MODULE_PARM_DESC();

#define HCLOCK
#define LCLOCK

/* T1 cards powersave mode */
static int t1_clock(struct adapter *adapter, int mode);
static int t1powersave =;	/* HW default is powersave mode. */

module_param(t1powersave, int, 0);
MODULE_PARM_DESC();

static int disable_msi =;
module_param(disable_msi, int, 0);
MODULE_PARM_DESC();

/*
 * Setup MAC to receive the types of packets we want.
 */
static void t1_set_rxmode(struct net_device *dev)
{}

static void link_report(struct port_info *p)
{}

void t1_link_negotiated(struct adapter *adapter, int port_id, int link_stat,
			int speed, int duplex, int pause)
{}

static void link_start(struct port_info *p)
{}

static void enable_hw_csum(struct adapter *adapter)
{}

/*
 * Things to do upon first use of a card.
 * This must run with the rtnl lock held.
 */
static int cxgb_up(struct adapter *adapter)
{}

/*
 * Release resources when all the ports have been stopped.
 */
static void cxgb_down(struct adapter *adapter)
{}

static int cxgb_open(struct net_device *dev)
{}

static int cxgb_close(struct net_device *dev)
{}

static struct net_device_stats *t1_get_stats(struct net_device *dev)
{}

static u32 get_msglevel(struct net_device *dev)
{}

static void set_msglevel(struct net_device *dev, u32 val)
{}

static const char stats_strings[][ETH_GSTRING_LEN] =;

#define T2_REGMAP_SIZE

static int get_regs_len(struct net_device *dev)
{}

static void get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
{}

static int get_sset_count(struct net_device *dev, int sset)
{}

static void get_strings(struct net_device *dev, u32 stringset, u8 *data)
{}

static void get_stats(struct net_device *dev, struct ethtool_stats *stats,
		      u64 *data)
{}

static inline void reg_block_dump(struct adapter *ap, void *buf,
				  unsigned int start, unsigned int end)
{}

static void get_regs(struct net_device *dev, struct ethtool_regs *regs,
		     void *buf)
{}

static int get_link_ksettings(struct net_device *dev,
			      struct ethtool_link_ksettings *cmd)
{}

static int speed_duplex_to_caps(int speed, int duplex)
{}

#define ADVERTISED_MASK

static int set_link_ksettings(struct net_device *dev,
			      const struct ethtool_link_ksettings *cmd)
{}

static void get_pauseparam(struct net_device *dev,
			   struct ethtool_pauseparam *epause)
{}

static int set_pauseparam(struct net_device *dev,
			  struct ethtool_pauseparam *epause)
{}

static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e,
			  struct kernel_ethtool_ringparam *kernel_e,
			  struct netlink_ext_ack *extack)
{}

static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e,
			 struct kernel_ethtool_ringparam *kernel_e,
			 struct netlink_ext_ack *extack)
{}

static int set_coalesce(struct net_device *dev, struct ethtool_coalesce *c,
			struct kernel_ethtool_coalesce *kernel_coal,
			struct netlink_ext_ack *extack)
{}

static int get_coalesce(struct net_device *dev, struct ethtool_coalesce *c,
			struct kernel_ethtool_coalesce *kernel_coal,
			struct netlink_ext_ack *extack)
{}

static int get_eeprom_len(struct net_device *dev)
{}

#define EEPROM_MAGIC(ap)

static int get_eeprom(struct net_device *dev, struct ethtool_eeprom *e,
		      u8 *data)
{}

static const struct ethtool_ops t1_ethtool_ops =;

static int t1_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
{}

static int t1_change_mtu(struct net_device *dev, int new_mtu)
{}

static int t1_set_mac_addr(struct net_device *dev, void *p)
{}

static netdev_features_t t1_fix_features(struct net_device *dev,
	netdev_features_t features)
{}

static int t1_set_features(struct net_device *dev, netdev_features_t features)
{}
#ifdef CONFIG_NET_POLL_CONTROLLER
static void t1_netpoll(struct net_device *dev)
{}
#endif

/*
 * Periodic accumulation of MAC statistics.  This is used only if the MAC
 * does not have any other way to prevent stats counter overflow.
 */
static void mac_stats_task(struct work_struct *work)
{}

static const struct net_device_ops cxgb_netdev_ops =;

static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{}

static void bit_bang(struct adapter *adapter, int bitdata, int nbits)
{}

static int t1_clock(struct adapter *adapter, int mode)
{}

static inline void t1_sw_reset(struct pci_dev *pdev)
{}

static void remove_one(struct pci_dev *pdev)
{}

static struct pci_driver cxgb_pci_driver =;

module_pci_driver();