Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

wavelan.c File Reference

#include "wavelan.p.h"

Include dependency graph for wavelan.c:

Go to the source code of this file.

Functions

static unsigned long wv_splhi (void)
static void wv_splx (unsigned long flags)
static u_char wv_irq_to_psa (int irq)
 __initfunc (static int wv_psa_to_irq(u_char irqval))
static u_short hasr_read (u_long ioaddr)
static void hacr_write (u_long ioaddr, u_short hacr)
static void hacr_write_slow (u_long ioaddr, u_short hacr)
static void set_chan_attn (u_long ioaddr, u_short hacr)
static void wv_hacr_reset (u_long ioaddr)
static void wv_16_off (u_long ioaddr, u_short hacr)
static void wv_16_on (u_long ioaddr, u_short hacr)
static void wv_ints_off (device *dev)
static void wv_ints_on (device *dev)
static void psa_read (u_long ioaddr, u_short hacr, int o, u_char *b, int n)
static void psa_write (u_long ioaddr, u_short hacr, int o, u_char *b, int n)
static void update_psa_checksum (device *dev, u_long ioaddr, u_short hacr)
static void mmc_out (u_long ioaddr, u_short o, u_char d)
static void mmc_write (u_long ioaddr, u_char o, u_char *b, int n)
static u_char mmc_in (u_long ioaddr, u_short o)
static void mmc_read (u_long ioaddr, u_char o, u_char *b, int n)
static int mmc_encr (u_long ioaddr)
static void fee_wait (u_long ioaddr, int delay, int number)
static void fee_read (u_long ioaddr, u_short o, u_short *b, int n)
static void obram_read (u_long ioaddr, u_short o, u_char *b, int n)
static void obram_write (u_long ioaddr, u_short o, u_char *b, int n)
static void wv_ack (device *dev)
static int wv_synchronous_cmd (device *dev, const char *str)
static int wv_config_complete (device *dev, u_long ioaddr, net_local *lp)
static int wv_complete (device *dev, u_long ioaddr, net_local *lp)
static void wv_82586_reconfig (device *dev)
static void wv_init_info (device *dev)
static en_statswavelan_get_stats (device *dev)
static void wavelan_set_multicast_list (device *dev)
static void wv_packet_read (device *dev, u_short buf_off, int sksize)
static void wv_receive (device *dev)
static void wv_packet_write (device *dev, void *buf, short length)
static int wavelan_packet_xmit (struct sk_buff *skb, device *dev)
static int wv_mmc_init (device *dev)
static int wv_ru_start (device *dev)
static int wv_cu_start (device *dev)
static int wv_82586_start (device *dev)
static void wv_82586_config (device *dev)
static void wv_82586_stop (device *dev)
static int wv_hw_reset (device *dev)
static int wv_check_ioaddr (u_long ioaddr, u_char *mac)
static void wavelan_interrupt (int irq, void *dev_id, struct pt_regs *regs)
static void wavelan_watchdog (u_long a)
static int wavelan_open (device *dev)
static int wavelan_close (device *dev)
 __initfunc (static int wavelan_config(device *dev))
 __initfunc (int wavelan_probe(device *dev))


Function Documentation

__initfunc int   wavelan_probe(device *dev)  ) 
 

Definition at line 4149 of file wavelan.c.

References base_addr, ENODEV, ENXIO, iobase, KERN_DEBUG, KERN_WARNING, mac, memcpy, NELS, NULL, printk, r, wavelan_config(), and wv_check_ioaddr().

Here is the call graph for this function:

__initfunc static int   wavelan_config(device *dev)  ) 
 

Definition at line 4032 of file wavelan.c.

References timer_list::data, net_local::dev, EAGAIN, ENOMEM, ether_setup(), timer_list::function, net_local::hacr, HACR_DEFAULT, irq, irq_mask, KERN_DEBUG, KERN_INFO, KERN_WARNING, kmalloc(), long, net_local::mc_count, memset, net_local::next, NULL, printk, net_local::promiscuous, psa_read(), psa_write(), psaoff, request_region, u_char, u_long, update_psa_checksum(), net_local::watchdog, wavelan_close(), wavelan_get_stats(), wavelan_list, WAVELAN_MTU, wavelan_open(), wavelan_packet_xmit(), wavelan_set_multicast_list(), wavelan_watchdog(), wv_hacr_reset(), wv_init_info(), wv_irq_to_psa(), wv_psa_to_irq(), and x00.

