|
iPXE
|
Go to the source code of this file.
Data Structures | |
| struct | netdev_desc |
| struct | sundance_bss |
| struct | sundance_private |
Macros | |
| #define | drv_version "v1.12" |
| #define | drv_date "2004-03-21" |
| #define | HZ 100 |
| #define | virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) |
| #define | le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) |
| #define | TX_RING_SIZE 2 |
| #define | TX_QUEUE_LEN 10 /* Limit ring entries actually used. */ |
| #define | RX_RING_SIZE 4 |
| #define | TX_TIME_OUT (4*HZ) |
| #define | PKT_BUF_SZ 1536 |
| #define | rx_tx_buf NIC_FAKE_BSS ( struct sundance_bss ) |
| #define | rxb rx_tx_buf.rxb |
| #define | txb rx_tx_buf.txb |
| #define | EEPROM_SIZE 128 |
| #define | PCI_IOTYPE (PCI_USES_MASTER | PCI_USES_IO | PCI_ADDR0) |
| #define | MII_CNT 4 |
| #define | EEPROM_SA_OFFSET 0x10 |
| #define | DEFAULT_INTR |
| #define | mdio_in(mdio_addr) inb(mdio_addr) |
| #define | mdio_out(value, mdio_addr) outb(value, mdio_addr) |
| #define | mdio_delay(mdio_addr) inb(mdio_addr) |
| #define | MDIO_EnbIn (0) |
| #define | MDIO_WRITE0 (MDIO_EnbOutput) |
| #define | MDIO_WRITE1 (MDIO_Data | MDIO_EnbOutput) |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER) | |
| static int | eeprom_read (long ioaddr, int location) |
| static int | mdio_read (struct nic *nic, int phy_id, unsigned int location) |
| static void | mdio_write (struct nic *nic, int phy_id, unsigned int location, int value) |
| static void | set_rx_mode (struct nic *nic) |
| static void | check_duplex (struct nic *nic) |
| static void | init_ring (struct nic *nic __unused) |
| static void | sundance_reset (struct nic *nic) |
| static void | sundance_irq (struct nic *nic, irq_action_t action) |
| static int | sundance_poll (struct nic *nic, int retrieve) |
| static void | sundance_transmit (struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p) |
| static void | sundance_disable (struct nic *nic __unused, void *hwdev __unused) |
| static int | sundance_probe (struct nic *nic, struct pci_device *pci) |
| static void | mdio_sync (long mdio_addr) |
| static int | mdio_read (struct nic *nic __unused, int phy_id, unsigned int location) |
| static void | mdio_write (struct nic *nic __unused, int phy_id, unsigned int location, int value) |
| static void | set_rx_mode (struct nic *nic __unused) |
| PCI_DRIVER (sundance_driver, sundance_nics, PCI_NO_CLASS) | |
| DRIVER ("SUNDANCE/PCI", nic_driver, pci_driver, sundance_driver, sundance_probe, sundance_disable, rx_tx_buf) | |
Variables | |
| static int | mtu = 1514 |
| static int | rx_copybreak = 0 |
| static int | flowctrl = 1 |
| static char | media [] = "autosense" |
| static struct netdev_desc | tx_ring [TX_RING_SIZE] |
| static struct netdev_desc | rx_ring [RX_RING_SIZE] |
| static u32 | BASE |
| static struct sundance_private | sdx |
| static struct sundance_private * | sdc |
| static struct nic_operations | sundance_operations |
| static struct pci_device_id | sundance_nics [] |
| #define drv_version "v1.12" |
Definition at line 54 of file sundance.c.
| #define drv_date "2004-03-21" |
Definition at line 55 of file sundance.c.
| #define HZ 100 |
Definition at line 57 of file sundance.c.
| #define virt_to_le32desc | ( | addr | ) | cpu_to_le32(virt_to_bus(addr)) |
Definition at line 60 of file sundance.c.
| #define le32desc_to_virt | ( | addr | ) | bus_to_virt(le32_to_cpu(addr)) |
Definition at line 61 of file sundance.c.
| #define TX_RING_SIZE 2 |
Definition at line 92 of file sundance.c.
| #define TX_QUEUE_LEN 10 /* Limit ring entries actually used. */ |
Definition at line 93 of file sundance.c.
| #define RX_RING_SIZE 4 |
Definition at line 94 of file sundance.c.
| #define TX_TIME_OUT (4*HZ) |
Definition at line 99 of file sundance.c.
| #define PKT_BUF_SZ 1536 |
Definition at line 100 of file sundance.c.
| #define rx_tx_buf NIC_FAKE_BSS ( struct sundance_bss ) |
Definition at line 240 of file sundance.c.
| #define rxb rx_tx_buf.rxb |
Definition at line 241 of file sundance.c.
| #define txb rx_tx_buf.txb |
Definition at line 242 of file sundance.c.
| #define EEPROM_SIZE 128 |
Definition at line 246 of file sundance.c.
| #define PCI_IOTYPE (PCI_USES_MASTER | PCI_USES_IO | PCI_ADDR0) |
Definition at line 255 of file sundance.c.
| #define MII_CNT 4 |
Definition at line 257 of file sundance.c.
| #define EEPROM_SA_OFFSET 0x10 |
Definition at line 281 of file sundance.c.
| #define DEFAULT_INTR |
Definition at line 282 of file sundance.c.
| #define mdio_in | ( | mdio_addr | ) | inb(mdio_addr) |
Definition at line 776 of file sundance.c.
Definition at line 777 of file sundance.c.
| #define mdio_delay | ( | mdio_addr | ) | inb(mdio_addr) |
Definition at line 778 of file sundance.c.
| #define MDIO_EnbIn (0) |
Definition at line 784 of file sundance.c.
| #define MDIO_WRITE0 (MDIO_EnbOutput) |
Definition at line 785 of file sundance.c.
| #define MDIO_WRITE1 (MDIO_Data | MDIO_EnbOutput) |
Definition at line 786 of file sundance.c.
| enum alta_offsets |
Definition at line 110 of file sundance.c.
| enum ASICCtrl_HiWord_bit |
| Enumerator | |
|---|---|
| GlobalReset | |
| RxReset | |
| TxReset | |
| DMAReset | |
| FIFOReset | |
| NetworkReset | |
| HostReset | |
| ResetBusy | |
Definition at line 166 of file sundance.c.
| enum intr_status_bits |
Definition at line 178 of file sundance.c.
| enum rx_mode_bits |
| Enumerator | |
|---|---|
| AcceptAllIPMulti | |
| AcceptMultiHash | |
| AcceptAll | |
| AcceptBroadcast | |
| AcceptMulticast | |
| AcceptMyPhys | |
| AcceptErr | |
| AcceptRunt | |
| AcceptBroadcast | |
| AcceptMulticast | |
| AcceptAllPhys | |
| AcceptMyPhys | |
Definition at line 187 of file sundance.c.
| enum mac_ctrl0_bits |
| Enumerator | |
|---|---|
| EnbFullDuplex | |
| EnbRcvLargeFrame | |
| EnbFlowCtrl | |
| EnbPassRxCRC | |
Definition at line 193 of file sundance.c.
| enum mac_ctrl1_bits |
| Enumerator | |
|---|---|
| StatsEnable | |
| StatsDisable | |
| StatsEnabled | |
| TxEnable | |
| TxDisable | |
| TxEnabled | |
| RxEnable | |
| RxDisable | |
| RxEnabled | |
Definition at line 197 of file sundance.c.
| enum desc_status_bits |
Definition at line 215 of file sundance.c.
| enum pci_id_flags_bits |
Definition at line 248 of file sundance.c.
| Enumerator | |
|---|---|
| CanHaveMII | |
| KendinPktDropBug | |
| CanHaveMII | |
| HasBrokenTx | |
Definition at line 254 of file sundance.c.
| enum mii_reg_bits |
| Enumerator | |
|---|---|
| MDIO_ShiftClk | |
| MDIO_Data | |
| MDIO_EnbOutput | |
| MDIO_ShiftClk | |
| MDIO_DataIn | |
| MDIO_DataOut | |
| MDIO_EnbOutput | |
| MDIO_EnbIn | |
Definition at line 780 of file sundance.c.
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
|
static |
Definition at line 753 of file sundance.c.
References EECtrl, EEData, inw(), ioaddr, and outw.
Referenced by sundance_probe().
|
static |
Referenced by check_duplex(), and sundance_probe().
|
static |
Referenced by sundance_probe().
|
static |
Referenced by sundance_reset().
|
static |
Definition at line 292 of file sundance.c.
References mii_if_info::advertising, sundance_private::an_enable, BASE, DBG, EnbFullDuplex, mii_if_info::full_duplex, inw(), MACCtrl0, mdio_read(), sundance_private::mii_if, MII_LPA, sundance_private::nic_name, outw, sundance_private::phys, and sdc.
Referenced by sundance_probe().
Definition at line 323 of file sundance.c.
References netdev_desc::addr, cpu_to_le32, sundance_private::cur_rx, LastFrag, netdev_desc::length, netdev_desc::next_desc, PKT_BUF_SZ, rx_ring, RX_RING_SIZE, rxb, sdc, netdev_desc::status, tx_ring, txb, virt_to_bus(), and virt_to_le32desc.
Referenced by sundance_reset().
|
static |
Definition at line 365 of file sundance.c.
References ASICCtrl, BASE, DBG, DebugCtrl1, DownCounter, init_ring(), inl(), inw(), MACCtrl0, MACCtrl1, MaxFrameSize, sundance_private::mtu, sundance_private::nic_name, nic::node_addr, outb, outl, outw, sundance_private::pci_rev_id, rx_ring, RxDMAPollPeriod, RxEnable, RxListPtr, RxStatus, sdc, set_rx_mode(), StationAddr, txb, TxEnable, TxStatus, virt_to_le32desc, and writeb().
Referenced by sundance_probe().
|
static |
Definition at line 425 of file sundance.c.
References ASICCtrl, BASE, DEFAULT_INTR, DISABLE, ENABLE, FORCE, IntrEnable, IntrStatus, inw(), nic::ioaddr, and outw.
|
static |
Definition at line 445 of file sundance.c.
References cpu_to_le32, sundance_private::cur_rx, DBG, DEFAULT_INTR, DescOwn, IntrRxDMADone, IntrRxDone, IntrStatus, inw(), nic::ioaddr, LastFrag, le32_to_cpu, netdev_desc::length, memcpy(), outw, nic::packet, nic::packetlen, PKT_BUF_SZ, pkt_len, printf(), rx_copybreak, rx_ring, RX_RING_SIZE, rxb, sdc, status, and netdev_desc::status.
|
static |
Definition at line 492 of file sundance.c.
References BASE, cpu_to_le32, currticks(), ETH_ALEN, ETH_HLEN, ETH_ZLEN, htons, LastFrag, netdev_desc::length, MACCtrl1, memcpy(), nic::node_addr, outl, outw, printf(), status, netdev_desc::status, tx_ring, TX_TIME_OUT, txb, TxDisable, TxEnable, TxListPtr, TxStatus, and virt_to_le32desc.
Definition at line 540 of file sundance.c.
References BASE, IntrEnable, MACCtrl1, outw, RxDisable, StatsDisable, and TxDisable.
|
static |
Definition at line 567 of file sundance.c.
References adjust_pci_device(), ADVERTISE_100FULL, ADVERTISE_100HALF, ADVERTISE_10FULL, ADVERTISE_10HALF, mii_if_info::advertising, sundance_private::an_enable, ASICCtrl, BASE, BMCR_FULLDPLX, BMCR_SPEED100, check_duplex(), DBG, pci_device::device, ee_data, eeprom_read(), EEPROM_SA_OFFSET, EEPROM_SIZE, EnbFlowCtrl, ETH_ALEN, flowctrl, sundance_private::flowctrl, mii_if_info::full_duplex, pci_device::id, inl(), inw(), nic::ioaddr, pci_device::ioaddr, pci_device::irq, nic::irqno, le16_to_cpu, MACCtrl0, mdio_read(), mdio_write(), media, MII_ADVERTISE, MII_BMCR, MII_BMSR, MII_CNT, sundance_private::mii_if, MII_LPA, sundance_private::mii_preamble_required, mtu, sundance_private::mtu, MulticastFilter1, pci_device_id::name, sundance_private::nic_name, nic::nic_op, nic::node_addr, outw, pci_read_config_byte(), sundance_private::pci_rev_id, PCI_REVISION, mii_if_info::phy_id, sundance_private::phys, printf(), ResetBusy, sdc, sdx, sundance_private::speed, strcasecmp(), sundance_operations, sundance_reset(), udelay(), and pci_device::vendor.
|
static |
Definition at line 790 of file sundance.c.
References bits, mdio_delay, mdio_out, MDIO_ShiftClk, and MDIO_WRITE1.
Referenced by mdio_read(), and mdio_write().
Definition at line 804 of file sundance.c.
References BASE, MDIO_Data, mdio_delay, MDIO_EnbIn, mdio_in, mdio_out, MDIO_ShiftClk, mdio_sync(), MDIO_WRITE0, MDIO_WRITE1, sundance_private::mii_preamble_required, MIICtrl, retval, and sdc.
|
static |
Definition at line 836 of file sundance.c.
References BASE, mdio_delay, MDIO_EnbIn, mdio_out, MDIO_ShiftClk, mdio_sync(), MDIO_WRITE0, MDIO_WRITE1, sundance_private::mii_preamble_required, MIICtrl, sdc, and value.
Definition at line 866 of file sundance.c.
References AcceptBroadcast, AcceptMulticast, AcceptMyPhys, BASE, sundance_private::flowctrl, mii_if_info::full_duplex, memset(), sundance_private::mii_if, MulticastFilter0, outb, outw, RxMode, and sdc.
| PCI_DRIVER | ( | sundance_driver | , |
| sundance_nics | , | ||
| PCI_NO_CLASS | |||
| ) |
| DRIVER | ( | "SUNDANCE/PCI" | , |
| nic_driver | , | ||
| pci_driver | , | ||
| sundance_driver | , | ||
| sundance_probe | , | ||
| sundance_disable | , | ||
| rx_tx_buf | |||
| ) |
|
static |
Definition at line 64 of file sundance.c.
Referenced by sundance_probe().
|
static |
Definition at line 74 of file sundance.c.
Referenced by sundance_poll().
|
static |
Definition at line 75 of file sundance.c.
Referenced by sundance_probe(), tg3_fiber_aneg_smachine(), tg3_phy_autoneg_cfg(), tg3_setup_fiber_hw_autoneg(), and tg3_setup_flow_control().
|
static |
Definition at line 85 of file sundance.c.
Referenced by parse_eeprom(), pcnet32_chip_detect(), smc9000_probe(), and sundance_probe().
|
static |
Definition at line 229 of file sundance.c.
Referenced by init_ring(), and sundance_transmit().
|
static |
Definition at line 232 of file sundance.c.
Referenced by init_ring(), sundance_poll(), and sundance_reset().
|
static |
Definition at line 245 of file sundance.c.
Referenced by check_duplex(), mdio_read(), mdio_write(), set_rx_mode(), sundance_disable(), sundance_irq(), sundance_probe(), sundance_reset(), and sundance_transmit().
|
static |
Referenced by sundance_probe().
|
static |
Definition at line 278 of file sundance.c.
Referenced by check_duplex(), init_ring(), mdio_read(), mdio_write(), set_rx_mode(), sundance_poll(), sundance_probe(), and sundance_reset().
|
static |
Definition at line 556 of file sundance.c.
Referenced by sundance_probe().
|
static |
Definition at line 883 of file sundance.c.
1.8.15