sis900.c File Reference

#include "etherboot.h"
#include <gpxe/pci.h>
#include "nic.h"
#include "sis900.h"

Go to the source code of this file.

Data Structures

struct  mii_chip_info
struct  mii_phy

Defines

#define txd   sis900_bufs.txd
#define rxd   sis900_bufs.rxd
#define txb   sis900_bufs.txb
#define rxb   sis900_bufs.rxb
#define eeprom_delay()   inl(ee_addr)
#define sis900_mdio_delay()   inl(mdio_addr)

Functions

 FILE_LICENCE (GPL_ANY)
static void sis900_read_mode (struct nic *nic, int phy_addr, int *speed, int *duplex)
static void amd79c901_read_mode (struct nic *nic, int phy_addr, int *speed, int *duplex)
static void ics1893_read_mode (struct nic *nic, int phy_addr, int *speed, int *duplex)
static void rtl8201_read_mode (struct nic *nic, int phy_addr, int *speed, int *duplex)
static void vt6103_read_mode (struct nic *nic, int phy_addr, int *speed, int *duplex)
static int sis900_probe (struct nic *nic, struct pci_device *pci)
static u16 sis900_read_eeprom (int location)
static void sis900_mdio_reset (long mdio_addr)
static void sis900_mdio_idle (long mdio_addr)
static u16 sis900_mdio_read (int phy_id, int location)
static void sis900_init (struct nic *nic)
static void sis900_reset (struct nic *nic)
static void sis900_init_rxfilter (struct nic *nic)
static void sis900_init_txd (struct nic *nic)
static void sis900_init_rxd (struct nic *nic)
static void sis900_set_rx_mode (struct nic *nic)
static void sis900_check_mode (struct nic *nic)
static void sis900_transmit (struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p)
static int sis900_poll (struct nic *nic, int retrieve)
static void sis900_disable (struct nic *nic)
static void sis900_irq (struct nic *nic, irq_action_t action)
static int sis900_get_mac_addr (struct pci_device *pci_dev __unused, struct nic *nic)
 sis900_get_mac_addr: - Get MAC address for stand alone SiS900 model : the sis900 pci device : the net device to get address for
static int sis96x_get_mac_addr (struct pci_device *pci_dev __unused, struct nic *nic)
 sis96x_get_mac_addr: - Get MAC address for SiS962 or SiS963 model : the sis900 pci device : the net device to get address for
static int sis630e_get_mac_addr (struct pci_device *pci_dev __unused, struct nic *nic)
 sis630e_get_mac_addr: - Get MAC address for SiS630E model : the sis900 pci device : the net device to get address for
static int sis635_get_mac_addr (struct pci_device *pci_dev __unused, struct nic *nic)
 sis630e_get_mac_addr: - Get MAC address for SiS630E model : the sis900 pci device : the net device to get address for
static void sis900_reset (struct nic *nic __unused)
static void sis900_init_txd (struct nic *nic __unused)
static void sis900_init_rxd (struct nic *nic __unused)
static void sis900_set_rx_mode (struct nic *nic __unused)
static void sis900_read_mode (struct nic *nic __unused, int phy_addr, int *speed, int *duplex)
static void amd79c901_read_mode (struct nic *nic __unused, int phy_addr, int *speed, int *duplex)
static void ics1893_read_mode (struct nic *nic __unused, int phy_addr, int *speed, int *duplex)
 ics1893_read_mode: - read media mode for ICS1893 PHY : the net device to read mode for : mii phy address : the transmit speed to be determined : the duplex mode to be determined
static void rtl8201_read_mode (struct nic *nic __unused, int phy_addr, int *speed, int *duplex)
 rtl8201_read_mode: - read media mode for rtl8201 phy : the net device to read mode for : mii phy address : the transmit speed to be determined : the duplex mode to be determined
static void vt6103_read_mode (struct nic *nic __unused, int phy_addr, int *speed, int *duplex)
 vt6103_read_mode: - read media mode for vt6103 phy : the net device to read mode for : mii phy address : the transmit speed to be determined : the duplex mode to be determined
static void sis900_irq (struct nic *nic __unused, irq_action_t action __unused)
 PCI_DRIVER (sis900_driver, sis900_nics, PCI_NO_CLASS)
 DRIVER ("SIS900", nic_driver, pci_driver, sis900_driver, sis900_probe, sis900_disable)

Variables