Here is the call graph for this function:

__initfunc static int   wv_psa_to_irq(u_char irqval)  ) 
 

Definition at line 67 of file wavelan.c.

References irq, irqvals, and NELS.

static void fee_read u_long  ioaddr,
u_short  o,
u_short b,
int  n
[static]
 

Definition at line 483 of file wavelan.c.

References fee_wait(), mmc_in(), mmc_out(), mmroff, MMW_FEE_CTRL_READ, and mmwoff.

Referenced by wv_init_info().

Here is the call graph for this function:

static void fee_wait u_long  ioaddr,
int  delay,
int  number
[inline, static]
 

Definition at line 467 of file wavelan.c.

References count, mmc_in(), MMR_FEE_STATUS_BUSY, mmroff, and udelay.

Referenced by fee_read(), and wv_mmc_init().

Here is the call graph for this function:

static void hacr_write u_long  ioaddr,
u_short  hacr
[inline, static]
 

Definition at line 125 of file wavelan.c.

References HACR, and outw.

Referenced by hacr_write_slow(), set_chan_attn(), wv_16_off(), wv_16_on(), wv_hacr_reset(), wv_ints_off(), and wv_ints_on().

static void hacr_write_slow u_long  ioaddr,
u_short  hacr
[inline, static]
 

Definition at line 137 of file wavelan.c.

References hacr_write(), and mdelay.

Referenced by wv_hacr_reset().

Here is the call graph for this function:

static u_short hasr_read u_long  ioaddr  )  [inline, static]
 

Definition at line 115 of file wavelan.c.

References HASR, and inw.

Referenced by psa_write(), and wavelan_interrupt().

static int mmc_encr u_long  ioaddr  )  [inline, static]
 

Definition at line 450 of file wavelan.c.

References mmc_in(), MMR_DES_AVAIL_AES, MMR_DES_AVAIL_DES, mmroff, and temp.

Here is the call graph for this function:

static u_char mmc_in u_long  ioaddr,
u_short  o
[inline, static]
 

Definition at line 412 of file wavelan.c.

References HASR, HASR_MMC_BUSY, inw, MMCR, outw, and u_char.

Referenced by fee_read(), fee_wait(), mmc_encr(), mmc_read(), wv_init_info(), and wv_mmc_init().

static void mmc_out u_long  ioaddr,
u_short  o,
u_char  d
[inline, static]
 

Definition at line 376 of file wavelan.c.

References HASR, HASR_MMC_BUSY, inw, MMCR, outw, and u_short.

Referenced by fee_read(), mmc_write(), and wv_packet_read().

static void mmc_read u_long  ioaddr,
u_char  o,
u_char b,
int  n
[inline, static]
 

Definition at line 433 of file wavelan.c.

References mmc_in().

Referenced by wavelan_interrupt(), wv_mmc_init(), and wv_packet_read().

Here is the call graph for this function:

static void mmc_write u_long  ioaddr,
u_char  o,
u_char b,
int  n
[inline, static]
 

Definition at line 394 of file wavelan.c.

References mmc_out().

Referenced by wv_mmc_init().

Here is the call graph for this function:

static void obram_read u_long  ioaddr,
u_short  o,
u_char b,
int  n
[static]
 

Definition at line 606 of file wavelan.c.

References insw, outw, PIOP1, and PIOR1.

Referenced by wavelan_interrupt(), wv_82586_start(), wv_ack(), wv_complete(), wv_config_complete(), wv_cu_start(), wv_packet_read(), wv_receive(), wv_ru_start(), and wv_synchronous_cmd().

static void obram_write u_long  ioaddr,
u_short  o,
u_char b,
int  n
[inline, static]
 

Definition at line 620 of file wavelan.c.

References outsw, outw, PIOP1, and PIOR1.

Referenced by wavelan_interrupt(), wv_82586_config(), wv_82586_start(), wv_82586_stop(), wv_ack(), wv_cu_start(), wv_packet_write(), wv_receive(), wv_ru_start(), and wv_synchronous_cmd().

static void psa_read u_long  ioaddr,
u_short  hacr,
int  o,
u_char b,
int  n
[static]
 

Definition at line 242 of file wavelan.c.

