试了两天了,不行
Attansic L2 Fast Ethernet 10/100 Base-T Adapter
lspci:
00:00.0 Host bridge: ATI Technologies Inc Unknown device 5a31 (rev 01)
00:01.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge
00:04.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge
00:05.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge
00:06.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge
00:07.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge
00:12.0 SATA controller: ATI Technologies Inc SB600 Non-Raid-5 SATA
00:13.0 USB Controller: ATI Technologies Inc SB600 USB (OHCI0)
00:13.1 USB Controller: ATI Technologies Inc SB600 USB (OHCI1)
00:13.2 USB Controller: ATI Technologies Inc SB600 USB (OHCI2)
00:13.3 USB Controller: ATI Technologies Inc SB600 USB (OHCI3)
00:13.4 USB Controller: ATI Technologies Inc SB600 USB (OHCI4)
00:13.5 USB Controller: ATI Technologies Inc SB600 USB Controller (EHCI)
00:14.0 SMBus: ATI Technologies Inc SB600 SMBus (rev 13)
00:14.1 IDE interface: ATI Technologies Inc SB600 IDE
00:14.2 Audio device: ATI Technologies Inc SB600 Azalia
00:14.3 ISA bridge: ATI Technologies Inc SB600 PCI to LPC Bridge
00:14.4 PCI bridge: ATI Technologies Inc SB600 PCI to PCI Bridge
01:05.0 VGA compatible controller: ATI Technologies Inc RC410 [Radeon Xpress 200M]
06:00.0 Ethernet controller: Attansic Technology Corp. L2 100 Mbit Ethernet Adapter (rev a0)
lsmod:
Module Size Used by
snd_seq_dummy 6788 0
snd_seq_oss 32896 0
snd_seq_midi_event 10112 1 snd_seq_oss
snd_seq 50640 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device 10508 3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss 42784 0
snd_mixer_oss 18048 1 snd_pcm_oss
ipv6 254496 12
pcmcia 34988 0
pcmcia_core 36500 1 pcmcia
capability 7304 0
commoncap 9344 1 capability
lp 13736 0
parport_pc 27812 0
parport 34760 2 lp,parport_pc
pcspkr 6528 0
psmouse 39048 0
serio_raw 9220 0
snd_hda_intel 20248 0
snd_hda_codec 209152 1 snd_hda_intel
snd_pcm 72068 3 snd_pcm_oss,snd_hda_intel,snd_hda_codec
snd_timer 22532 2 snd_seq,snd_pcm
snd 47204 9 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_intel,snd_hda_codec,snd_pcm,snd_timer
ati_agp 10892 0
agpgart 31432 1 ati_agp
ata_generic 9220 0
pata_atiixp 9600 0
soundcore 9824 1 snd
i2c_piix4 11276 0
evdev 11904 3
shpchp 33172 0
snd_page_alloc 11528 2 snd_hda_intel,snd_pcm
sg 30364 0
下了原码编译出错:
make -C /lib/modules/2.6.21.5-smp/build SUBDIRS=/root/L2drv/src modules
make[1]: Entering directory `/usr/src/linux-2.6.21.5'
CC [M] /root/L2drv/src/at_main.o
make[1]: Leaving directory `/usr/src/linux-2.6.21.5'
make -C /lib/modules/2.6.21.5-smp/build SUBDIRS=/root/L2drv/src modules
make[1]: Entering directory `/usr/src/linux-2.6.21.5'
CC [M] /root/L2drv/src/at_main.o
make[1]: Leaving directory `/usr/src/linux-2.6.21.5'
/root/L2drv/src/at_main.c: 在函数 ‘at_vlan_rx_kill_vid’ 中:
/root/L2drv/src/at_main.c:1488: 错误:‘struct vlan_group’ 没有名为 ‘vlan_devices’ 的成员
/root/L2drv/src/at_main.c: 在函数 ‘at_restore_vlan’ 中:
/root/L2drv/src/at_main.c:1507: 错误:‘struct vlan_group’ 没有名为 ‘vlan_devices’ 的成员
make[2]: *** [/root/L2drv/src/at_main.o] 错误 1
make[1]: *** [_module_/root/L2drv/src] 错误 2
make: *** [default] 错误 2
struct vlan_group 在at.h中找到,不知道怎么处理。
/*
* Copyright(c) 2005 - 2006 Attansic Corporation. All rights reserved.
* Copyright(c) 2006 xiong huang <xiong.huang@atheros.com>
*
* Derived from Intel e1000 driver
* Copyright(c) 1999 - 2005 Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* There are a lot of defines in here that are unused and/or have cryptic
* names. Please leave them alone, as they're the closest thing we have
* to a spec from Attansic at present. *ahem* -- CHS
*/
#ifndef _ATTANSIC_H__
#define _ATTANSIC_H__
#include "kcompat.h"
#define BAR_0 0
#define BAR_1 1
#define BAR_5 5
#define ATTANSIC_ETHERNET_DEVICE(device_id) {\
PCI_DEVICE(0x1969, device_id)}
struct at_adapter;
#include "at_hw.h"
#if DBG
#define AT_DBG(args...) printk(KERN_DEBUG "attansic: " args)
#else
#define AT_DBG(args...)
#endif
#define AT_ERR(args...) printk(KERN_ERR "attansic: " args)
struct at_ring_header {
/* pointer to the descriptor ring memory */
void *desc;
/* physical adress of the descriptor ring */
dma_addr_t dma;
/* length of descriptor ring in bytes */
unsigned int size;
};
/* board specific private data structure */
struct at_adapter {
/* OS defined structs */
struct net_device *netdev;
struct pci_dev *pdev;
struct net_device_stats net_stats;
#ifdef NETIF_F_HW_VLAN_TX
struct vlan_group *vlgrp;//
#endif
u32 wol;
u16 link_speed;
u16 link_duplex;
spinlock_t stats_lock;
spinlock_t tx_lock;
atomic_t irq_sem;//
struct work_struct reset_task;//
struct work_struct link_chg_task;//
struct timer_list watchdog_timer;
struct timer_list phy_config_timer;
boolean_t phy_timer_pending;
boolean_t mac_disabled;
// All Descriptor memory
dma_addr_t ring_dma;
void* ring_vir_addr;
int ring_size;
tx_pkt_header_t* txd_ring;
dma_addr_t txd_dma;
tx_pkt_status_t* txs_ring;
dma_addr_t txs_dma;
rx_desc_t* rxd_ring;
dma_addr_t rxd_dma;
u32 txd_ring_size; // bytes per unit
u32 txs_ring_size; // dwords per unit
u32 rxd_ring_size; // 1536bytes per unit
// read /write ptr:
// host
u32 txd_write_ptr;
u32 txs_next_clear;
u32 rxd_read_ptr;
// nic
atomic_t txd_read_ptr;
atomic_t txs_write_ptr;
u32 rxd_write_ptr;
/* Interrupt Moderator timer ( 2us resolution) */
u16 imt;
/* Interrupt Clear timer (2us resolution) */
u16 ict;
unsigned long flags;
/* structs defined in at_hw.h */
u32 bd_number; // board number;
boolean_t pci_using_64;
struct at_hw hw;
u32 usr_cmd;
// u32 regs_buff[AT_REGS_LEN];
u32 pci_state[16];
u32* config_space;
};
enum at_state_t {
__AT_TESTING,
__AT_RESETTING,
__AT_DOWN
};
#endif//_ATTANSIC_H__ |