static struct nic_operations sis900_operations
static int sis900_debug = 0
static unsigned short vendor
static unsigned short dev_id
static unsigned long ioaddr
static u8 pci_revision
static unsigned int cur_phy
static unsigned int cur_rx
struct {
   BufferDesc   txd
   BufferDesc   rxd [NUM_RX_DESC]
   unsigned char   txb [TX_BUF_SIZE]
   unsigned char   rxb [NUM_RX_DESC *RX_BUF_SIZE]
__shared
static struct mii_chip_info mii_chip_table []
static struct mii_phy mii
static struct pci_device_id sis900_nics []


Define Documentation

#define txd   sis900_bufs.txd

Definition at line 74 of file sis900.c.

#define rxd   sis900_bufs.rxd

Definition at line 75 of file sis900.c.

#define txb   sis900_bufs.txb

Definition at line 76 of file sis900.c.

#define rxb   sis900_bufs.rxb

Definition at line 77 of file sis900.c.

 
#define eeprom_delay (  )     inl(ee_addr)

Definition at line 449 of file sis900.c.

 
#define sis900_mdio_delay (  )     inl(mdio_addr)

Definition at line 505 of file sis900.c.

Referenced by sis900_mdio_idle(), sis900_mdio_read(), and sis900_mdio_reset().


Function Documentation

FILE_LICENCE ( GPL_ANY   ) 

static void sis900_read_mode ( struct nic nic,
int  phy_addr,
int *  speed,
int *  duplex 
) [static]

static void amd79c901_read_mode ( struct nic nic,
int  phy_addr,
int *  speed,
int *  duplex 
) [static]

static void ics1893_read_mode ( struct nic nic,
int  phy_addr,
int *  speed,
int *  duplex 
) [static]

static void rtl8201_read_mode ( struct nic nic,
int  phy_addr,
int *  speed,
int *  duplex 
) [static]

static void vt6103_read_mode ( struct nic nic,
int  phy_addr,
int *  speed,
int *  duplex 
) [static]

static int sis900_probe ( struct nic nic,
struct pci_device pci 
) [static]

Definition at line 336 of file sis900.c.

References ACCESSMODE, adjust_pci_device(), mii_phy::chip_info, cr, cur_phy, DBG, dev_id, pci_device::device, inl, ioaddr, nic::ioaddr, pci_device::ioaddr, nic::irqno, mii, mii_chip_table, MII_PHY_ID0, MII_PHY_ID1, MII_STATUS, mii_chip_info::name, name, mii_phy::next, nic::nic_op, NULL, outl, pci_read_config_byte(), pci_revision, PCI_REVISION, pci_write_config_dword(), mii_phy::phy_addr, mii_chip_info::phy_id1, printf(), SIS630E_900_REV, sis630e_get_mac_addr(), SIS630ET_900_REV, sis635_get_mac_addr(), sis900_get_mac_addr(), sis900_init(), sis900_mdio_read(), sis900_operations, SIS96x_900_REV, sis96x_get_mac_addr(), mii_phy::status, u16, u8, pci_device::vendor, and vendor.

00336                                                                     {
00337 
00338     int i;
00339     int found=0;
00340     int phy_addr;
00341     u8 revision;
00342     int ret;
00343 
00344     if (pci->ioaddr == 0)
00345         return 0;
00346 
00347     nic->irqno  = 0;
00348     nic->ioaddr = pci->ioaddr;
00349 
00350     ioaddr  = pci->ioaddr;
00351     vendor  = pci->vendor;
00352     dev_id  = pci->device;
00353 
00354     /* wakeup chip */
00355     pci_write_config_dword(pci, 0x40, 0x00000000);
00356 
00357     adjust_pci_device(pci);
00358 
00359     /* get MAC address */
00360     ret = 0;
00361     pci_read_config_byte(pci, PCI_REVISION, &revision);
00362     
00363     /* save for use later in sis900_reset() */
00364     pci_revision = revision; 
00365 
00366     if (revision == SIS630E_900_REV)
00367         ret = sis630e_get_mac_addr(pci, nic);
00368     else if ((revision > 0x81) && (revision <= 0x90))
00369         ret = sis635_get_mac_addr(pci, nic);
00370     else if (revision == SIS96x_900_REV)
00371         ret = sis96x_get_mac_addr(pci, nic);
00372     else
00373         ret = sis900_get_mac_addr(pci, nic);
00374 
00375     if (ret == 0)
00376     {
00377         printf ("sis900_probe: Error MAC address not found\n");
00378         return 0;
00379     }
00380 
00381     /* 630ET : set the mii access mode as software-mode */
00382     if (revision == SIS630ET_900_REV)
00383         outl(ACCESSMODE | inl(ioaddr + cr), ioaddr + cr);
00384 
00385     DBG( "sis900_probe: Vendor:%#hX Device:%#hX\n", vendor, dev_id );
00386 
00387     /* probe for mii transceiver */
00388     /* search for total of 32 possible mii phy addresses */
00389 
00390     found = 0;
00391     for (phy_addr = 0; phy_addr < 32; phy_addr++) {
00392         u16 mii_status;
00393         u16 phy_id0, phy_id1;
00394 
00395         mii_status = sis900_mdio_read(phy_addr, MII_STATUS);
00396         if (mii_status == 0xffff || mii_status == 0x0000)
00397             /* the mii is not accessable, try next one */
00398             continue;
00399                 
00400         phy_id0 = sis900_mdio_read(phy_addr, MII_PHY_ID0);
00401         phy_id1 = sis900_mdio_read(phy_addr, MII_PHY_ID1);
00402 
00403         /* search our mii table for the current mii */ 
00404         for (i = 0; mii_chip_table[i].phy_id1; i++) {
00405 
00406             if ((phy_id0 == mii_chip_table[i].phy_id0) &&
00407                 ((phy_id1 & 0xFFF0) == mii_chip_table[i].phy_id1)){
00408 
00409                 printf("sis900_probe: %s transceiver found at address %d.\n",
00410                        mii_chip_table[i].name, phy_addr);
00411 
00412                 mii.chip_info = &mii_chip_table[i];
00413                 mii.phy_addr  = phy_addr;
00414                 mii.status    = sis900_mdio_read(phy_addr, MII_STATUS);
00415                 mii.next      = NULL;
00416 
00417                 found=1;
00418                 break;
00419             }
00420         }
00421     }
00422         
00423     if (found == 0) {
00424         printf("sis900_probe: No MII transceivers found!\n");
00425         return 0;
00426     }
00427 
00428     /* Arbitrarily select the last PHY found as current PHY */
00429     cur_phy = mii.phy_addr;
00430     printf("sis900_probe: Using %s as default\n",  mii.chip_info->name);
00431 
00432     /* initialize device */
00433     sis900_init(nic);
00434     nic->nic_op = &sis900_operations;
00435 
00436     return 1;
00437 }

static u16 sis900_read_eeprom ( int  location  )  [static]

Definition at line 464 of file sis900.c.

References EECLK, EECS, EEDI, EEDO, eeprom_delay, EEread, inl, ioaddr, mear, outl, u16, and u32.

Referenced by sis900_get_mac_addr(), and sis96x_get_mac_addr().

00465 {
00466     int i;
00467     u16 retval = 0;
00468     long ee_addr = ioaddr + mear;
00469     u32 read_cmd = location | EEread;
00470 
00471     outl(0, ee_addr);
00472     eeprom_delay();
00473     outl(EECS, ee_addr);
00474     eeprom_delay();
00475 
00476     /* Shift the read command (9) bits out. */
00477     for (i = 8; i >= 0; i--) {
00478         u32 dataval = (read_cmd & (1 << i)) ? EEDI | EECS : EECS;
00479         outl(dataval, ee_addr);
00480         eeprom_delay();
00481         outl(dataval | EECLK, ee_addr);
00482         eeprom_delay();
00483     }
00484     outl(EECS, ee_addr);
00485     eeprom_delay();
00486 
00487     /* read the 16-bits data in */
00488     for (i = 16; i > 0; i--) {
00489         outl(EECS, ee_addr);
00490         eeprom_delay();
00491         outl(EECS | EECLK, ee_addr);
00492         eeprom_delay();
00493         retval = (retval << 1) | ((inl(ee_addr) & EEDO) ? 1 : 0);
00494         eeprom_delay();
00495     }
00496                 
00497     /* Terminate the EEPROM access. */
00498     outl(0, ee_addr);
00499     eeprom_delay();
00500 //  outl(EECLK, ee_addr);
00501 
00502     return (retval);
00503 }

static void sis900_mdio_reset ( long  mdio_addr  )  [static]

Definition at line 522 of file sis900.c.

References MDC, MDDIR, MDIO, outl, and sis900_mdio_delay.

Referenced by sis900_mdio_read().

00523 {
00524     int i;
00525 
00526     for (i = 31; i >= 0; i--) {
00527         outl(MDDIR | MDIO, mdio_addr);
00528         sis900_mdio_delay();
00529         outl(MDDIR | MDIO | MDC, mdio_addr);
00530         sis900_mdio_delay();
00531     }
00532     return;
00533 }

static void sis900_mdio_idle ( long  mdio_addr  )  [static]

Definition at line 514 of file sis900.c.

References MDC, MDDIR, MDIO, outl, and sis900_mdio_delay.

Referenced by sis900_mdio_read().

00515 {
00516     outl(MDIO | MDDIR, mdio_addr);
00517     sis900_mdio_delay();
00518     outl(MDIO | MDDIR | MDC, mdio_addr);
00519 }

static u16 sis900_mdio_read ( int  phy_id,
int  location 
) [static]

Definition at line 535 of file sis900.c.

References inl, ioaddr, MDC, MDDIR, MDIO, mear, MIIpmdShift, MIIread, MIIregShift, outl, sis900_mdio_delay, sis900_mdio_idle(), sis900_mdio_reset(), and u16.

Referenced by amd79c901_read_mode(), ics1893_read_mode(), rtl8201_read_mode(), sis900_probe(), sis900_read_mode(), and vt6103_read_mode().

00536 {
00537     long mdio_addr = ioaddr + mear;
00538     int mii_cmd = MIIread|(phy_id<<MIIpmdShift)|(location<<MIIregShift);
00539     u16 retval = 0;
00540     int i;
00541 
00542     sis900_mdio_reset(mdio_addr);
00543     sis900_mdio_idle(mdio_addr);
00544 
00545     for (i = 15; i >= 0; i--) {
00546         int dataval = (mii_cmd & (1 << i)) ? MDDIR | MDIO : MDDIR;
00547         outl(dataval, mdio_addr);
00548         sis900_mdio_delay();
00549         outl(dataval | MDC, mdio_addr);
00550         sis900_mdio_delay();
00551     }
00552 
00553     /* Read the 16 data bits. */
00554     for (i = 16; i > 0; i--) {
00555         outl(0, mdio_addr);
00556         sis900_mdio_delay();
00557         retval = (retval << 1) | ((inl(mdio_addr) & MDIO) ? 1 : 0);
00558         outl(MDC, mdio_addr);
00559         sis900_mdio_delay();
00560     }
00561     outl(0x00, mdio_addr);
00562     return retval;
00563 }

static void sis900_init ( struct nic nic  )  [static]

Definition at line 619 of file sis900.c.

References cr, inl, ioaddr, outl, RxENA, sis900_check_mode(), sis900_init_rxd(), sis900_init_rxfilter(), sis900_init_txd(), sis900_reset(), and sis900_set_rx_mode().

Referenced by sis900_disable(), and sis900_probe().

00620 {
00621     /* Soft reset the chip. */
00622     sis900_reset(nic);
00623 
00624     sis900_init_rxfilter(nic);
00625 
00626     sis900_init_txd(nic);
00627     sis900_init_rxd(nic);
00628 
00629     sis900_set_rx_mode(nic);
00630 
00631     sis900_check_mode(nic);
00632 
00633     outl(RxENA| inl(ioaddr + cr), ioaddr + cr);
00634 }

static void sis900_reset ( struct nic nic  )  [static]

Referenced by sis900_init().

static void sis900_init_rxfilter ( struct nic nic  )  [static]

Definition at line 681 of file sis900.c.

References inl, ioaddr, nic::node_addr, outl, printf(), RFADDR_shift, rfcr, rfdr, RFEN, sis900_debug, u16, and u32.

Referenced by sis900_init().

00682 {
00683     u32 rfcrSave;
00684     int i;
00685         
00686     rfcrSave = inl(rfcr + ioaddr);
00687 
00688     /* disable packet filtering before setting filter */
00689     outl(rfcrSave & ~RFEN, rfcr + ioaddr);
00690 
00691     /* load MAC addr to filter data register */
00692     for (i = 0 ; i < 3 ; i++) {
00693         u32 w;
00694 
00695         w = (u32) *((u16 *)(nic->node_addr)+i);
00696         outl((i << RFADDR_shift), ioaddr + rfcr);
00697         outl(w, ioaddr + rfdr);
00698 
00699         if (sis900_debug > 0)
00700             printf("sis900_init_rxfilter: Receive Filter Addrss[%d]=%X\n",
00701                    i, inl(ioaddr + rfdr));
00702     }
00703 
00704     /* enable packet filitering */
00705     outl(rfcrSave | RFEN, rfcr + ioaddr);
00706 }

static void sis900_init_txd ( struct nic nic  )  [static]

Referenced by sis900_init().

static void sis900_init_rxd ( struct nic nic  )  [static]

Referenced by sis900_init().

static void sis900_set_rx_mode ( struct nic nic  )  [static]

Referenced by sis900_init().

static void sis900_check_mode ( struct nic nic  )  [static]

Definition at line 824 of file sis900.c.

References cfg, mii_phy::chip_info, cur_phy, DMA_BURST_512, DMA_BURST_64, EDB_MASTER_EN, FDX_CAPABLE_FULL_SELECTED, HW_SPEED_10_MBPS, HW_SPEED_HOME, inl, ioaddr, mii, outl, mii_chip_info::read_mode, RxATX, rxcfg, RxDRNT_10, RxDRNT_100, RxDRNT_shift, RxMXDMA_shift, TX_FILL_THRESH, TxATP, txcfg, TxCSI, TxDRNT_10, TxDRNT_100, TxDRNT_shift, TxFILLT_shift, TxHBI, TxMXDMA_shift, and u32.

Referenced by sis900_init().

00825 {
00826     int speed, duplex;
00827     u32 tx_flags = 0, rx_flags = 0;
00828 
00829     mii.chip_info->read_mode(nic, cur_phy, &speed, &duplex);
00830 
00831     if( inl(ioaddr + cfg) & EDB_MASTER_EN ) {
00832         tx_flags = TxATP | (DMA_BURST_64 << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift);
00833         rx_flags = DMA_BURST_64 << RxMXDMA_shift;
00834     }
00835     else {
00836             tx_flags = TxATP | (DMA_BURST_512 << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift);
00837             rx_flags = DMA_BURST_512 << RxMXDMA_shift;
00838     }
00839 
00840     if (speed == HW_SPEED_HOME || speed == HW_SPEED_10_MBPS) {
00841         rx_flags |= (RxDRNT_10 << RxDRNT_shift);
00842         tx_flags |= (TxDRNT_10 << TxDRNT_shift);
00843     }
00844     else {
00845         rx_flags |= (RxDRNT_100 << RxDRNT_shift);
00846         tx_flags |= (TxDRNT_100 << TxDRNT_shift);
00847     }
00848 
00849     if (duplex == FDX_CAPABLE_FULL_SELECTED) {
00850         tx_flags |= (TxCSI | TxHBI);
00851         rx_flags |= RxATX;
00852     }
00853 
00854     outl (tx_flags, ioaddr + txcfg);
00855     outl (rx_flags, ioaddr + rxcfg);
00856 }

static void sis900_transmit ( struct nic nic,
const char *  d,
unsigned int  t,
unsigned int  s,
const char *  p 
) [static]

Definition at line 1104 of file sis900.c.

References ABORT, cr, currticks(), DSIZE, ETH_ALEN, ETH_HLEN, ETH_ZLEN, htons, imr, inl, ioaddr, memcpy, nic::node_addr, outl, OWCOLL, OWN, printf(), sis900_debug, TX_TIMEOUT, txb, txd, TxDIS, txdp, TxENA, u32, UNDERRUN, and virt_to_bus().

01109 {
01110     u32 to, nstype;
01111     volatile u32 tx_status;
01112     
01113     /* Stop the transmitter */
01114     outl(TxDIS | inl(ioaddr + cr), ioaddr + cr);
01115 
01116     /* load Transmit Descriptor Register */
01117     outl(virt_to_bus(&txd), ioaddr + txdp); 
01118     if (sis900_debug > 1)
01119         printf("sis900_transmit: TX descriptor register loaded with: %X\n", 
01120                inl(ioaddr + txdp));
01121 
01122     memcpy(txb, d, ETH_ALEN);
01123     memcpy(txb + ETH_ALEN, nic->node_addr, ETH_ALEN);
01124     nstype = htons(t);
01125     memcpy(txb + 2 * ETH_ALEN, (char*)&nstype, 2);
01126     memcpy(txb + ETH_HLEN, p, s);
01127 
01128     s += ETH_HLEN;
01129     s &= DSIZE;
01130 
01131     if (sis900_debug > 1)
01132         printf("sis900_transmit: sending %d bytes ethtype %hX\n", (int) s, t);
01133 
01134     /* pad to minimum packet size */
01135     while (s < ETH_ZLEN)  
01136         txb[s++] = '\0';
01137 
01138     /* set the transmit buffer descriptor and enable Transmit State Machine */
01139     txd.bufptr = virt_to_bus(&txb[0]);
01140     txd.cmdsts = (u32) OWN | s;
01141 
01142     /* restart the transmitter */
01143     outl(TxENA | inl(ioaddr + cr), ioaddr + cr);
01144 
01145     if (sis900_debug > 1)
01146         printf("sis900_transmit: Queued Tx packet size %d.\n", (int) s);
01147 
01148     to = currticks() + TX_TIMEOUT;
01149 
01150     while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to))
01151         /* wait */ ;
01152 
01153     if (currticks() >= to) {
01154         printf("sis900_transmit: TX Timeout! Tx status %X.\n", 
01155                (unsigned int) tx_status);
01156     }
01157     
01158     if (tx_status & (ABORT | UNDERRUN | OWCOLL)) {
01159         /* packet unsuccessfully transmited */
01160         printf("sis900_transmit: Transmit error, Tx status %X.\n", 
01161                (unsigned int) tx_status);
01162     }
01163     /* Disable interrupts by clearing the interrupt mask. */
01164     outl(0, ioaddr + imr);
01165 }