References inb, outw, PIOP2, PIOR2, wv_16_off(), and wv_16_on().

Referenced by __initfunc(), update_psa_checksum(), wavelan_watchdog(), wv_check_ioaddr(), wv_init_info(), and wv_mmc_init().

Here is the call graph for this function:

static void psa_write u_long  ioaddr,
u_short  hacr,
int  o,
u_char b,
int  n
[static]
 

Definition at line 265 of file wavelan.c.

References count, HASR_PSA_BUSY, hasr_read(), mdelay, outb, outw, PIOP2, PIOR2, wv_16_off(), and wv_16_on().

Referenced by __initfunc(), update_psa_checksum(), and wv_mmc_init().

Here is the call graph for this function:

static void set_chan_attn u_long  ioaddr,
u_short  hacr
[inline, static]
 

Definition at line 150 of file wavelan.c.

References HACR_CA, and hacr_write().

Referenced by wavelan_interrupt(), wv_82586_start(), wv_82586_stop(), wv_ack(), wv_cu_start(), wv_ru_start(), and wv_synchronous_cmd().

Here is the call graph for this function:

static void update_psa_checksum device *  dev,
u_long  ioaddr,
u_short  hacr
[static]
 

Definition at line 334 of file wavelan.c.

References crc, KERN_DEBUG, KERN_WARNING, printk, psa_read(), psa_write(), and u_short.

Referenced by __initfunc(), and wv_mmc_init().

Here is the call graph for this function:

static int wavelan_close device *  dev  )  [static]
 

Definition at line 3991 of file wavelan.c.

References del_timer(), free_irq(), KERN_DEBUG, MOD_DEC_USE_COUNT, NULL, timer_list::prev, printk, net_local::watchdog, and wv_82586_stop().

Referenced by __initfunc().

Here is the call graph for this function:

static en_stats* wavelan_get_stats device *  dev  )  [static]
 

Definition at line 1472 of file wavelan.c.

References KERN_DEBUG, and printk.

Referenced by __initfunc().

static void wavelan_interrupt int  irq,
void *  dev_id,
struct pt_regs regs
[static]
 

Definition at line 3701 of file wavelan.c.

References add_timer(), del_timer(), device, timer_list::expires, net_local::hacr, HASR_82586_INTR, HASR_MMC_INTR, hasr_read(), jiffies, KERN_DEBUG, KERN_INFO, mmc_read(), mmroff, NULL, obram_read(), obram_write(), OFFSET_SCB, timer_list::prev, printk, scb_command(), SCB_ST_CNA, SCB_ST_CUS, SCB_ST_CUS_ACTV, SCB_ST_CX, SCB_ST_FR, SCB_ST_INT, SCB_ST_RNR, SCB_ST_RUS, SCB_ST_RUS_RDY, scb_status(), scboff, set_chan_attn(), status, net_local::tx_n_in_use, u_char, u_long, u_short, net_local::watchdog, WATCHDOG_JIFFIES, wv_complete(), wv_hw_reset(), and wv_receive().

Referenced by wavelan_open().

Here is the call graph for this function:

static int wavelan_open device *  dev  )  [static]
 

Definition at line 3934 of file wavelan.c.

References EAGAIN, ENXIO, free_irq(), KERN_DEBUG, KERN_INFO, KERN_WARNING, MOD_INC_USE_COUNT, printk, request_irq(), u_long, wavelan_interrupt(), wv_hw_reset(), wv_splhi(), and wv_splx().

Referenced by __initfunc().

Here is the call graph for this function:

static int wavelan_packet_xmit struct sk_buff skb,
device *  dev
[static]
 

Definition at line 2827 of file wavelan.c.

References dev_kfree_skb, KERN_DEBUG, KERN_INFO, printk, net_local::reconfig_82586, test_and_set_bit, wv_82586_config(), and wv_packet_write().

Referenced by __initfunc().

Here is the call graph for this function:

static void wavelan_set_multicast_list device *  dev  )  [static]
 

Definition at line 1490 of file wavelan.c.

References I82586_MAX_MULTICAST_ADDRESSES, IFF_ALLMULTI, IFF_PROMISC, KERN_DEBUG, net_local::mc_count, NULL, printk, net_local::promiscuous, and wv_82586_reconfig().

Referenced by __initfunc().

Here is the call graph for this function:

static void wavelan_watchdog u_long  a  )  [static]
 

