2#error multicast support is not yet implemented
32#define LINUX_OUT_MACROS 1
33#define SMC9000_DEBUG 0
38#define PRINTK2(args...)
82 for (i = 0; i < 32; ++i)
95 for (i = 0; i < 5; ++i)
108 for (i = 0; i < 5; ++i)
127 for (i = 0; i < 16; ++i)
146 for (i = 0; i <
sizeof(
bits); ++i)
169 for (i = 0; i < 16; ++i)
178 printf(
"smc_read_phy_register(): phyaddr=%x,phyreg=%x,phydata=%x\n",
179 phyaddr, phyreg, phydata);
190 byte phyaddr,
byte phyreg,
word phydata)
200 for (i = 0; i < 32; ++i)
213 for (i = 0; i < 5; ++i)
226 for (i = 0; i < 5; ++i)
243 for (i = 0; i < 16; ++i)
270 for (i = 0; i <
sizeof(
bits); ++i)
292 printf(
"smc_write_phy_register(): phyaddr=%x,phyreg=%x,phydata=%x\n",
293 phyaddr, phyreg, phydata);
309 for (phyaddr = 0; phyaddr < 32; ++phyaddr)
316 if ((phy_id2 > 0x0000) && (phy_id2 < 0xffff) &&
317 (phy_id1 > 0x0000) && (phy_id1 < 0xffff))
319 if ((phy_id1 != 0x8000) && (phy_id2 != 0x8000))
336 if ( (phy_id1 == 0x0016) && ((phy_id2 & 0xFFF0) == 0xF840 ) )
338 printf(
"PHY=LAN83C183 (LAN91C111 Internal)\n");
341 if ( (phy_id1 == 0x0282) && ((phy_id2 & 0xFFF0) == 0x1C50) )
343 printf(
"PHY=LAN83C180\n");
388 PRINTK2(
"PHY reset timed out\n");
428 PRINTK2(
"phy caps=%x\n", my_phy_caps);
429 PRINTK2(
"phy advertised caps=%x\n", my_ad_caps);
453 PRINTK2(
"PHY remote fault detected\n");
456 PRINTK2(
"PHY restarting auto-negotiation\n");
465 PRINTK2(
"PHY auto-negotiate timed out\n");
471 PRINTK2(
"PHY remote fault detected\n");
560 word revision_register;
561 word base_address_register;
565 if ((bank & 0xFF00) != 0x3300) {
572 if ((bank & 0xFF00) != 0x3300) {
582 if (
ioaddr != (base_address_register >> 3 & 0x3E0)) {
583 DBG(
"SMC9000: IOADDR %hX doesn't match configuration (%hX)."
584 "Probably not a SMC chip\n",
585 ioaddr, base_address_register >> 3 & 0x3E0);
597 if (!
chip_ids[(revision_register >> 4) & 0xF]) {
599 DBG(
"SMC9000: IO %hX: Unrecognized revision register:"
600 " %hX, Contact author.\n",
ioaddr, revision_register );
623 unsigned long time_out;
635 DBG(
"SMC9000: Far too big packet error. \n");
660 printf(
"SMC9000: Memory allocation timed out, resetting MMU.\n");
667 if (packet_no & 0x80) {
669 printf(
"SMC9000: Memory allocation failed. \n");
680 printf(
"Trying to xmit packet of length %hX\n",
length );
734 DBG(
"SMC9000: TX FAIL STATUS: %hX \n", tx_status);
748 printf(
"SMC9000: TX timed out, resetting board\n");
762 if ( ! retrieve )
return 1;
775 printf(
" Reading %d words (and %d byte(s))\n",
789 printf(
"SMC9000: RX error\n");
838 const char * version_string;
839 const char * if_string;
849 for ( i = 0; i < 6; i += 2 ) {
878 if ( !version_string ) {
896 DBG(
"Copyright (C) 1998 Daniel Engstr\x94m\n");
897 DBG(
"Copyright (C) 1996 Eric Stahlman\n");
899 printf(
"%s rev:%d I/O port:%hX Interface:%s RAM:%d bytes \n",
917 else if (
media == 2 ) {
934 0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0,
935 0x300, 0x320, 0x340, 0x360, 0x380, 0x3A0, 0x3C0, 0x3E0,
#define NULL
NULL pointer (VOID *)
static volatile void * bits
static unsigned long ioaddr
uint64_t address
Base address.
const char * eth_ntoa(const void *ll_addr)
Transcribe Ethernet address.
#define __unused
Declare a variable or data structure as unused.
#define DBG(...)
Print a debugging message.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
uint32_t revision
Entry point revision.
#define outw(data, io_addr)
#define insw(io_addr, data, count)
#define outsw(io_addr, data, count)
uint16_t isa_probe_addr_t
#define ISA_ROM(IMAGE, DESCRIPTION)
#define TICKS_PER_SEC
Number of ticks per second.
#define GENERIC_ISAPNP_VENDOR
int dummy_connect(struct nic *nic __unused)
#define DRIVER(_name_text, _unused2, _unused3, _name, _probe, _disable, _fake_bss)
#define ISA_DRIVER(_name, _probe_addrs, _probe_addr, _vendor_id, _prod_id)
struct @002057171240057303273132130141036221271355330106 no_fake_bss
static void smc9000_disable(struct nic *nic, struct isa_device *isa __unused)
static int smc9000_probe(struct nic *nic, struct isa_device *isa)
static void smc_phy_configure(int ioaddr)
static isa_probe_addr_t smc9000_probe_addrs[]
static const char * interfaces[2]
static int smc9000_probe_addr(isa_probe_addr_t ioaddr)
static void smc_write_phy_register(int ioaddr, byte phyaddr, byte phyreg, word phydata)
static int smc_detect_phy(int ioaddr, byte *pphyaddr)
static const char smc9000_version[]
static const char smc91c96_id[]
static int smc9000_poll(struct nic *nic, int retrieve)
static void smc9000_irq(struct nic *nic __unused, irq_action_t action __unused)
static const char * chip_ids[15]
static struct nic_operations smc9000_operations
static void smc_reset(int ioaddr)
static word smc_read_phy_register(int ioaddr, byte phyaddr, byte phyreg)
static void smc9000_transmit(struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p)
#define PHY_STAT_ANEG_ACK
#define SMC_SELECT_BANK(x, y)
#define PHY_CNTL_ANEG_RST
uint16_t ioaddr
I/O address.
unsigned char * node_addr
struct nic_operations * nic_op
unsigned long currticks(void)
Get current system time in ticks.
void mdelay(unsigned long msecs)
Delay for a fixed number of milliseconds.
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
int printf(const char *fmt,...)
Write a formatted string to the console.