static int sis900_poll ( struct nic nic,
int  retrieve 
) [static]

Definition at line 1183 of file sis900.c.

References ABORT, cr, CRC_SIZE, CRCERR, cur_rx, DSIZE, FAERR, inl, ioaddr, isr, memcpy, NUM_RX_DESC, outl, OVERRUN, OWN, nic::packet, nic::packetlen, printf(), RUNT, RX_BUF_SIZE, rxb, rxd, RxENA, RXISERR, sis900_debug, TOOLONG, u32, and virt_to_bus().

01184 {
01185     u32 rx_status = rxd[cur_rx].cmdsts;
01186     u32 intr_status;
01187     int retstat = 0;
01188 
01189      /* acknowledge interrupts by reading interrupt status register */
01190     intr_status = inl(ioaddr + isr);
01191 
01192     if (sis900_debug > 2)
01193         printf("sis900_poll: cur_rx:%d, status:%X\n", cur_rx, 
01194                (unsigned int) rx_status);
01195 
01196     if (!(rx_status & OWN))
01197         return retstat;
01198 
01199     if (sis900_debug > 1)
01200         printf("sis900_poll: got a packet: cur_rx:%d, status:%X\n",
01201                cur_rx, (unsigned int) rx_status);
01202 
01203     if ( ! retrieve ) return 1;
01204     
01205     nic->packetlen = (rx_status & DSIZE) - CRC_SIZE;
01206 
01207     if (rx_status & (ABORT|OVERRUN|TOOLONG|RUNT|RXISERR|CRCERR|FAERR)) {
01208         /* corrupted packet received */
01209         printf("sis900_poll: Corrupted packet received, buffer status = %X\n",
01210                (unsigned int) rx_status);
01211         retstat = 0;
01212     } else {
01213         /* give packet to higher level routine */
01214         memcpy(nic->packet, (rxb + cur_rx*RX_BUF_SIZE), nic->packetlen);
01215         retstat = 1;
01216     }
01217 
01218     /* return the descriptor and buffer to receive ring */
01219     rxd[cur_rx].cmdsts = RX_BUF_SIZE;
01220     rxd[cur_rx].bufptr = virt_to_bus(&rxb[cur_rx*RX_BUF_SIZE]);
01221         
01222     if (++cur_rx == NUM_RX_DESC)
01223         cur_rx = 0;
01224 
01225     /* re-enable the potentially idle receive state machine */
01226     outl(RxENA | inl(ioaddr + cr), ioaddr + cr);
01227 
01228     return retstat;
01229 
01230 }