Definition at line 3842 of file wavelan.c.

References add_timer(), device, timer_list::expires, jiffies, KERN_DEBUG, KERN_INFO, printk, psa_read(), net_local::tx_n_in_use, u_long, net_local::watchdog, WATCHDOG_JIFFIES, wv_complete(), wv_hw_reset(), wv_splhi(), and wv_splx().

Referenced by __initfunc().

Here is the call graph for this function:

static void wv_16_off u_long  ioaddr,
u_short  hacr
[inline, static]
 

Definition at line 172 of file wavelan.c.

References HACR_16BITS, and hacr_write().

Referenced by psa_read(), and psa_write().

Here is the call graph for this function:

static void wv_16_on u_long  ioaddr,
u_short  hacr
[inline, static]
 

Definition at line 184 of file wavelan.c.

References HACR_16BITS, and hacr_write().

Referenced by psa_read(), and psa_write().

Here is the call graph for this function:

static void wv_82586_config device *  dev  )  [static]
 

Definition at line 3387 of file wavelan.c.

References AC_CFG_ACR, AC_CFG_ADDRLEN, AC_CFG_ALOC, AC_CFG_BCDIS, AC_CFG_BOFMET, AC_CFG_BTSTF, AC_CFG_BYTE_CNT, AC_CFG_CDTF, AC_CFG_CRC16, AC_CFG_CSTF, AC_CFG_ELPBCK, AC_CFG_FIFOLIM, AC_CFG_FLGPAD, AC_CFG_ICDS, AC_CFG_ICSS, AC_CFG_ILPBCK, AC_CFG_LINPRIO, AC_CFG_MANCH, AC_CFG_MNFRM, AC_CFG_NCRC, AC_CFG_PLEN_2, AC_CFG_PRELEN, AC_CFG_PRM, AC_CFG_RETRYNUM, AC_CFG_SAV_BF, AC_CFG_SLTTMHI, AC_CFG_SRDY, AC_CFG_TNCRS, AC_CFLD_CMD, AC_CFLD_I, ach_t::ac_link, ach_t::ac_status, acmd_configure, acmd_ia_setup, acmd_mc_setup, add_timer(), cfg, timer_list::expires, I82586NULL, jiffies, KERN_DEBUG, net_local::mc_count, memcpy, memset, nop, ac_nop_t::nop_h, NTXBLOCKS, NULL, obram_write(), OFFSET_CU, outsw, PIOP1, timer_list::prev, printk, net_local::promiscuous, net_local::reconfig_82586, toff, tx, net_local::tx_first_free, net_local::tx_first_in_use, ac_tx_t::tx_h, net_local::tx_n_in_use, TXBLOCKZ, u_long, u_short, net_local::watchdog, WATCHDOG_JIFFIES, WAVELAN_ADDR_SIZE, wv_splhi(), wv_splx(), and x00.

Referenced by wavelan_packet_xmit(), wv_82586_reconfig(), and wv_hw_reset().

Here is the call graph for this function:

static void wv_82586_reconfig device *  dev  )  [inline, static]
 

Definition at line 933 of file wavelan.c.

References KERN_DEBUG, printk, net_local::reconfig_82586, test_and_set_bit, and wv_82586_config().

Referenced by wavelan_set_multicast_list().

Here is the call graph for this function:

static int wv_82586_start device *  dev  )  [inline, static]
 

Definition at line 3256 of file wavelan.c.

References AC_CFLD_CMD, AC_CFLD_EL, AC_SFLD_FAIL, acmd_diagnose, sk_buff::cb, net_local::hacr, I82586_MEMZ, KERN_DEBUG, KERN_INFO, memset, obram_read(), obram_write(), OFFSET_CU, OFFSET_ISCP, OFFSET_RU, OFFSET_SCB, OFFSET_SCP, printk, SCB_CMD_RESET, SCB_ST_CNA, SCB_ST_CX, SCP_SY_16BBUS, set_chan_attn(), u_char, u_long, udelay, wv_ack(), wv_synchronous_cmd(), and x00.

Referenced by wv_hw_reset().

Here is the call graph for this function:

static void wv_82586_stop device *  dev  )  [inline, static]
 

Definition at line 3573 of file wavelan.c.

