提交 e9eff9d6 编写于 作者: L Lior Dotan 提交者: Greg Kroah-Hartman

Staging: SLICOSS: lots of checkpatch fixes

Major cleanups of checkpatch warnings from the slicoss driver.

From: Lior Dotan <liodot@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 df20d69e
#define MOJAVE_UCODE_VERS_STRING "$Revision: 1.2 $"
#define MOJAVE_UCODE_VERS_DATE "$Date: 2006/03/27 15:12:22 $"
#define MOJAVE_UCODE_VERS_STRING "1.2"
#define MOJAVE_UCODE_VERS_DATE "2006/03/27 15:12:22"
#define MOJAVE_UCODE_HOSTIF_ID 3
static LONG MNumSections = 0x2;
static ULONG MSectionSize[] =
static s32 MNumSections = 0x2;
static u32 MSectionSize[] =
{
0x00008000, 0x00010000,
};
static ULONG MSectionStart[] =
static u32 MSectionStart[] =
{
0x00000000, 0x00008000,
};
......
/*
* Copyright (c) 1997-2002 Alacritech, Inc. All rights reserved
*
* $Id: gbrcvucode.h,v 1.2 2006/03/27 15:12:15 mook Exp $
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -32,10 +31,10 @@
* official policies, either expressed or implied, of Alacritech, Inc.
*
**************************************************************************/
#define GB_RCVUCODE_VERS_STRING "$Revision: 1.2 $"
#define GB_RCVUCODE_VERS_DATE "$Date: 2006/03/27 15:12:15 $"
#define GB_RCVUCODE_VERS_STRING "1.2"
#define GB_RCVUCODE_VERS_DATE "2006/03/27 15:12:15"
static ULONG GBRcvUCodeLen = 512;
static u32 GBRcvUCodeLen = 512;
static u8 GBRcvUCode[2560] =
{
......
#define OASIS_UCODE_VERS_STRING "$Revision: 1.2 $"
#define OASIS_UCODE_VERS_DATE "$Date: 2006/03/27 15:11:22 $"
#define OASIS_UCODE_VERS_STRING "1.2"
#define OASIS_UCODE_VERS_DATE "2006/03/27 15:11:22"
#define OASIS_UCODE_HOSTIF_ID 3
static LONG ONumSections = 0x2;
static ULONG OSectionSize[] =
static s32 ONumSections = 0x2;
static u32 OSectionSize[] =
{
0x00004000, 0x00010000,
};
static ULONG OSectionStart[] =
static u32 OSectionStart[] =
{
0x00000000, 0x00008000,
};
......
#define OASIS_UCODE_VERS_STRING "$Revision: 1.2 $"
#define OASIS_UCODE_VERS_DATE "$Date: 2006/03/27 15:10:37 $"
#define OASIS_UCODE_VERS_STRING "1.2"
#define OASIS_UCODE_VERS_DATE "2006/03/27 15:10:37"
#define OASIS_UCODE_HOSTIF_ID 3
static LONG ONumSections = 0x2;
static ULONG OSectionSize[] = {
static s32 ONumSections = 0x2;
static u32 OSectionSize[] = {
0x00004000, 0x00010000,
};
static ULONG OSectionStart[] = {
static u32 OSectionStart[] = {
0x00000000, 0x00008000,
};
......
#define OASIS_RCVUCODE_VERS_STRING "$Revision: 1.2 $"
#define OASIS_RCVUCODE_VERS_DATE "$Date: 2006/03/27 15:10:28 $"
#define OASIS_RCVUCODE_VERS_STRING "1.2"
#define OASIS_RCVUCODE_VERS_DATE "2006/03/27 15:10:28"
static ULONG OasisRcvUCodeLen = 512;
static u32 OasisRcvUCodeLen = 512;
static u8 OasisRcvUCode[2560] =
{
......
此差异已折叠。
......@@ -2,7 +2,6 @@
*
* 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
......@@ -43,87 +42,9 @@
#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)
......@@ -132,7 +53,7 @@ typedef s32 LONG;
{ \
adapter->card->reg_type[adapter->card->debug_ix] = 0; \
adapter->card->reg_offset[adapter->card->debug_ix] = \
((puchar)(&reg)) - ((puchar)adapter->slic_regs); \
((unsigned char *)(&reg)) - ((unsigned char *)adapter->slic_regs); \
adapter->card->reg_value[adapter->card->debug_ix++] = value; \
if (adapter->card->debug_ix == 32) \
adapter->card->debug_ix = 0; \
......@@ -142,7 +63,7 @@ typedef s32 LONG;
{ \
adapter->card->reg_type[adapter->card->debug_ix] = 1; \
adapter->card->reg_offset[adapter->card->debug_ix] = \
((puchar)(&reg)) - ((puchar)adapter->slic_regs); \
((unsigned char *)(&reg)) - ((unsigned char *)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) \
......@@ -156,8 +77,6 @@ typedef s32 LONG;
#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_ */
......@@ -2,7 +2,6 @@
*
* 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
......
......@@ -2,7 +2,6 @@
*
* 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
......@@ -66,7 +65,7 @@
#ifdef CONFIG_X86_64
#define VALID_ADDRESS(p) (1)
#else
#define VALID_ADDRESS(p) (((ulong32)(p) & 0x80000000) || ((ulong32)(p) == 0))
#define VALID_ADDRESS(p) (((u32)(p) & 0x80000000) || ((u32)(p) == 0))
#endif
#ifndef ASSERT
#define ASSERT(a) \
......
/*
* $Id: slicdump.h,v 1.2 2006/03/27 15:09:57 mook Exp $
*
* Copyright (c) 2000-2002 Alacritech, Inc. All rights reserved.
*
......@@ -148,32 +147,32 @@
/*
* Break and Reset Break command structure
*/
typedef struct _BREAK {
uchar command; /* Command word defined above */
uchar resvd;
struct BREAK {
unsigned char command; /* Command word defined above */
unsigned char resvd;
ushort count; /* Number of executions before break */
ulong32 addr; /* Address of break point */
} BREAK, *PBREAK;
u32 addr; /* Address of break point */
};
/*
* Dump and Load command structure
*/
typedef struct _dump_cmd {
uchar cmd; /* Command word defined above */
uchar desc; /* Descriptor values - defined below */
struct dump_cmd {
unsigned char cmd; /* Command word defined above */
unsigned char desc; /* Descriptor values - defined below */
ushort count; /* number of 4 byte words to be transferred */
ulong32 addr; /* start address of dump or load */
} dump_cmd_t, *pdump_cmd_t;
u32 addr; /* start address of dump or load */
};
/*
* Receive or Transmit a frame.
*/
typedef struct _RCV_OR_XMT_FRAME {
uchar command; /* Command word defined above */
uchar MacId; /* Mac ID of interface - transmit only */
struct RCV_OR_XMT_FRAME {
unsigned char command; /* Command word defined above */
unsigned char MacId; /* Mac ID of interface - transmit only */
ushort count; /* Length of frame in bytes */
ulong32 pad; /* not used */
} RCV_OR_XMT_FRAME, *PRCV_OR_XMT_FRAME;
u32 pad; /* not used */
};
/*
* Values of desc field in DUMP_OR_LOAD structure
......@@ -196,12 +195,12 @@ typedef struct _RCV_OR_XMT_FRAME {
/*
* Map command to replace a command in ROM with a command in WCS
*/
typedef struct _MAP {
uchar command; /* Command word defined above */
uchar not_used[3];
struct MAP {
unsigned char command; /* Command word defined above */
unsigned char not_used[3];
ushort map_to; /* Instruction address in WCS */
ushort map_out; /* Instruction address in ROM */
} MAP, *PMAP;
};
/*
* Misc definitions
......@@ -221,35 +220,35 @@ typedef struct _MAP {
/*
* Coredump header structure
*/
typedef struct _CORE_Q {
ulong32 queueOff; /* Offset of queue */
ulong32 queuesize; /* size of queue */
} CORE_Q;
struct CORE_Q {
u32 queueOff; /* Offset of queue */
u32 queuesize; /* size of queue */
};
#define DRIVER_NAME_SIZE 32
typedef struct _sliccore_hdr_t {
uchar driver_version[DRIVER_NAME_SIZE]; /* Driver version string */
ulong32 RcvRegOff; /* Offset of receive registers */
ulong32 RcvRegsize; /* size of receive registers */
ulong32 XmtRegOff; /* Offset of transmit registers */
ulong32 XmtRegsize; /* size of transmit registers */
ulong32 FileRegOff; /* Offset of register file */
ulong32 FileRegsize; /* size of register file */
ulong32 SramOff; /* Offset of Sram */
ulong32 Sramsize; /* size of Sram */
ulong32 DramOff; /* Offset of Dram */
ulong32 Dramsize; /* size of Dram */
struct sliccore_hdr {
unsigned char driver_version[DRIVER_NAME_SIZE]; /* Driver version string */
u32 RcvRegOff; /* Offset of receive registers */
u32 RcvRegsize; /* size of receive registers */
u32 XmtRegOff; /* Offset of transmit registers */
u32 XmtRegsize; /* size of transmit registers */
u32 FileRegOff; /* Offset of register file */
u32 FileRegsize; /* size of register file */
u32 SramOff; /* Offset of Sram */
u32 Sramsize; /* size of Sram */
u32 DramOff; /* Offset of Dram */
u32 Dramsize; /* size of Dram */
CORE_Q queues[SLIC_MAX_QUEUE]; /* size and offsets of queues */
ulong32 CamAMOff; /* Offset of CAM A contents */
ulong32 CamASize; /* Size of Cam A */
ulong32 CamBMOff; /* Offset of CAM B contents */
ulong32 CamBSize; /* Size of Cam B */
ulong32 CamCMOff; /* Offset of CAM C contents */
ulong32 CamCSize; /* Size of Cam C */
ulong32 CamDMOff; /* Offset of CAM D contents */
ulong32 CamDSize; /* Size of Cam D */
} sliccore_hdr_t, *p_sliccore_hdr_t;
u32 CamAMOff; /* Offset of CAM A contents */
u32 CamASize; /* Size of Cam A */
u32 CamBMOff; /* Offset of CAM B contents */
u32 CamBSize; /* Size of Cam B */
u32 CamCMOff; /* Offset of CAM C contents */
u32 CamCSize; /* Size of Cam C */
u32 CamDMOff; /* Offset of CAM D contents */
u32 CamDSize; /* Size of Cam D */
};
/*
* definitions needed for our kernel-mode gdb stub.
......
此差异已折叠。
......@@ -2,7 +2,6 @@
*
* 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
......@@ -48,164 +47,135 @@
#include "slichw.h"
#include "slic.h"
int slic_entry_probe(struct pci_dev *pcidev,
static 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);
static 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,
static void slic_init_driver(void);
static int slic_entry_open(struct net_device *dev);
static int slic_entry_halt(struct net_device *dev);
static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static int slic_xmit_start(struct sk_buff *skb, struct net_device *dev);
static void slic_xmit_fail(struct adapter *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);
void *cmd,
u32 skbtype,
u32 status);
static void slic_xmit_timeout(struct net_device *dev);
static void slic_config_pci(struct pci_dev *pcidev);
static struct sk_buff *slic_rcvqueue_getnext(struct adapter *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);
static inline void slic_reg32_write(void __iomem *reg, u32 value, uint flush);
static inline void slic_reg64_write(struct adapter *adapter, void __iomem *reg,
u32 value, void __iomem *regh, u32 paddrh, uint flush);
#if SLIC_GET_STATS_ENABLED
struct net_device_stats *slic_get_stats(struct net_device *dev);
static struct net_device_stats *slic_get_stats(struct net_device *dev);
#endif
int slic_mac_set_address(struct net_device *dev, pvoid ptr);
static int slic_mac_set_address(struct net_device *dev, void *ptr);
static void slic_rcv_handler(struct adapter *adapter);
static void slic_link_event_handler(struct adapter *adapter);
static void slic_xmit_complete(struct adapter *adapter);
static void slic_upr_request_complete(struct adapter *adapter, u32 isr);
static int slic_rspqueue_init(struct adapter *adapter);
static int slic_rspqueue_reset(struct adapter *adapter);
static void slic_rspqueue_free(struct adapter *adapter);
static struct slic_rspbuf *slic_rspqueue_getnext(struct adapter *adapter);
static void slic_cmdqmem_init(struct adapter *adapter);
static void slic_cmdqmem_free(struct adapter *adapter);
static u32 *slic_cmdqmem_addpage(struct adapter *adapter);
static int slic_cmdq_init(struct adapter *adapter);
static void slic_cmdq_free(struct adapter *adapter);
static void slic_cmdq_reset(struct adapter *adapter);
static void slic_cmdq_addcmdpage(struct adapter *adapter, u32 *page);
static void slic_cmdq_getdone(struct adapter *adapter);
static void slic_cmdq_putdone(struct adapter *adapter,
struct slic_hostcmd *cmd);
static void slic_cmdq_putdone_irq(struct adapter *adapter,
struct slic_hostcmd *cmd);
static struct slic_hostcmd *slic_cmdq_getfree(struct adapter *adapter);
static int slic_rcvqueue_init(struct adapter *adapter);
static int slic_rcvqueue_reset(struct adapter *adapter);
static int slic_rcvqueue_fill(struct adapter *adapter);
static u32 slic_rcvqueue_reinsert(struct adapter *adapter, struct sk_buff *skb);
static void slic_rcvqueue_free(struct adapter *adapter);
static void slic_rcv_handle_error(struct adapter *adapter,
struct slic_rcvbuf *rcvbuf);
static void slic_adapter_set_hwaddr(struct adapter *adapter);
static void slic_card_halt(struct sliccard *card, struct adapter *adapter);
static int slic_card_init(struct sliccard *card, struct adapter *adapter);
static void slic_intagg_set(struct adapter *adapter, u32 value);
static int slic_card_download(struct adapter *adapter);
static u32 slic_card_locate(struct adapter *adapter);
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);
static void slic_if_stop_queue(struct adapter *adapter);
static void slic_if_start_queue(struct adapter *adapter);
static int slic_if_init(struct adapter *adapter);
static int slic_adapter_allocresources(struct adapter *adapter);
static void slic_adapter_freeresources(struct adapter *adapter);
static void slic_link_config(struct adapter *adapter, u32 linkspeed,
u32 linkduplex);
static void slic_unmap_mmio_space(struct adapter *adapter);
static void slic_card_cleanup(struct sliccard *card);
static void slic_init_cleanup(struct adapter *adapter);
static void slic_soft_reset(struct adapter *adapter);
static void slic_card_reset(struct adapter *adapter);
static bool slic_mac_filter(struct adapter *adapter,
struct ether_header *ether_frame);
static void slic_mac_address_config(struct adapter *adapter);
static void slic_mac_config(struct adapter *adapter);
static void slic_mcast_set_mask(struct adapter *adapter);
static int slic_mcast_add_list(struct adapter *adapter, char *address);
static unsigned char slic_mcast_get_mac_hash(char *macaddr);
static void slic_mcast_set_bit(struct adapter *adapter, char *address);
static void slic_config_set(struct adapter *adapter, bool linkchange);
static void slic_config_clear(struct adapter *adapter);
static void slic_config_get(struct adapter *adapter, u32 config,
u32 configh);
static void slic_timer_get_stats(ulong device);
static void slic_timer_load_check(ulong context);
static void slic_timer_ping(ulong dev);
static void slic_assert_fail(void);
static ushort slic_eeprom_cksum(char *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);
static void slic_upr_start(struct adapter *adapter);
static void slic_link_upr_complete(struct adapter *adapter, u32 Isr);
static int slic_upr_request(struct adapter *adapter,
u32 upr_request,
u32 upr_data,
u32 upr_data_h,
u32 upr_buffer,
u32 upr_buffer_h);
static int slic_upr_queue_request(struct adapter *adapter,
u32 upr_request,
u32 upr_data,
u32 upr_data_h,
u32 upr_buffer,
u32 upr_buffer_h);
static void slic_mcast_set_list(struct net_device *dev);
static 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);
static int slic_dump_thread(void *context);
static uint slic_init_dump_thread(struct sliccard *card);
static unsigned char slic_get_dump_index(char *path);
static u32 slic_dump_card(struct sliccard *card, bool resume);
static u32 slic_dump_halt(struct sliccard *card, unsigned char proc);
static u32 slic_dump_reg(struct sliccard *card, unsigned char proc);
static u32 slic_dump_data(struct sliccard *card, u32 addr,
ushort count, unsigned char desc);
static u32 slic_dump_queue(struct sliccard *card, u32 buf_phys,
u32 buf_physh, u32 queue);
static u32 slic_dump_load_queue(struct sliccard *card, u32 data,
u32 queue);
static u32 slic_dump_cam(struct sliccard *card, u32 addr,
u32 count, unsigned char 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);
static u32 slic_dump_resume(struct sliccard *card, unsigned char proc);
static u32 slic_dump_send_cmd(struct sliccard *card, u32 cmd_phys,
u32 cmd_physh, u32 buf_phys,
u32 buf_physh);
#define create_file(x) STATUS_SUCCESS
#define write_file(w, x, y, z) STATUS_SUCCESS
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册