static void sis900_disable ( struct nic nic  )  [static]

Definition at line 1243 of file sis900.c.

References cr, ier, imr, inl, ioaddr, outl, RxDIS, sis900_init(), and TxDIS.

01243                                    {
01244 
01245     sis900_init(nic);
01246 
01247     /* Disable interrupts by clearing the interrupt mask. */
01248     outl(0, ioaddr + imr);
01249     outl(0, ioaddr + ier);
01250     
01251     /* Stop the chip's Tx and Rx Status Machine */
01252     outl(RxDIS | TxDIS | inl(ioaddr + cr), ioaddr + cr);
01253 }

static void sis900_irq ( struct nic nic,
irq_action_t  action 
) [static]

static int sis900_get_mac_addr ( struct pci_device *pci_dev  __unused,
struct nic nic 
) [static]

sis900_get_mac_addr: - Get MAC address for stand alone SiS900 model : the sis900 pci device : the net device to get address for

Older SiS900 and friends, use EEPROM to store MAC address. MAC address is read from read_eeprom() into ->dev_addr.

Definition at line 180 of file sis900.c.

References EEPROMMACAddr, EEPROMSignature, nic::node_addr, printf(), sis900_read_eeprom(), and u16.

Referenced by sis900_probe().

00181 {
00182         u16 signature;
00183         int i;
00184 
00185         /* check to see if we have sane EEPROM */
00186         signature = (u16) sis900_read_eeprom( EEPROMSignature);
00187         if (signature == 0xffff || signature == 0x0000) {
00188                 printf ("sis900_probe: Error EERPOM read %hX\n", signature);
00189                 return 0;
00190         }
00191 
00192         /* get MAC address from EEPROM */
00193         for (i = 0; i < 3; i++)
00194                         ((u16 *)(nic->node_addr))[i] = sis900_read_eeprom(i+EEPROMMACAddr);
00195         return 1;
00196 }

