linux/drivers/atm/idt77105.c

// SPDX-License-Identifier: GPL-2.0-only
/* drivers/atm/idt77105.c - IDT77105 (PHY) driver */
 
/* Written 1999 by Greg Banks, NEC Australia <[email protected]>. Based on suni.c */


#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/errno.h>
#include <linux/atmdev.h>
#include <linux/sonet.h>
#include <linux/delay.h>
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/capability.h>
#include <linux/atm_idt77105.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <asm/param.h>
#include <linux/uaccess.h>

#include "idt77105.h"

#undef GENERAL_DEBUG

#ifdef GENERAL_DEBUG
#define DPRINTK
#else
#define DPRINTK(format,args...)
#endif


struct idt77105_priv {};

static DEFINE_SPINLOCK(idt77105_priv_lock);

#define PRIV(dev)

#define PUT(val,reg)
#define GET(reg)

static void idt77105_stats_timer_func(struct timer_list *);
static void idt77105_restart_timer_func(struct timer_list *);


static DEFINE_TIMER(stats_timer, idt77105_stats_timer_func);
static DEFINE_TIMER(restart_timer, idt77105_restart_timer_func);
static int start_timer =;
static struct idt77105_priv *idt77105_all =;

/*
 * Retrieve the value of one of the IDT77105's counters.
 * `counter' is one of the IDT77105_CTRSEL_* constants.
 */
static u16 get_counter(struct atm_dev *dev, int counter)
{}

/*
 * Timer function called every second to gather statistics
 * from the 77105. This is done because the h/w registers
 * will overflow if not read at least once per second. The
 * kernel's stats are much higher precision. Also, having
 * a separate copy of the stats allows implementation of
 * an ioctl which gathers the stats *without* zero'ing them.
 */
static void idt77105_stats_timer_func(struct timer_list *unused)
{}


/*
 * A separate timer func which handles restarting PHY chips which
 * have had the cable re-inserted after being pulled out. This is
 * done by polling the Good Signal Bit in the Interrupt Status
 * register every 5 seconds. The other technique (checking Good
 * Signal Bit in the interrupt handler) cannot be used because PHY
 * interrupts need to be disabled when the cable is pulled out
 * to avoid lots of spurious cell error interrupts.
 */
static void idt77105_restart_timer_func(struct timer_list *unused)
{}


static int fetch_stats(struct atm_dev *dev,struct idt77105_stats __user *arg,int zero)
{}


static int set_loopback(struct atm_dev *dev,int mode)
{}


static int idt77105_ioctl(struct atm_dev *dev,unsigned int cmd,void __user *arg)
{}



static void idt77105_int(struct atm_dev *dev)
{}


static int idt77105_start(struct atm_dev *dev)
{}


static int idt77105_stop(struct atm_dev *dev)
{}


static const struct atmphy_ops idt77105_ops =;


int idt77105_init(struct atm_dev *dev)
{}

EXPORT_SYMBOL();

static void __exit idt77105_exit(void)
{}

module_exit(idt77105_exit);

MODULE_DESCRIPTION();
MODULE_LICENSE();