References net_local::hacr, KERN_DEBUG, obram_write(), OFFSET_SCB, printk, SCB_CMD_CUC, SCB_CMD_CUC_SUS, SCB_CMD_RUC, SCB_CMD_RUC_SUS, scb_command(), scboff, set_chan_attn(), u_long, u_short, and wv_ints_off().

Referenced by wavelan_close().

Here is the call graph for this function:

static void wv_ack device *  dev  )  [static]
 

Definition at line 634 of file wavelan.c.

References net_local::hacr, i, KERN_INFO, obram_read(), obram_write(), OFFSET_SCB, printk, scb_command(), SCB_ST_INT, scb_status(), scboff, set_chan_attn(), u_long, u_short, and udelay.

Referenced by wv_82586_start(), and wv_synchronous_cmd().

Here is the call graph for this function:

static int wv_check_ioaddr u_long  ioaddr,
u_char mac
[static]
 

Definition at line 3659 of file wavelan.c.

References check_region, EADDRINUSE, ENODEV, HACR_DEFAULT, KERN_WARNING, MAC_ADDRESSES, printk, psa_read(), psaoff, and wv_hacr_reset().

Referenced by __initfunc().

Here is the call graph for this function:

static int wv_complete device *  dev,
u_long  ioaddr,
net_local lp
[static]
 

Definition at line 787 of file wavelan.c.

References AC_SFLD_C, AC_SFLD_MAXCOL, AC_SFLD_OK, AC_SFLD_S10, AC_SFLD_S5, AC_SFLD_S6, AC_SFLD_S8, AC_SFLD_S9, acoff, net_device_stats::collisions, I82586NULL, KERN_DEBUG, mark_bh, NET_BH, NTXBLOCKS, obram_read(), OFFSET_CU, printk, net_local::stats, net_device_stats::tx_aborted_errors, net_device_stats::tx_carrier_errors, net_device_stats::tx_errors, net_device_stats::tx_fifo_errors, net_local::tx_first_in_use, net_device_stats::tx_heartbeat_errors, net_local::tx_n_in_use, net_device_stats::tx_packets, TXBLOCKZ, and wv_config_complete().

Referenced by wavelan_interrupt(), and wavelan_watchdog().

Here is the call graph for this function:

static int wv_config_complete device *  dev,
u_long  ioaddr,
net_local lp
[inline, static]
 

Definition at line 725 of file wavelan.c.

References AC_SFLD_C, AC_SFLD_OK, acoff, KERN_DEBUG, KERN_INFO, obram_read(), printk, ret, status, and net_local::tx_first_in_use.

Referenced by wv_complete().

Here is the call graph for this function:

static int wv_cu_start device *  dev  )  [inline, static]
 

Definition at line 3154 of file wavelan.c.

References AC_CFLD_I, ach_t::ac_command, ach_t::ac_link, ach_t::ac_status, acmd_nop, acmd_transmit, net_local::hacr, I82586NULL, KERN_DEBUG, KERN_INFO, nop, ac_nop_t::nop_h, NTXBLOCKS, obram_read(), obram_write(), OFFSET_CU, OFFSET_SCB, printk, SCB_CMD_CUC_GO, scb_command(), scboff, set_chan_attn(), tbd_t::tbd_bufh, tbd_t::tbd_bufl, tbd_t::tbd_next_bd_offset, tbd_t::tbd_status, TBD_STATUS_EOF, tx, net_local::tx_first_free, net_local::tx_first_in_use, ac_tx_t::tx_h, net_local::tx_n_in_use, ac_tx_t::tx_tbd_offset, TXBLOCKZ, u_long, u_short, and udelay.

Referenced by wv_hw_reset().

Here is the call graph for this function:

static void wv_hacr_reset u_long  ioaddr  )  [inline, static]
 

Definition at line 161 of file wavelan.c.

References HACR_DEFAULT, HACR_RESET, hacr_write(), and hacr_write_slow().

Referenced by __initfunc(), wv_check_ioaddr(), and wv_hw_reset().

Here is the call graph for this function:

static int wv_hw_reset device *  dev  )  [static]
 

Definition at line 3608 of file wavelan.c.

References del_timer(), net_local::hacr, HACR_DEFAULT, KERN_DEBUG, net_local::nresets, NULL, timer_list::prev, printk, u_long, net_local::watchdog, wv_82586_config(), wv_82586_start(), wv_cu_start(), wv_hacr_reset(), wv_ints_on(),