static int sis96x_get_mac_addr ( struct pci_device *pci_dev  __unused,
struct nic nic 
) [static]

sis96x_get_mac_addr: - Get MAC address for SiS962 or SiS963 model : the sis900 pci device : the net device to get address for

SiS962 or SiS963 model, use EEPROM to store MAC address. And EEPROM is shared by LAN and 1394. When access EEPROM, send EEREQ signal to hardware first and wait for EEGNT. If EEGNT is ON, EEPROM is permitted to be access by LAN, otherwise is not. After MAC address is read from EEPROM, send EEDONE signal to refuse EEPROM access by LAN. The EEPROM map of SiS962 or SiS963 is different to SiS900. The signature field in SiS962 or SiS963 spec is meaningless. MAC address is read into ->dev_addr.

Definition at line 214 of file sis900.c.

References EEDONE, EEGNT, EEPROMMACAddr, EEREQ, inl, ioaddr, mear, nic::node_addr, outl, printf(), sis900_read_eeprom(), u16, u32, and udelay().

Referenced by sis900_probe().

00215 {
00216 /*      long ioaddr = net_dev->base_addr; */
00217         long ee_addr = ioaddr + mear;
00218         u32 waittime = 0;
00219         int i;
00220         
00221         printf("Alternate function\n");
00222 
00223         outl(EEREQ, ee_addr);
00224         while(waittime < 2000) {
00225                 if(inl(ee_addr) & EEGNT) {
00226 
00227                         /* get MAC address from EEPROM */
00228                         for (i = 0; i < 3; i++)
00229                                 ((u16 *)(nic->node_addr))[i] = sis900_read_eeprom(i+EEPROMMACAddr);
00230 
00231                         outl(EEDONE, ee_addr);
00232                         return 1;
00233                 } else {
00234                         udelay(1);      
00235                         waittime ++;
00236                 }
00237         }
00238         outl(EEDONE, ee_addr);
00239         return 0;
00240 }

static int sis630e_get_mac_addr ( struct pci_device *pci_dev  __unused,
struct nic nic 
) [static]

sis630e_get_mac_addr: - Get MAC address for SiS630E model : the sis900 pci device : the net device to get address for

SiS630E model, use APC CMOS RAM to store MAC address. APC CMOS RAM is accessed through ISA bridge. MAC address is read into ->dev_addr.

Definition at line 252 of file sis900.c.

References ETH_ALEN, inb, memset(), nic::node_addr, outb, pci_read_config_byte(), pci_write_config_byte(), and u8.

Referenced by sis900_probe().

00253 {
00254 #if 0
00255         u8 reg;
00256         int i;
00257         struct bus_loc bus_loc;
00258         union {
00259             struct bus_dev bus_dev;
00260             struct pci_device isa_bridge;
00261         } u;
00262 
00263         /* find PCI to ISA bridge */
00264         memset(&bus_loc, 0, sizeof(bus_loc));
00265         if ( ! find_by_driver ( &bus_loc, &u.bus_dev, &sis_bridge_driver, 0 ) )
00266             return 0;
00267 
00268         pci_read_config_byte(&u.isa_bridge, 0x48, &reg);
00269         pci_write_config_byte(&u.isa_bridge, 0x48, reg | 0x40);
00270 
00271         for (i = 0; i < ETH_ALEN; i++)
00272         {
00273                 outb(0x09 + i, 0x70);
00274                 ((u8 *)(nic->node_addr))[i] = inb(0x71);
00275         }
00276         pci_write_config_byte(&u.isa_bridge, 0x48, reg & ~0x40);
00277 
00278         return 1;
00279 #endif
00280 
00281         /* Does not work with current bus/device model */
00282         memset ( nic->node_addr, 0, sizeof ( nic->node_addr ) );
00283         return 0;
00284 }

static int sis635_get_mac_addr ( struct pci_device *pci_dev  __unused,
struct nic nic 
) [static]

sis630e_get_mac_addr: - Get MAC address for SiS630E model : the sis900 pci device : the net device to get address for

SiS630E model, use APC CMOS RAM to store MAC address. APC CMOS RAM is accessed through ISA bridge. MAC address is read into ->dev_addr.

Definition at line 296 of file sis900.c.

References cr, inl, inw, ioaddr, nic::node_addr, outl, RELOAD, RFADDR_shift, rfcr, rfdr, RFEN, u16, and u32.

Referenced by sis900_probe().

00297 {
00298         u32 rfcrSave;
00299         u32 i;
00300         
00301         
00302         rfcrSave = inl(rfcr + ioaddr);
00303 
00304         outl(rfcrSave | RELOAD, ioaddr + cr);
00305         outl(0, ioaddr + cr);
00306 
00307         /* disable packet filtering before setting filter */
00308         outl(rfcrSave & ~RFEN, rfcr + ioaddr);
00309 
00310         /* load MAC addr to filter data register */
00311         for (i = 0 ; i < 3 ; i++) {
00312                 outl((i << RFADDR_shift), ioaddr + rfcr);
00313                 *( ((u16 *)nic->node_addr) + i) = inw(ioaddr + rfdr);
00314         }
00315 
00316         /* enable packet filitering */
00317         outl(rfcrSave | RFEN, rfcr + ioaddr);
00318 
00319         return 1;
00320 }

static void sis900_reset ( struct nic *nic  __unused  )  [static]

Definition at line 648 of file sis900.c.

References cfg, cr, ier, imr, inl, ioaddr, isr, outl, pci_revision, PESEL, RESET, rfcr, RND_CNT, RxRCMP, RxRESET, SIS635A_900_REV, SIS900B_900_REV, TxRCMP, TxRESET, and u32.

00649 {
00650     int i = 0;
00651     u32 status = TxRCMP | RxRCMP;
00652 
00653     outl(0, ioaddr + ier);
00654     outl(0, ioaddr + imr);
00655     outl(0, ioaddr + rfcr);
00656 
00657     outl(RxRESET | TxRESET | RESET | inl(ioaddr + cr), ioaddr + cr);
00658 
00659     /* Check that the chip has finished the reset. */
00660     while (status && (i++ < 1000)) {
00661         status ^= (inl(isr + ioaddr) & status);
00662     }
00663 
00664     if( (pci_revision >= SIS635A_900_REV) || (pci_revision == SIS900B_900_REV) )
00665             outl(PESEL | RND_CNT, ioaddr + cfg);
00666     else
00667             outl(PESEL, ioaddr + cfg);
00668 }

static void sis900_init_txd ( struct nic *nic  __unused  )  [static]

Definition at line 720 of file sis900.c.

References inl, ioaddr, outl, printf(), sis900_debug, txb, txd, txdp, u32, and virt_to_bus().

00721 {
00722     txd.link   = (u32) 0;
00723     txd.cmdsts = (u32) 0;
00724     txd.bufptr = virt_to_bus(&txb[0]);
00725 
00726     /* load Transmit Descriptor Register */
00727     outl(virt_to_bus(&txd), ioaddr + txdp); 
00728     if (sis900_debug > 0)
00729         printf("sis900_init_txd: TX descriptor register loaded with: %X\n", 
00730                inl(ioaddr + txdp));
00731 }

static void sis900_init_rxd ( struct nic *nic  __unused  )  [static]

Definition at line 744 of file sis900.c.

References cur_rx, inl, ioaddr, NUM_RX_DESC, outl, printf(), RX_BUF_SIZE, rxb, rxd, rxdp, sis900_debug, u32, and virt_to_bus().

00745 { 
00746     int i;
00747 
00748     cur_rx = 0; 
00749 
00750     /* init RX descriptor */
00751     for (i = 0; i < NUM_RX_DESC; i++) {
00752         rxd[i].link   = virt_to_bus((i+1 < NUM_RX_DESC) ? &rxd[i+1] : &rxd[0]);
00753         rxd[i].cmdsts = (u32) RX_BUF_SIZE;
00754         rxd[i].bufptr = virt_to_bus(&rxb[i*RX_BUF_SIZE]);
00755         if (sis900_debug > 0)
00756             printf("sis900_init_rxd: rxd[%d]=%p link=%X cmdsts=%X bufptr=%X\n", 
00757                    i, &rxd[i], (unsigned int) rxd[i].link, (unsigned int) rxd[i].cmdsts,
00758                    (unsigned int) rxd[i].bufptr);
00759     }
00760 
00761     /* load Receive Descriptor Register */
00762     outl(virt_to_bus(&rxd[0]), ioaddr + rxdp);
00763 
00764     if (sis900_debug > 0)
00765         printf("sis900_init_rxd: RX descriptor register loaded with: %X\n", 
00766                inl(ioaddr + rxdp));
00767 
00768 }

static void sis900_set_rx_mode ( struct nic *nic  __unused  )  [static]

Definition at line 782 of file sis900.c.

References ioaddr, outl, pci_revision, RFAAB, RFAAM, RFADDR_shift, rfcr, rfdr, RFEN, SIS635A_900_REV, SIS900B_900_REV, u16, and u32.

00783 {
00784     int i, table_entries;
00785     u32 rx_mode; 
00786     u16 mc_filter[16] = {0};    /* 256/128 bits multicast hash table */
00787         
00788     if((pci_revision == SIS635A_900_REV) || (pci_revision == SIS900B_900_REV))
00789         table_entries = 16;
00790     else
00791         table_entries = 8;
00792 
00793     /* accept all multicast packet */
00794     rx_mode = RFAAB | RFAAM;
00795     for (i = 0; i < table_entries; i++)
00796                 mc_filter[i] = 0xffff;
00797                                         
00798     /* update Multicast Hash Table in Receive Filter */
00799     for (i = 0; i < table_entries; i++) {
00800         /* why plus 0x04? That makes the correct value for hash table. */
00801         outl((u32)(0x00000004+i) << RFADDR_shift, ioaddr + rfcr);
00802         outl(mc_filter[i], ioaddr + rfdr);
00803     }
00804 
00805     /* Accept Broadcast and multicast packets, destination addresses that match 
00806        our MAC address */
00807     outl(RFEN | rx_mode, ioaddr + rfcr);
00808 
00809     return;
00810 }

static void sis900_read_mode ( struct nic *nic  __unused,
int  phy_addr,
int *  speed,
int *  duplex 
) [static]

Definition at line 870 of file sis900.c.

References FDX_CAPABLE_FULL_SELECTED, FDX_CAPABLE_HALF_SELECTED, HW_SPEED_100_MBPS, HW_SPEED_10_MBPS, MII_CNTL_FDX, MII_CONTROL, MII_NWAY_T_FDX, MII_NWAY_TX, MII_NWAY_TX_FDX, MII_PHY_ID0, MII_PHY_ID1, MII_STSOUT, MII_STSOUT_LINK_FAIL, printf(), sis900_mdio_read(), u16, and u32.

00871 {
00872     int i = 0;
00873     u32 status;
00874     u16 phy_id0, phy_id1;
00875         
00876     /* STSOUT register is Latched on Transition, read operation updates it */
00877     do {
00878         status = sis900_mdio_read(phy_addr, MII_STSOUT);
00879     } while (i++ < 2);
00880 
00881     *speed = HW_SPEED_10_MBPS;
00882     *duplex = FDX_CAPABLE_HALF_SELECTED;
00883     
00884     if (status & (MII_NWAY_TX | MII_NWAY_TX_FDX))
00885         *speed = HW_SPEED_100_MBPS;
00886     if (status & ( MII_NWAY_TX_FDX | MII_NWAY_T_FDX))
00887         *duplex = FDX_CAPABLE_FULL_SELECTED;
00888         
00889     /* Workaround for Realtek RTL8201 PHY issue */
00890     phy_id0 = sis900_mdio_read(phy_addr, MII_PHY_ID0);
00891     phy_id1 = sis900_mdio_read(phy_addr, MII_PHY_ID1);
00892     if((phy_id0 == 0x0000) && ((phy_id1 & 0xFFF0) == 0x8200)){
00893         if(sis900_mdio_read(phy_addr, MII_CONTROL) & MII_CNTL_FDX)
00894             *duplex = FDX_CAPABLE_FULL_SELECTED;
00895         if(sis900_mdio_read(phy_addr, 0x0019) & 0x01)
00896             *speed = HW_SPEED_100_MBPS;
00897     }
00898 
00899     if (status & MII_STSOUT_LINK_FAIL)
00900         printf("sis900_read_mode: Media Link Off\n");
00901     else
00902         printf("sis900_read_mode: Media Link On %s %s-duplex \n", 
00903                *speed == HW_SPEED_100_MBPS ? 
00904                "100mbps" : "10mbps",
00905                *duplex == FDX_CAPABLE_FULL_SELECTED ?
00906                "full" : "half");
00907 }

static void amd79c901_read_mode ( struct nic *nic  __unused,
int  phy_addr,
int *  speed,
int *  duplex 
) [static]

Definition at line 921 of file sis900.c.

References FDX_CAPABLE_FULL_SELECTED, FDX_CAPABLE_HALF_SELECTED, HW_SPEED_100_MBPS, HW_SPEED_10_MBPS, HW_SPEED_HOME, MII_STAT_CAN_AUTO, MII_STAT_LINK, MII_STATUS, MII_STATUS_SUMMARY, MII_STSSUM_DPLX, MII_STSSUM_LINK, MII_STSSUM_SPD, printf(), sis900_mdio_read(), and u16.

00922 {
00923     int i;
00924     u16 status;
00925         
00926     for (i = 0; i < 2; i++)
00927         status = sis900_mdio_read(phy_addr, MII_STATUS);
00928 
00929     if (status & MII_STAT_CAN_AUTO) {
00930         /* 10BASE-T PHY */
00931         for (i = 0; i < 2; i++)
00932             status = sis900_mdio_read(phy_addr, MII_STATUS_SUMMARY);
00933         if (status & MII_STSSUM_SPD)
00934             *speed = HW_SPEED_100_MBPS;
00935         else
00936             *speed = HW_SPEED_10_MBPS;
00937         if (status & MII_STSSUM_DPLX)
00938             *duplex = FDX_CAPABLE_FULL_SELECTED;
00939         else
00940             *duplex = FDX_CAPABLE_HALF_SELECTED;
00941 
00942         if (status & MII_STSSUM_LINK)
00943             printf("amd79c901_read_mode: Media Link On %s %s-duplex \n", 
00944                    *speed == HW_SPEED_100_MBPS ? 
00945                    "100mbps" : "10mbps",
00946                    *duplex == FDX_CAPABLE_FULL_SELECTED ?
00947                    "full" : "half");
00948         else
00949             printf("amd79c901_read_mode: Media Link Off\n");
00950     }
00951     else {
00952         /* HomePNA */
00953         *speed = HW_SPEED_HOME;
00954         *duplex = FDX_CAPABLE_HALF_SELECTED;
00955         if (status & MII_STAT_LINK)
00956             printf("amd79c901_read_mode:Media Link On 1mbps half-duplex \n");
00957         else
00958             printf("amd79c901_read_mode: Media Link Off\n");
00959     }
00960 }

static void ics1893_read_mode ( struct nic *nic  __unused,
int  phy_addr,
int *  speed,
int *  duplex 
) [static]

ics1893_read_mode: - read media mode for ICS1893 PHY : the net device to read mode for : mii phy address : the transmit speed to be determined : the duplex mode to be determined

ICS1893 PHY use Quick Poll Detailed Status register to determine the speed and duplex mode for sis900

Definition at line 974 of file sis900.c.

References FDX_CAPABLE_FULL_SELECTED, FDX_CAPABLE_HALF_SELECTED, HW_SPEED_100_MBPS, HW_SPEED_10_MBPS, MII_QPDSTS, MII_STSICS_DPLX, MII_STSICS_LINKSTS, MII_STSICS_SPD, printf(), sis900_mdio_read(), and u32.

00975 {
00976         int i = 0;
00977         u32 status;
00978 
00979         /* MII_QPDSTS is Latched, read twice in succession will reflect the current state */
00980         for (i = 0; i < 2; i++)
00981                 status = sis900_mdio_read(phy_addr, MII_QPDSTS);
00982 
00983         if (status & MII_STSICS_SPD)
00984                 *speed = HW_SPEED_100_MBPS;
00985         else
00986                 *speed = HW_SPEED_10_MBPS;
00987 
00988         if (status & MII_STSICS_DPLX)
00989                 *duplex = FDX_CAPABLE_FULL_SELECTED;
00990         else
00991                 *duplex = FDX_CAPABLE_HALF_SELECTED;
00992 
00993         if (status & MII_STSICS_LINKSTS)
00994                 printf("ics1893_read_mode: Media Link On %s %s-duplex \n",
00995                        *speed == HW_SPEED_100_MBPS ?
00996                        "100mbps" : "10mbps",
00997                        *duplex == FDX_CAPABLE_FULL_SELECTED ?
00998                        "full" : "half");
00999         else
01000                 printf("ics1893_read_mode: Media Link Off\n");
01001 }

static void rtl8201_read_mode ( struct nic *nic  __unused,
int  phy_addr,
int *  speed,
int *  duplex 
) [static]

rtl8201_read_mode: - read media mode for rtl8201 phy : the net device to read mode for : mii phy address : the transmit speed to be determined : the duplex mode to be determined

read MII_STATUS register from rtl8201 phy to determine the speed and duplex mode for sis900

Definition at line 1014 of file sis900.c.

References FDX_CAPABLE_FULL_SELECTED, FDX_CAPABLE_HALF_SELECTED, HW_SPEED_100_MBPS, HW_SPEED_10_MBPS, MII_STAT_CAN_T, MII_STAT_CAN_T_FDX, MII_STAT_CAN_TX, MII_STAT_CAN_TX_FDX, MII_STAT_LINK, MII_STATUS, printf(), sis900_mdio_read(), and u32.

01015 {
01016         u32 status;
01017 
01018         status = sis900_mdio_read(phy_addr, MII_STATUS);
01019 
01020         if (status & MII_STAT_CAN_TX_FDX) {
01021                 *speed = HW_SPEED_100_MBPS;
01022                 *duplex = FDX_CAPABLE_FULL_SELECTED;
01023         }
01024         else if (status & MII_STAT_CAN_TX) {
01025                 *speed = HW_SPEED_100_MBPS;
01026                 *duplex = FDX_CAPABLE_HALF_SELECTED;
01027         }
01028         else if (status & MII_STAT_CAN_T_FDX) {
01029                 *speed = HW_SPEED_10_MBPS;
01030                 *duplex = FDX_CAPABLE_FULL_SELECTED;
01031         }
01032         else if (status & MII_STAT_CAN_T) {
01033                 *speed = HW_SPEED_10_MBPS;
01034                 *duplex = FDX_CAPABLE_HALF_SELECTED;
01035         }
01036 
01037         if (status & MII_STAT_LINK)
01038                 printf("rtl8201_read_mode: Media Link On %s %s-duplex \n",
01039                        *speed == HW_SPEED_100_MBPS ?
01040                        "100mbps" : "10mbps",
01041                        *duplex == FDX_CAPABLE_FULL_SELECTED ?
01042                        "full" : "half");
01043         else
01044                 printf("rtl8201_read_config_mode: Media Link Off\n");
01045 }

static void vt6103_read_mode ( struct nic *nic  __unused,
int  phy_addr,
int *  speed,
int *  duplex 
) [static]

vt6103_read_mode: - read media mode for vt6103 phy : the net device to read mode for : mii phy address : the transmit speed to be determined : the duplex mode to be determined

read MII_STATUS register from rtl8201 phy to determine the speed and duplex mode for sis900

Definition at line 1058 of file sis900.c.

References FDX_CAPABLE_FULL_SELECTED, FDX_CAPABLE_HALF_SELECTED, HW_SPEED_100_MBPS, HW_SPEED_10_MBPS, MII_STAT_CAN_T, MII_STAT_CAN_T_FDX, MII_STAT_CAN_TX, MII_STAT_CAN_TX_FDX, MII_STAT_LINK, MII_STATUS, printf(), sis900_mdio_read(), and u32.

01059 {
01060         u32 status;
01061 
01062         status = sis900_mdio_read(phy_addr, MII_STATUS);
01063 
01064         if (status & MII_STAT_CAN_TX_FDX) {
01065                 *speed = HW_SPEED_100_MBPS;
01066                 *duplex = FDX_CAPABLE_FULL_SELECTED;
01067         }
01068         else if (status & MII_STAT_CAN_TX) {
01069                 *speed = HW_SPEED_100_MBPS;
01070                 *duplex = FDX_CAPABLE_HALF_SELECTED;
01071         }
01072         else if (status & MII_STAT_CAN_T_FDX) {
01073                 *speed = HW_SPEED_10_MBPS;
01074                 *duplex = FDX_CAPABLE_FULL_SELECTED;
01075         }
01076         else if (status & MII_STAT_CAN_T) {
01077                 *speed = HW_SPEED_10_MBPS;
01078                 *duplex = FDX_CAPABLE_HALF_SELECTED;
01079         }
01080 
01081         if (status & MII_STAT_LINK)
01082                 printf("vt6103_read_mode: Media Link On %s %s-duplex \n",
01083                        *speed == HW_SPEED_100_MBPS ?
01084                        "100mbps" : "10mbps",
01085                        *duplex == FDX_CAPABLE_FULL_SELECTED ?
01086                        "full" : "half");
01087         else
01088                 printf("vt6103_read_config_mode: Media Link Off\n");
01089 }

static void sis900_irq ( struct nic *nic  __unused,
irq_action_t action  __unused 
) [static]

Definition at line 1267 of file sis900.c.

References DISABLE, ENABLE, FORCE, imr, ioaddr, outl, RxERR, RxOK, RxORN, RxSOVR, TxERR, TxIDLE, and TxURN.

01268 {
01269   switch ( action ) {
01270   case DISABLE :
01271     outl(0, ioaddr + imr);
01272     break;
01273   case ENABLE :
01274     outl((RxSOVR|RxORN|RxERR|RxOK|TxURN|TxERR|TxIDLE), ioaddr + imr);
01275     break;
01276   case FORCE :
01277     break;
01278   }
01279 }

PCI_DRIVER ( sis900_driver  ,
sis900_nics  ,
PCI_NO_CLASS   
)

DRIVER ( "SIS900"  ,
nic_driver  ,
pci_driver  ,
sis900_driver  ,
sis900_probe  ,
sis900_disable   
)


Variable Documentation

static struct nic_operations sis900_operations [static, read]

Initial value:

 {
        .connect        = dummy_connect,
        .poll           = sis900_poll,
        .transmit       = sis900_transmit,
        .irq            = sis900_irq,
}

Definition at line 56 of file sis900.c.

Referenced by sis900_probe().

int sis900_debug = 0 [static]

unsigned short vendor [static]

Definition at line 60 of file sis900.c.

unsigned short dev_id [static]

Definition at line 60 of file sis900.c.

unsigned long ioaddr [static]

Definition at line 61 of file sis900.c.

u8 pci_revision [static]

Definition at line 62 of file sis900.c.

Referenced by sis900_probe(), sis900_reset(), and sis900_set_rx_mode().

unsigned int cur_phy [static]

Definition at line 64 of file sis900.c.

Referenced by sis900_check_mode(), and sis900_probe().

unsigned int cur_rx [static]

Definition at line 66 of file sis900.c.

Definition at line 69 of file sis900.c.

BufferDesc rxd[NUM_RX_DESC]

Definition at line 70 of file sis900.c.

unsigned char txb[TX_BUF_SIZE]

Definition at line 71 of file sis900.c.

unsigned char rxb[NUM_RX_DESC *RX_BUF_SIZE]

Definition at line 72 of file sis900.c.

struct { ... } __shared

struct mii_chip_info mii_chip_table[] [static]

struct mii_phy mii [static]

struct pci_device_id sis900_nics[] [static]

Initial value:

 {
PCI_ROM(0x1039, 0x0900, "sis900",  "SIS900", 0),
PCI_ROM(0x1039, 0x7016, "sis7016", "SIS7016", 0),
}

Definition at line 1288 of file sis900.c.


Generated on Tue Apr 6 20:01:39 2010 for gPXE by  doxygen 1.5.7.1