|
iPXE
|
Go to the source code of this file.
Data Structures | |
| struct | tx_desc |
| struct | rx_desc |
| struct | dmfe_private |
| struct | dmfe_bss |
Macros | |
| #define | dprintf(x) |
| #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 | PCI_DM9132_ID 0x91321282 /* Davicom DM9132 ID */ |
| #define | PCI_DM9102_ID 0x91021282 /* Davicom DM9102 ID */ |
| #define | PCI_DM9100_ID 0x91001282 /* Davicom DM9100 ID */ |
| #define | PCI_DM9009_ID 0x90091282 /* Davicom DM9009 ID */ |
| #define | DM9102_IO_SIZE 0x80 |
| #define | DM9102A_IO_SIZE 0x100 |
| #define | TX_MAX_SEND_CNT 0x1 /* Maximum tx packet per time */ |
| #define | TX_DESC_CNT 0x10 /* Allocated Tx descriptors */ |
| #define | RX_DESC_CNT 0x20 /* Allocated Rx descriptors */ |
| #define | TX_FREE_DESC_CNT (TX_DESC_CNT - 2) /* Max TX packet count */ |
| #define | TX_WAKE_DESC_CNT (TX_DESC_CNT - 3) /* TX wakeup count */ |
| #define | DESC_ALL_CNT (TX_DESC_CNT + RX_DESC_CNT) |
| #define | TX_BUF_ALLOC 0x600 |
| #define | RX_ALLOC_SIZE 0x620 |
| #define | DM910X_RESET 1 |
| #define | CR0_DEFAULT 0x00E00000 /* TX & RX burst mode */ |
| #define | CR6_DEFAULT 0x00080000 /* HD */ |
| #define | CR7_DEFAULT 0x180c1 |
| #define | CR15_DEFAULT 0x06 /* TxJabber RxWatchdog */ |
| #define | TDES0_ERR_MASK 0x4302 /* TXJT, LC, EC, FUE */ |
| #define | MAX_PACKET_SIZE 1514 |
| #define | DMFE_MAX_MULTICAST 14 |
| #define | RX_COPY_SIZE 100 |
| #define | MAX_CHECK_PACKET 0x8000 |
| #define | DM9801_NOISE_FLOOR 8 |
| #define | DM9802_NOISE_FLOOR 5 |
| #define | DMFE_10MHF 0 |
| #define | DMFE_100MHF 1 |
| #define | DMFE_10MFD 4 |
| #define | DMFE_100MFD 5 |
| #define | DMFE_AUTO 8 |
| #define | DMFE_1M_HPNA 0x10 |
| #define | DMFE_TXTH_72 0x400000 /* TX TH 72 byte */ |
| #define | DMFE_TXTH_96 0x404000 /* TX TH 96 byte */ |
| #define | DMFE_TXTH_128 0x0000 /* TX TH 128 byte */ |
| #define | DMFE_TXTH_256 0x4000 /* TX TH 256 byte */ |
| #define | DMFE_TXTH_512 0x8000 /* TX TH 512 byte */ |
| #define | DMFE_TXTH_1K 0xC000 /* TX TH 1K byte */ |
| #define | DMFE_TIMER_WUT (jiffies + HZ * 1) /* timer wakeup time : 1 second */ |
| #define | DMFE_TX_TIMEOUT ((3*HZ)/2) /* tx packet time-out time 1.5 s" */ |
| #define | DMFE_TX_KICK (HZ/2) /* tx packet Kick-out time 0.5 s" */ |
| #define | DMFE_DBUG(dbug_now, msg, value) if (dmfe_debug || (dbug_now)) printk(KERN_ERR DRV_NAME ": %s %lx\n", (msg), (long) (value)) |
| #define | SHOW_MEDIA_TYPE(mode) printk(KERN_ERR DRV_NAME ": Change Speed to %sMhz %s duplex\n",mode & 1 ?"100":"10", mode & 4 ? "full":"half"); |
| #define | CR9_SROM_READ 0x4800 |
| #define | CR9_SRCS 0x1 |
| #define | CR9_SRCLK 0x2 |
| #define | CR9_CRDOUT 0x8 |
| #define | SROM_DATA_0 0x0 |
| #define | SROM_DATA_1 0x4 |
| #define | PHY_DATA_1 0x20000 |
| #define | PHY_DATA_0 0x00000 |
| #define | MDCLKH 0x10000 |
| #define | PHY_POWER_DOWN 0x800 |
| #define | SROM_V41_CODE 0x14 |
| #define | SROM_CLK_WRITE(data, ioaddr) outl(data|CR9_SROM_READ|CR9_SRCS,ioaddr);udelay(5);outl(data|CR9_SROM_READ|CR9_SRCS|CR9_SRCLK,ioaddr);udelay(5);outl(data|CR9_SROM_READ|CR9_SRCS,ioaddr);udelay(5); |
| #define | __CHK_IO_SIZE(pci_id, dev_rev) ( ((pci_id)==PCI_DM9132_ID) || ((dev_rev) >= 0x02000030) ) ? DM9102A_IO_SIZE: DM9102_IO_SIZE |
| #define | CHK_IO_SIZE(pci_dev, dev_rev) __CHK_IO_SIZE(((pci_dev)->device << 16) | (pci_dev)->vendor, dev_rev) |
| #define | DEVICE net_device |
| #define | dmfe_bufs NIC_FAKE_BSS ( struct dmfe_bss ) |
| #define | txd dmfe_bufs.txd |
| #define | txb dmfe_bufs.txb |
| #define | rxd dmfe_bufs.rxd |
| #define | rxb dmfe_bufs.rxb |
| #define | board_found 1 |
| #define | valid_link 0 |
Enumerations | |
| enum | dmfe_offsets { DCR0 = 0x00, DCR1 = 0x08, DCR2 = 0x10, DCR3 = 0x18, DCR4 = 0x20, DCR5 = 0x28, DCR6 = 0x30, DCR7 = 0x38, DCR8 = 0x40, DCR9 = 0x48, DCR10 = 0x50, DCR11 = 0x58, DCR12 = 0x60, DCR13 = 0x68, DCR14, DCR15 = 0x78 } |
| enum | dmfe_CR6_bits { CR6_RXSC = 0x2, CR6_PBF = 0x8, CR6_PM = 0x40, CR6_PAM = 0x80, CR6_FDM = 0x200, CR6_TXSC = 0x2000, CR6_STI = 0x100000, CR6_SFT = 0x200000, CR6_RXA = 0x40000000, CR6_NO_PURGE = 0x20000000 } |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER) | |
| static u16 | read_srom_word (long ioaddr, int offset) |
| static void | dmfe_init_dm910x (struct nic *nic) |
| static void | dmfe_descriptor_init (struct nic *, unsigned long ioaddr) |
| static void | update_cr6 (u32, unsigned long) |
| static void | send_filter_frame (struct nic *nic) |
| static void | dm9132_id_table (struct nic *nic) |
| static u16 | phy_read (unsigned long, u8, u8, u32) |
| static void | phy_write (unsigned long, u8, u8, u16, u32) |
| static void | phy_write_1bit (unsigned long, u32) |
| static u16 | phy_read_1bit (unsigned long) |
| static void | dmfe_set_phyxcer (struct nic *nic) |
| static void | dmfe_parse_srom (struct nic *nic) |
| static void | dmfe_program_DM9801 (struct nic *nic, int) |
| static void | dmfe_program_DM9802 (struct nic *nic) |
| static void | dmfe_reset (struct nic *nic) |
| static int | dmfe_poll (struct nic *nic, int retrieve) |
| static void | dmfe_irq (struct nic *nic __unused, irq_action_t action __unused) |
| static void | dmfe_transmit (struct nic *nic, const char *dest, unsigned int type, unsigned int size, const char *packet) |
| static void | dmfe_disable (struct nic *nic __unused, void *hwdev __unused) |
| static int | dmfe_probe (struct nic *nic, struct pci_device *pci) |
| static void | dmfe_descriptor_init (struct nic *nic __unused, unsigned long ioaddr) |
| static void | dm9132_id_table (struct nic *nic __unused) |
| static void | dmfe_set_phyxcer (struct nic *nic __unused) |
| static void | dmfe_program_DM9801 (struct nic *nic __unused, int HPNA_rev) |
| static void | dmfe_program_DM9802 (struct nic *nic __unused) |
| PCI_DRIVER (dmfe_driver, dmfe_nics, PCI_NO_CLASS) | |
| DRIVER ("DMFE/PCI", nic_driver, pci_driver, dmfe_driver, dmfe_probe, dmfe_disable, dmfe_bufs) | |
Variables | |
| static struct dmfe_private | dfx |
| static struct dmfe_private * | db |
| static struct nic_operations | dmfe_operations |
| static unsigned char | dmfe_media_mode = DMFE_AUTO |
| static u32 | dmfe_cr6_user_set |
| static u8 | chkmode = 1 |
| static u8 | HPNA_mode |
| static u8 | HPNA_rx_cmd |
| static u8 | HPNA_tx_cmd |
| static u8 | HPNA_NoiseFloor |
| static u8 | SF_mode |
| static long int | BASE |
| static struct pci_device_id | dmfe_nics [] |
| #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_FREE_DESC_CNT (TX_DESC_CNT - 2) /* Max TX packet count */ |
| #define TX_WAKE_DESC_CNT (TX_DESC_CNT - 3) /* TX wakeup count */ |
| #define DESC_ALL_CNT (TX_DESC_CNT + RX_DESC_CNT) |
| #define __CHK_IO_SIZE | ( | pci_id, | |
| dev_rev | |||
| ) | ( ((pci_id)==PCI_DM9132_ID) || ((dev_rev) >= 0x02000030) ) ? DM9102A_IO_SIZE: DM9102_IO_SIZE |
| #define CHK_IO_SIZE | ( | pci_dev, | |
| dev_rev | |||
| ) | __CHK_IO_SIZE(((pci_dev)->device << 16) | (pci_dev)->vendor, dev_rev) |
| #define DEVICE net_device |
| #define dmfe_bufs NIC_FAKE_BSS ( struct dmfe_bss ) |
| enum dmfe_offsets |
| Enumerator | |
|---|---|
| DCR0 | |
| DCR1 | |
| DCR2 | |
| DCR3 | |
| DCR4 | |
| DCR5 | |
| DCR6 | |
| DCR7 | |
| DCR8 | |
| DCR9 | |
| DCR10 | |
| DCR11 | |
| DCR12 | |
| DCR13 | |
| DCR14 | |
| DCR15 | |
Definition at line 179 of file dmfe.c.
| enum dmfe_CR6_bits |
| Enumerator | |
|---|---|
| CR6_RXSC | |
| CR6_PBF | |
| CR6_PM | |
| CR6_PAM | |
| CR6_FDM | |
| CR6_TXSC | |
| CR6_STI | |
| CR6_SFT | |
| CR6_RXA | |
| CR6_NO_PURGE | |
Definition at line 187 of file dmfe.c.
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
|
static |
Definition at line 664 of file dmfe.c.
References CR9_CRDOUT, CR9_SRCLK, CR9_SRCS, CR9_SROM_READ, DCR9, inl(), ioaddr, offset, outl, SROM_CLK_WRITE, SROM_DATA_0, SROM_DATA_1, and udelay().
Referenced by dmfe_probe().
|
static |
Definition at line 278 of file dmfe.c.
References BASE, dmfe_private::chip_id, dmfe_private::cr0_data, dmfe_private::cr15_data, dmfe_private::cr6_data, CR6_RXSC, CR6_TXSC, dmfe_private::cr7_data, CR7_DEFAULT, db, DCR0, DCR12, DCR15, DCR3, DCR4, DCR7, DM910X_RESET, dm9132_id_table(), DMFE_AUTO, dmfe_descriptor_init(), dmfe_media_mode, dmfe_parse_srom(), dmfe_set_phyxcer(), ioaddr, mdelay(), dmfe_private::media_mode, dmfe_private::op_mode, outl, PCI_DM9009_ID, PCI_DM9132_ID, dmfe_private::phy_addr, rxd, send_filter_frame(), txd, udelay(), update_cr6(), and virt_to_le32desc.
Referenced by dmfe_reset().
|
static |
Referenced by dmfe_init_dm910x().
|
static |
Definition at line 562 of file dmfe.c.
References DCR6, ioaddr, outl, and udelay().
Referenced by dmfe_init_dm910x(), dmfe_parse_srom(), dmfe_set_phyxcer(), and send_filter_frame().
|
static |
Definition at line 630 of file dmfe.c.
References BASE, cpu_to_le32, dmfe_private::cr6_data, dmfe_private::cur_tx, db, DCR1, dprintf, nic::node_addr, outl, txb, txd, and update_cr6().
Referenced by dmfe_init_dm910x().
|
static |
Referenced by dmfe_init_dm910x().
Definition at line 936 of file dmfe.c.
References DCR9, inw(), ioaddr, offset, PCI_DM9132_ID, PHY_DATA_0, PHY_DATA_1, phy_read_1bit(), and phy_write_1bit().
Referenced by dmfe_parse_srom(), dmfe_program_DM9801(), dmfe_program_DM9802(), and dmfe_set_phyxcer().
|
static |
Definition at line 882 of file dmfe.c.
References DCR9, ioaddr, offset, outw, PCI_DM9132_ID, PHY_DATA_0, PHY_DATA_1, and phy_write_1bit().
Referenced by dmfe_disable(), dmfe_program_DM9801(), dmfe_program_DM9802(), and dmfe_set_phyxcer().
|
static |
Definition at line 993 of file dmfe.c.
References ioaddr, MDCLKH, outl, and udelay().
Referenced by phy_read(), and phy_write().
|
static |
Definition at line 1008 of file dmfe.c.
References inl(), ioaddr, outl, and udelay().
Referenced by phy_read().
|
static |
Referenced by dmfe_init_dm910x().
|
static |
Definition at line 1026 of file dmfe.c.
References BASE, dmfe_private::chip_id, dmfe_private::cr15_data, CR15_DEFAULT, dmfe_private::cr6_data, db, DMFE_100MFD, DMFE_100MHF, DMFE_10MFD, DMFE_1M_HPNA, dmfe_media_mode, dmfe_program_DM9801(), dmfe_program_DM9802(), dmfe_private::HPNA_command, HPNA_mode, dmfe_private::HPNA_present, HPNA_rx_cmd, dmfe_private::HPNA_timer, HPNA_tx_cmd, dmfe_private::NIC_capability, dmfe_private::phy_addr, phy_read(), dmfe_private::PHY_reg4, SF_mode, dmfe_private::srom, SROM_V41_CODE, and update_cr6().
Referenced by dmfe_init_dm910x().
|
static |
Referenced by dmfe_parse_srom().
|
static |
Referenced by dmfe_parse_srom().
|
static |
Definition at line 246 of file dmfe.c.
References dmfe_private::chip_id, dmfe_private::chip_revision, chkmode, dmfe_private::cr0_data, CR0_DEFAULT, dmfe_private::cr6_data, CR6_DEFAULT, CR6_SFT, db, dmfe_private::dm910x_chk_mode, dmfe_cr6_user_set, dmfe_init_dm910x(), DMFE_TXTH_256, dmfe_private::NIC_capability, PCI_DM9132_ID, and dmfe_private::PHY_reg4.
Referenced by dmfe_probe().
|
static |
Definition at line 345 of file dmfe.c.
References cpu_to_le32, dmfe_private::cr6_data, CR6_PM, dmfe_private::cur_rx, db, dmfe_private::dm910x_chk_mode, le32_to_cpu, memcpy(), nic::packet, nic::packetlen, printf(), rx_desc::rdes0, RX_ALLOC_SIZE, RX_DESC_CNT, rxb, rxd, and rxlen.
|
static |
|
static |
Definition at line 400 of file dmfe.c.
References BASE, cpu_to_le32, dmfe_private::cr7_data, dmfe_private::cur_tx, db, DCR1, DCR7, dest, ETH_ALEN, ETH_HLEN, ETH_ZLEN, htons, memcpy(), nic::node_addr, outl, size, TX_DESC_CNT, txb, txd, and type.
Definition at line 439 of file dmfe.c.
References BASE, dmfe_private::chip_id, db, DCR0, DM910X_RESET, outl, dmfe_private::phy_addr, phy_write(), and udelay().
|
static |
Definition at line 453 of file dmfe.c.
References adjust_pci_device(), BASE, dmfe_private::chip_id, dmfe_private::chip_revision, dmfe_private::chip_type, cpu_to_le16, db, DBG, pci_device::device, dfx, dmfe_operations, dmfe_reset(), dprintf, eth_ntoa(), pci_device::id, nic::ioaddr, pci_device::ioaddr, nic::irqno, pci_device_id::name, nic::nic_op, nic::node_addr, pci_bar_start(), PCI_BASE_ADDRESS_0, pci_read_config_dword(), PCI_REVISION, printf(), read_srom_word(), dmfe_private::srom, u32, and pci_device::vendor.
Definition at line 516 of file dmfe.c.
References cpu_to_le32, dmfe_private::cur_rx, dmfe_private::cur_tx, db, DCR3, DCR4, ioaddr, outl, RX_ALLOC_SIZE, RX_DESC_CNT, rxb, rxd, TX_DESC_CNT, txb, txd, virt_to_bus(), and virt_to_le32desc.
Definition at line 579 of file dmfe.c.
References BASE, dprintf, ioaddr, nic::node_addr, outw, printf(), and u16.
Definition at line 762 of file dmfe.c.
References BASE, dmfe_private::chip_id, dmfe_private::chip_type, dmfe_private::cr6_data, db, DMFE_100MFD, DMFE_100MHF, DMFE_10MFD, DMFE_10MHF, DMFE_AUTO, dmfe_private::media_mode, PCI_DM9009_ID, PCI_DM9102_ID, dmfe_private::phy_addr, phy_read(), dmfe_private::PHY_reg4, phy_write(), and update_cr6().
Definition at line 1152 of file dmfe.c.
References BASE, dmfe_private::chip_id, db, DM9801_NOISE_FLOOR, dmfe_private::HPNA_command, HPNA_NoiseFloor, dmfe_private::phy_addr, phy_read(), and phy_write().
Definition at line 1191 of file dmfe.c.
References BASE, dmfe_private::chip_id, db, DM9802_NOISE_FLOOR, dmfe_private::HPNA_command, HPNA_NoiseFloor, dmfe_private::phy_addr, phy_read(), and phy_write().
| PCI_DRIVER | ( | dmfe_driver | , |
| dmfe_nics | , | ||
| PCI_NO_CLASS | |||
| ) |
| DRIVER | ( | "DMFE/PCI" | , |
| nic_driver | , | ||
| pci_driver | , | ||
| dmfe_driver | , | ||
| dmfe_probe | , | ||
| dmfe_disable | , | ||
| dmfe_bufs | |||
| ) |
|
static |
Referenced by dmfe_probe().
|
static |
Definition at line 177 of file dmfe.c.
Referenced by dmfe_descriptor_init(), dmfe_disable(), dmfe_init_dm910x(), dmfe_parse_srom(), dmfe_poll(), dmfe_probe(), dmfe_program_DM9801(), dmfe_program_DM9802(), dmfe_reset(), dmfe_set_phyxcer(), dmfe_transmit(), efi_undi_get_init_info(), efi_undi_get_status(), efi_undi_issue(), efi_undi_receive(), efi_undi_station_address(), nii_get_init_info(), nii_get_station_address(), nii_initialise_flags(), nii_issue_cpb_db(), nii_issue_db(), nii_poll(), nii_poll_rx(), and send_filter_frame().
|
static |
Definition at line 194 of file dmfe.c.
Referenced by dmfe_probe().
|
static |
Definition at line 196 of file dmfe.c.
Referenced by dmfe_init_dm910x(), and dmfe_parse_srom().
|
static |
Definition at line 197 of file dmfe.c.
Referenced by dmfe_reset().
|
static |
Definition at line 200 of file dmfe.c.
Referenced by dmfe_reset().
|
static |
Definition at line 201 of file dmfe.c.
Referenced by dmfe_parse_srom().
|
static |
Definition at line 202 of file dmfe.c.
Referenced by dmfe_parse_srom().
|
static |
Definition at line 203 of file dmfe.c.
Referenced by dmfe_parse_srom().
|
static |
Definition at line 204 of file dmfe.c.
Referenced by dmfe_program_DM9801(), and dmfe_program_DM9802().
|
static |
Definition at line 205 of file dmfe.c.
Referenced by dmfe_parse_srom().
|
static |
Definition at line 227 of file dmfe.c.
Referenced by dm9132_id_table(), dmfe_disable(), dmfe_init_dm910x(), dmfe_parse_srom(), dmfe_probe(), dmfe_program_DM9801(), dmfe_program_DM9802(), dmfe_set_phyxcer(), dmfe_transmit(), and send_filter_frame().
|
static |
1.8.15