Commit 4d6f6af8 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: add Alacritech slicoss network driver

This adds the Alacritech slicoss driver to the tree.

This driver is supposed to support:

	Mojave cards (single port PCI Gigabit) both copper and fiber
	Oasis cards (single and dual port PCI-x Gigabit) copper and fiber
	Kalahari cards (dual and quad port PCI-e Gigabit) copper and fiber

The driver was acutally tested on Oasis and Kalahari cards.

TODO:
	- move firmware loading to request_firmware()
	- remove direct memory access of structures
	- any remaining sparse and checkpatch.pl warnings
	- any netdev recommended changes

Many thanks to Lior Dotan <liodot@gmail.com> for help with the cleanup
of this driver.

Cc: Lior Dotan <liodot@gmail.com>
Cc: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent cfb739b4
...@@ -25,4 +25,6 @@ if STAGING ...@@ -25,4 +25,6 @@ if STAGING
source "drivers/staging/et131x/Kconfig" source "drivers/staging/et131x/Kconfig"
source "drivers/staging/slicoss/Kconfig"
endif # STAGING endif # STAGING
# Makefile for staging directory # Makefile for staging directory
obj-$(CONFIG_ET131X) += et131x/ obj-$(CONFIG_ET131X) += et131x/
obj-$(CONFIG_SLICOSS) += slicoss/
config SLICOSS
tristate "Alacritech Gigabit IS-NIC support"
depends on PCI && X86 && NETDEV_1000
default n
help
This driver supports Alacritech's IS-NIC gigabit ethernet cards.
This includes the following devices:
Mojave cards (single port PCI Gigabit) both copper and fiber
Oasis cards (single and dual port PCI-x Gigabit) copper and fiber
Kalahari cards (dual and quad port PCI-e Gigabit) copper and fiber
To compile this driver as a module, choose M here: the module
will be called slicoss.
obj-$(CONFIG_SLICOSS) += slicoss.o
This driver is supposed to support:
Mojave cards (single port PCI Gigabit) both copper and fiber
Oasis cards (single and dual port PCI-x Gigabit) copper and fiber
Kalahari cards (dual and quad port PCI-e Gigabit) copper and fiber
The driver was actually tested on Oasis and Kalahari cards.
TODO:
- move firmware loading to request_firmware()
- remove direct memory access of structures
- any remaining sparse and checkpatch.pl warnings
- any netdev recommended changes
Please send patches to:
Greg Kroah-Hartman <gregkh@suse.de>
and Cc: Lior Dotan <liodot@gmail.com> and Christopher Harrer
<charrer@alacritech.com> as well as they are also able to test out any
changes.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/**************************************************************************
*
* Copyright (c)2000-2002 Alacritech, Inc. All rights reserved.
*
* $Id: slic_os.h,v 1.2 2006/03/27 15:10:15 mook Exp $
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
*
* THIS SOFTWARE IS PROVIDED BY ALACRITECH, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ALACRITECH, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of Alacritech, Inc.
*
**************************************************************************/
/*
* FILENAME: slic_os.h
*
* These are the Linux-specific definitions required for the SLICOSS
* driver, which should allow for greater portability to other OSes.
*/
#ifndef _SLIC_OS_SPECIFIC_H_
#define _SLIC_OS_SPECIFIC_H_
typedef unsigned char uchar;
typedef u64 ulong64;
typedef char *pchar;
typedef unsigned char *puchar;
typedef u16 *pushort;
typedef u32 ulong32;
typedef u32 *pulong32;
typedef int *plong32;
typedef unsigned int *puint;
typedef void *pvoid;
typedef unsigned long *pulong;
typedef unsigned int boolean;
typedef unsigned int wchar;
typedef unsigned int *pwchar;
typedef unsigned char UCHAR;
typedef u32 ULONG;
typedef s32 LONG;
#define FALSE (0)
#define TRUE (1)
#define SLIC_INIT_SPINLOCK(x) \
{ \
spin_lock_init(&((x).lock)); \
}
#define SLIC_ACQUIRE_SPINLOCK(x) \
{ \
spin_lock(&((x).lock)); \
}
#define SLIC_RELEASE_SPINLOCK(x) \
{ \
spin_unlock(&((x).lock)); \
}
#define SLIC_ACQUIRE_IRQ_SPINLOCK(x) \
{ \
spin_lock_irqsave(&((x).lock), (x).flags); \
}
#define SLIC_RELEASE_IRQ_SPINLOCK(x) \
{ \
spin_unlock_irqrestore(&((x).lock), (x).flags); \
}
#define ATK_DEBUG 1
#if ATK_DEBUG
#define SLIC_TIMESTAMP(value) { \
struct timeval timev; \
do_gettimeofday(&timev); \
value = timev.tv_sec*1000000 + timev.tv_usec; \
}
#else
#define SLIC_TIMESTAMP(value)
#endif
#define SLIC_ALLOCATE_MEM(len, flag) kmalloc(len, flag)
#define SLIC_DEALLOCATE_MEM(mem) kfree(mem)
#define SLIC_DEALLOCATE_IRQ_MEM(mem) free(mem)
#define SLIC_ALLOCATE_PAGE(x) (pulong32)get_free_page(GFP_KERNEL)
#define SLIC_DEALLOCATE_PAGE(addr) free_page((ulong32)addr)
#define SLIC_ALLOCATE_PCIMEM(a, sz, physp) \
pci_alloc_consistent((a)->pcidev, (sz), &(physp))
#define SLIC_DEALLOCATE_PCIMEM(a, sz, vp, pp) \
pci_free_consistent((a)->pcidev, (sz), (vp), (pp))
#define SLIC_GET_PHYSICAL_ADDRESS(addr) virt_to_bus((addr))
#define SLIC_GET_PHYSICAL_ADDRESS_HIGH(addr) 0
#define SLIC_GET_DMA_ADDRESS_WRITE(a, ptr, sz) \
pci_map_single((a)->pcidev, (ptr), (sz), PCI_DMA_TODEVICE)
#define SLIC_GET_DMA_ADDRESS_READ(a, ptr, sz) \
pci_map_single((a)->pcidev, (ptr), (sz), PCI_DMA_FROMDEVICE)
#define SLIC_UNGET_DMA_ADDRESS_WRITE(a, pa, sz) \
pci_unmap_single((a)->pcidev, (pa), (sz), PCI_DMA_TODEVICE)
#define SLIC_UNGET_DMA_ADDRESS_READ(a, pa, sz) \
pci_unmap_single((a)->pcidev, (pa), (sz), PCI_DMA_FROMDEVICE)
#define SLIC_ZERO_MEMORY(p, sz) memset((p), 0, (sz))
#define SLIC_EQUAL_MEMORY(src1, src2, len) (!memcmp(src1, src2, len))
#define SLIC_MOVE_MEMORY(dst, src, len) memcpy((dst), (src), (len))
#define SLIC_SECS_TO_JIFFS(x) ((x) * HZ)
#define SLIC_MS_TO_JIFFIES(x) (SLIC_SECS_TO_JIFFS((x)) / 1000)
#ifdef DEBUG_REGISTER_TRACE
#define WRITE_REG(reg, value, flush) \
{ \
adapter->card->reg_type[adapter->card->debug_ix] = 0; \
adapter->card->reg_offset[adapter->card->debug_ix] = \
((puchar)(&reg)) - ((puchar)adapter->slic_regs); \
adapter->card->reg_value[adapter->card->debug_ix++] = value; \
if (adapter->card->debug_ix == 32) \
adapter->card->debug_ix = 0; \
slic_reg32_write((&reg), (value), (flush)); \
}
#define WRITE_REG64(a, reg, value, regh, valh, flush) \
{ \
adapter->card->reg_type[adapter->card->debug_ix] = 1; \
adapter->card->reg_offset[adapter->card->debug_ix] = \
((puchar)(&reg)) - ((puchar)adapter->slic_regs); \
adapter->card->reg_value[adapter->card->debug_ix] = value; \
adapter->card->reg_valueh[adapter->card->debug_ix++] = valh; \
if (adapter->card->debug_ix == 32) \
adapter->card->debug_ix = 0; \
slic_reg64_write((a), (&reg), (value), (&regh), (valh), \
(flush));\
}
#else
#define WRITE_REG(reg, value, flush) \
slic_reg32_write((&reg), (value), (flush))
#define WRITE_REG64(a, reg, value, regh, valh, flush) \
slic_reg64_write((a), (&reg), (value), (&regh), (valh), (flush))
#endif
#define READ_REG(reg, flush) slic_reg32_read((&reg), (flush))
#define READ_REGP16(reg, flush) slic_reg16_read((&reg), (flush))
#endif /* _SLIC_OS_SPECIFIC_H_ */
/**************************************************************************
*
* Copyright (c) 2000-2002 Alacritech, Inc. All rights reserved.
*
* $Id: slicbuild.h,v 1.2 2006/03/27 15:10:10 mook Exp $
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
*
* THIS SOFTWARE IS PROVIDED BY ALACRITECH, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ALACRITECH, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of Alacritech, Inc.
*
**************************************************************************/
/*
* FILENAME: slicbuild.h
*
* The following contains the compiler directive switches used for
* different SLIC build options. They can all be set in the Makefile
* but the defaults are defined here.
*/
#ifndef _SLIC_BUILD_H_
#define _SLIC_BUILD_H_
#ifndef SLIC_PRODUCTION_BUILD
#define SLIC_PRODUCTION_BUILD 1
#endif
#ifndef SLIC_FAILURE_RESET
#define SLIC_FAILURE_RESET 1
#endif
#define DBG 1
#ifndef SLIC_ASSERT_ENABLED
#define SLIC_ASSERT_ENABLED 1
#endif
#ifndef SLIC_MCAST_ENABLED
#define SLIC_MCAST_ENABLED 1
#endif
#ifndef SLIC_GET_STATS_ENABLED
#define SLIC_GET_STATS_ENABLED 1
#endif
#ifndef SLIC_GET_STATS_TIMER_ENABLED
#define SLIC_GET_STATS_TIMER_ENABLED 0
#endif
#ifndef SLIC_PING_TIMER_ENABLED
#define SLIC_PING_TIMER_ENABLED 1
#endif
#ifndef SLIC_IOCTL_SUPPORT_ENABLED
#define SLIC_IOCTL_SUPPORT_ENABLED 1
#endif
#ifndef ATK_DEBUG
#define ATK_DEBUG 1
#endif
#ifndef SLIC_POWER_MANAGEMENT_ENABLED
#define SLIC_POWER_MANAGEMENT_ENABLED 0
#endif
#ifndef SLIC_INTERRUPT_PROCESS_LIMIT
#define SLIC_INTERRUPT_PROCESS_LIMIT 1
#endif
#ifndef LINUX_FREES_ADAPTER_RESOURCES
#define LINUX_FREES_ADAPTER_RESOURCES 1
#endif
#ifndef SLIC_OFFLOAD_IP_CHECKSUM
#define SLIC_OFFLOAD_IP_CHECKSUM 1
#endif
#ifndef SLIC_POWER_MANAGEMENT_ENABLED
#define SLIC_POWER_MANAGEMENT_ENABLED 0
#endif
#ifndef STATS_TIMER_INTERVAL
#define STATS_TIMER_INTERVAL 2
#endif
#ifndef PING_TIMER_INTERVAL
#define PING_TIMER_INTERVAL 1
#endif
#endif /* _SLIC_BUILD_H_ */
/**************************************************************************
*
* Copyright (c) 2000-2002 Alacritech, Inc. All rights reserved.
*
* $Id: slicdbg.h,v 1.2 2006/03/27 15:10:04 mook Exp $
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
*
* THIS SOFTWARE IS PROVIDED BY ALACRITECH, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ALACRITECH, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of Alacritech, Inc.
*
**************************************************************************/
/*
* FILENAME: slicdbg.h
*
* All debug and assertion-based definitions and macros are included
* in this file for the SLICOSS driver.
*/
#ifndef _SLIC_DEBUG_H_
#define _SLIC_DEBUG_H_
#ifdef SLIC_DEFAULT_LOG_LEVEL
#else
#define SLICLEVEL KERN_DEBUG
#endif
#define SLIC_DISPLAY printk
#define DBG_ERROR(n, args...) SLIC_DISPLAY(KERN_EMERG n, ##args)
#define SLIC_DEBUG_MESSAGE 1
#if SLIC_DEBUG_MESSAGE
/*#define DBG_MSG(n, args...) SLIC_DISPLAY(SLICLEVEL n, ##args)*/
#define DBG_MSG(n, args...)
#else
#define DBG_MSG(n, args...)
#endif
#ifdef ASSERT
#undef ASSERT
#endif
#if SLIC_ASSERT_ENABLED
#ifdef CONFIG_X86_64
#define VALID_ADDRESS(p) (1)
#else
#define VALID_ADDRESS(p) (((ulong32)(p) & 0x80000000) || ((ulong32)(p) == 0))
#endif
#ifndef ASSERT
#define ASSERT(a) \
{ \
if (!(a)) { \
DBG_ERROR("ASSERT() Failure: file %s, function %s line %d\n",\
__FILE__, __func__, __LINE__); \
slic_assert_fail(); \
} \
}
#endif
#ifndef ASSERTMSG
#define ASSERTMSG(a,msg) \
{ \
if (!(a)) { \
DBG_ERROR("ASSERT() Failure: file %s, function %s"\
"line %d: %s\n",\
__FILE__, __func__, __LINE__, (msg)); \
slic_assert_fail(); \
} \
}
#endif
#else
#ifndef ASSERT
#define ASSERT(a)
#endif
#ifndef ASSERTMSG
#define ASSERTMSG(a, msg)
#endif
#endif /* SLIC_ASSERT_ENABLED */
#endif /* _SLIC_DEBUG_H_ */
This diff is collapsed.
This diff is collapsed.
/**************************************************************************
*
* Copyright (c) 2000-2002 Alacritech, Inc. All rights reserved.
*
* $Id: slicinc.h,v 1.4 2006/07/14 16:42:56 mook Exp $
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
*
* THIS SOFTWARE IS PROVIDED BY ALACRITECH, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ALACRITECH, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of Alacritech, Inc.
*
**************************************************************************/
/*
* FILENAME: slicinc.h
*
* This file contains all other include files and prototype definitions
* for the SLICOSS driver.
*/
#ifndef _SLIC_INCLUDE_H_
#define _SLIC_INCLUDE_H_
#include "slic_os.h"
#include "slicdbg.h"
#include "slichw.h"
#include "slic.h"
int slic_entry_probe(struct pci_dev *pcidev,
const struct pci_device_id *ent);
int slic_init(struct pci_dev *pcidev,
const struct pci_device_id *pci_tbl_entry,
long memaddr,
int chip_idx,
int acpi_idle_state);
void slic_entry_remove(struct pci_dev *pcidev);
void slic_init_driver(void);
int slic_entry_open(struct net_device *dev);
int slic_entry_halt(struct net_device *dev);
int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
int slic_xmit_start(struct sk_buff *skb, struct net_device *dev);
void slic_xmit_fail(p_adapter_t adapter,
struct sk_buff *skb,
pvoid cmd,
ulong32 skbtype,
ulong32 status);
void slic_xmit_timeout(struct net_device *dev);
void slic_config_pci(struct pci_dev *pcidev);
struct sk_buff *slic_rcvqueue_getnext(p_adapter_t adapter);
inline void slic_reg32_write(void __iomem *reg, ulong32 value, uint flush);
inline void slic_reg64_write(p_adapter_t adapter, void __iomem *reg,
ulong32 value, void __iomem *regh, ulong32 paddrh, uint flush);
inline ulong32 slic_reg32_read(pulong32 reg, uint flush);
inline ulong32 slic_reg16_read(pulong32 reg, uint flush);
#if SLIC_GET_STATS_ENABLED
struct net_device_stats *slic_get_stats(struct net_device *dev);
#endif
int slic_mac_set_address(struct net_device *dev, pvoid ptr);
int slicproc_card_read(char *page, char **start, off_t off, int count,
int *eof, void *data);
int slicproc_card_write(struct file *file, const char __user *buffer,
ulong count, void *data);
void slicproc_card_create(p_sliccard_t card);
void slicproc_card_destroy(p_sliccard_t card);
int slicproc_adapter_read(char *page, char **start, off_t off, int count,
int *eof, void *data);
int slicproc_adapter_write(struct file *file, const char __user *buffer,
ulong count, void *data);
void slicproc_adapter_create(p_adapter_t adapter);
void slicproc_adapter_destroy(p_adapter_t adapter);
void slicproc_create(void);
void slicproc_destroy(void);
void slic_interrupt_process(p_adapter_t adapter, ulong32 isr);
void slic_rcv_handler(p_adapter_t adapter);
void slic_upr_handler(p_adapter_t adapter);
void slic_link_event_handler(p_adapter_t adapter);
void slic_xmit_complete(p_adapter_t adapter);
void slic_upr_request_complete(p_adapter_t adapter, ulong32 isr);
int slic_rspqueue_init(p_adapter_t adapter);
int slic_rspqueue_reset(p_adapter_t adapter);
void slic_rspqueue_free(p_adapter_t adapter);
p_slic_rspbuf_t slic_rspqueue_getnext(p_adapter_t adapter);
void slic_cmdqmem_init(p_adapter_t adapter);
void slic_cmdqmem_free(p_adapter_t adapter);
pulong32 slic_cmdqmem_addpage(p_adapter_t adapter);
int slic_cmdq_init(p_adapter_t adapter);
void slic_cmdq_free(p_adapter_t adapter);
void slic_cmdq_reset(p_adapter_t adapter);
void slic_cmdq_addcmdpage(p_adapter_t adapter, pulong32 page);
void slic_cmdq_getdone(p_adapter_t adapter);
void slic_cmdq_putdone(p_adapter_t adapter, p_slic_hostcmd_t cmd);
void slic_cmdq_putdone_irq(p_adapter_t adapter, p_slic_hostcmd_t cmd);
p_slic_hostcmd_t slic_cmdq_getfree(p_adapter_t adapter);
int slic_rcvqueue_init(p_adapter_t adapter);
int slic_rcvqueue_reset(p_adapter_t adapter);
int slic_rcvqueue_fill(p_adapter_t adapter);
ulong32 slic_rcvqueue_reinsert(p_adapter_t adapter, struct sk_buff *skb);
void slic_rcvqueue_free(p_adapter_t adapter);
void slic_rcv_handle_error(p_adapter_t adapter, p_slic_rcvbuf_t rcvbuf);
void slic_adapter_set_hwaddr(p_adapter_t adapter);
void slic_card_halt(p_sliccard_t card, p_adapter_t adapter);
int slic_card_init(p_sliccard_t card, p_adapter_t adapter);
void slic_intagg_set(p_adapter_t adapter, ulong32 value);
int slic_card_download(p_adapter_t adapter);
ulong32 slic_card_locate(p_adapter_t adapter);
int slic_card_removeadapter(p_adapter_t adapter);
void slic_card_remaster(p_adapter_t adapter);
void slic_card_softreset(p_adapter_t adapter);
void slic_card_up(p_adapter_t adapter);
void slic_card_down(p_adapter_t adapter);
void slic_if_stop_queue(p_adapter_t adapter);
void slic_if_start_queue(p_adapter_t adapter);
int slic_if_init(p_adapter_t adapter);
void slic_adapter_close(p_adapter_t adapter);
int slic_adapter_allocresources(p_adapter_t adapter);
void slic_adapter_freeresources(p_adapter_t adapter);
void slic_link_config(p_adapter_t adapter, ulong32 linkspeed,
ulong32 linkduplex);
void slic_unmap_mmio_space(p_adapter_t adapter);
void slic_card_cleanup(p_sliccard_t card);
void slic_init_cleanup(p_adapter_t adapter);
void slic_card_reclaim_buffers(p_adapter_t adapter);
void slic_soft_reset(p_adapter_t adapter);
void slic_card_reset(p_adapter_t adapter);
boolean slic_mac_filter(p_adapter_t adapter, p_ether_header ether_frame);
void slic_mac_address_config(p_adapter_t adapter);
void slic_mac_config(p_adapter_t adapter);
void slic_mcast_set_mask(p_adapter_t adapter);
void slic_mac_setmcastaddrs(p_adapter_t adapter);
int slic_mcast_add_list(p_adapter_t adapter, pchar address);
uchar slic_mcast_get_mac_hash(pchar macaddr);
void slic_mcast_set_bit(p_adapter_t adapter, pchar address);
void slic_config_set(p_adapter_t adapter, boolean linkchange);
void slic_config_clear(p_adapter_t adapter);
void slic_config_get(p_adapter_t adapter, ulong32 config, ulong32 configh);
void slic_timer_get_stats(ulong device);
void slic_timer_load_check(ulong context);
void slic_timer_ping(ulong dev);
void slic_stall_msec(int stall);
void slic_stall_usec(int stall);
void slic_assert_fail(void);
ushort slic_eeprom_cksum(pchar m, int len);
/* upr */
void slic_upr_start(p_adapter_t adapter);
void slic_link_upr_complete(p_adapter_t adapter, ulong32 Isr);
int slic_upr_request(p_adapter_t adapter,
ulong32 upr_request,
ulong32 upr_data,
ulong32 upr_data_h,
ulong32 upr_buffer,
ulong32 upr_buffer_h);
int slic_upr_queue_request(p_adapter_t adapter,
ulong32 upr_request,
ulong32 upr_data,
ulong32 upr_data_h,
ulong32 upr_buffer,
ulong32 upr_buffer_h);
void slic_mcast_set_list(struct net_device *dev);
void slic_mcast_init_crc32(void);
#if SLIC_DUMP_ENABLED
int slic_dump_thread(void *context);
uint slic_init_dump_thread(p_sliccard_t card);
uchar slic_get_dump_index(pchar path);
ulong32 slic_dump_card(p_sliccard_t card, boolean resume);
ulong32 slic_dump_halt(p_sliccard_t card, uchar proc);
ulong32 slic_dump_reg(p_sliccard_t card, uchar proc);
ulong32 slic_dump_data(p_sliccard_t card, ulong32 addr,
ushort count, uchar desc);
ulong32 slic_dump_queue(p_sliccard_t card, ulong32 buf_phys,
ulong32 buf_physh, ulong32 queue);
ulong32 slic_dump_load_queue(p_sliccard_t card, ulong32 data, ulong32 queue);
ulong32 slic_dump_cam(p_sliccard_t card, ulong32 addr,
ulong32 count, uchar desc);
ulong32 slic_dump_resume(p_sliccard_t card, uchar proc);
ulong32 slic_dump_send_cmd(p_sliccard_t card, ulong32 cmd_phys,
ulong32 cmd_physh, ulong32 buf_phys,
ulong32 buf_physh);
#define create_file(x) STATUS_SUCCESS
#define write_file(w, x, y, z) STATUS_SUCCESS
#define close_file(x) STATUS_SUCCESS
#define read_file(w, x, y, z) STATUS_SUCCESS
#define open_file(x) STATUS_SUCCESS
/* PAGE_SIZE * 16 */
#define DUMP_PAGE_SIZE 0xFFFF
#define DUMP_PAGE_SIZE_HALF 0x7FFE
#endif
#endif /* _SLIC_INCLUDE_H_ */
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment