iPXE
|
#include "sis190.h"
Go to the source code of this file.
Macros | |
#define | ErrMask (OVRUN | SHORT | LIMIT | MIIER | NIBON | COLON | ABORT) |
#define | TxErrMask (WND | TABRT | FIFO | LINK) |
Functions | |
FILE_LICENCE (GPL_ANY) | |
static int | sis190_isa_bridge_probe (struct pci_device *pdev __unused) |
static void | sis190_isa_bridge_remove (struct pci_device *pdev __unused) |
static void | __mdio_cmd (void *ioaddr, u32 ctl) |
static void | mdio_write (void *ioaddr, int phy_id, int reg, int val) |
static int | mdio_read (void *ioaddr, int phy_id, int reg) |
static void | __mdio_write (struct net_device *dev, int phy_id, int reg, int val) |
static int | __mdio_read (struct net_device *dev, int phy_id, int reg) |
static u16 | mdio_read_latched (void *ioaddr, int phy_id, int reg) |
static u16 | sis190_read_eeprom (void *ioaddr, u32 reg) |
static void | sis190_irq_mask_and_ack (void *ioaddr) |
static void | sis190_asic_down (void *ioaddr) |
static void | sis190_mark_as_last_descriptor (struct RxDesc *desc) |
static void | sis190_give_to_asic (struct RxDesc *desc) |
static void | sis190_map_to_asic (struct RxDesc *desc, u32 mapping) |
static void | sis190_make_unusable_by_asic (struct RxDesc *desc) |
static struct io_buffer * | sis190_alloc_rx_iob (struct RxDesc *desc) |
static u32 | sis190_rx_fill (struct sis190_private *tp, u32 start, u32 end) |
static int | sis190_rx_pkt_err (u32 status) |
static int | sis190_process_rx (struct sis190_private *tp) |
static int | sis190_tx_pkt_err (u32 status) |
static void | sis190_process_tx (struct sis190_private *tp) |
static void | sis190_poll (struct net_device *dev) |
static void | sis190_init_ring_indexes (struct sis190_private *tp) |
static int | sis190_init_ring (struct net_device *dev) |
static void | sis190_set_rx_mode (struct net_device *dev) |
static void | sis190_soft_reset (void *ioaddr) |
static void | sis190_hw_start (struct net_device *dev) |
static void | sis190_phy_task (struct sis190_private *tp) |
static int | sis190_open (struct net_device *dev) |
static void | sis190_down (struct net_device *dev) |
static void | sis190_free (struct net_device *dev) |
static void | sis190_close (struct net_device *dev) |
static int | sis190_transmit (struct net_device *dev, struct io_buffer *iob) |
static void | sis190_free_phy (struct list_head *first_phy) |
static u16 | sis190_default_phy (struct sis190_private *tp) |
sis190_default_phy - Select default PHY for sis190 mac. More... | |
static void | sis190_init_phy (struct sis190_private *tp, struct sis190_phy *phy, unsigned int phy_id, u16 mii_status) |
static void | sis190_mii_probe_88e1111_fixup (struct sis190_private *tp) |
static int | sis190_mii_probe (struct net_device *dev) |
sis190_mii_probe - Probe MII PHY for sis190 @dev: the net device to probe for More... | |
static void | sis190_mii_remove (struct net_device *dev) |
static int | sis190_init_board (struct pci_device *pdev, struct net_device **netdev) |
static void | sis190_set_rgmii (struct sis190_private *tp, u8 reg) |
static int | sis190_get_mac_addr_from_eeprom (struct pci_device *pdev __unused, struct net_device *dev) |
static int | sis190_get_mac_addr_from_apc (struct pci_device *pdev, struct net_device *dev) |
sis190_get_mac_addr_from_apc - Get MAC address for SiS96x model @pdev: PCI device @dev: network device to get address for More... | |
static void | sis190_init_rxfilter (struct net_device *dev) |
sis190_init_rxfilter - Initialize the Rx filter @dev: network device to initialize More... | |
static int | sis190_get_mac_addr (struct pci_device *pdev, struct net_device *dev) |
static void | sis190_set_speed_auto (struct net_device *dev) |
static void | sis190_irq (struct net_device *dev, int enable) |
static int | sis190_probe (struct pci_device *pdev) |
static void | sis190_remove (struct pci_device *pdev) |
Variables | |
static struct pci_device_id | sis190_pci_tbl [] |
static struct pci_device_id | sis190_isa_bridge_tbl [] |
struct pci_driver sis190_isa_bridge_driver | __pci_driver |
static const u32 | sis190_intr_mask |
static struct net_device_operations | sis190_netdev_ops |
FILE_LICENCE | ( | GPL_ANY | ) |
|
static |
|
static |
|
static |
Definition at line 75 of file sis190.c.
References DBG, EhnMIInotDone, GMIIControl, mdelay(), SIS_R32, and SIS_W32.
Referenced by mdio_read(), and mdio_write().
|
static |
Definition at line 93 of file sis190.c.
References __mdio_cmd(), EhnMIIdataShift, EhnMIIpmdShift, EhnMIIregShift, EhnMIIreq, EhnMIIwrite, ioaddr, reg, and val.
Referenced by __mdio_write(), sis190_default_phy(), sis190_mii_probe_88e1111_fixup(), sis190_phy_task(), and sis190_set_speed_auto().
|
static |
Definition at line 100 of file sis190.c.
References __mdio_cmd(), EhnMIIdataShift, EhnMIIpmdShift, EhnMIIread, EhnMIIregShift, EhnMIIreq, GMIIControl, ioaddr, reg, and SIS_R32.
Referenced by __mdio_read(), mdio_read_latched(), sis190_default_phy(), sis190_init_phy(), sis190_phy_task(), and sis190_set_speed_auto().
|
static |
Definition at line 108 of file sis190.c.
References sis190_private::dev, mdio_write(), net_device::priv, reg, tp, and val.
Referenced by sis190_mii_probe().
|
static |
Definition at line 115 of file sis190.c.
References sis190_private::dev, mdio_read(), net_device::priv, reg, and tp.
Referenced by sis190_mii_probe().
|
static |
Definition at line 122 of file sis190.c.
References ioaddr, mdio_read(), and reg.
Referenced by sis190_default_phy(), sis190_mii_probe(), and sis190_phy_task().
Definition at line 128 of file sis190.c.
References data, EEREQ, EEROP, mdelay(), reg, ROMControl, ROMInterface, SIS_R32, and SIS_W32.
Referenced by sis190_get_mac_addr_from_eeprom().
|
static |
Definition at line 149 of file sis190.c.
References IntrMask, IntrStatus, SIS_PCI_COMMIT, and SIS_W32.
Referenced by sis190_asic_down(), and sis190_init_board().
|
static |
Definition at line 156 of file sis190.c.
References ioaddr, RxControl, sis190_irq_mask_and_ack(), SIS_W32, and TxControl.
Referenced by sis190_down(), and sis190_soft_reset().
|
inlinestatic |
Definition at line 166 of file sis190.c.
References cpu_to_le32, desc, and RingEnd.
Referenced by sis190_init_ring().
|
inlinestatic |
Definition at line 171 of file sis190.c.
References cpu_to_le32, desc, INTbit, le32_to_cpu, OWNbit, RingEnd, RX_BUF_MASK, RX_BUF_SIZE, and wmb().
Referenced by sis190_map_to_asic(), and sis190_process_rx().
Definition at line 181 of file sis190.c.
References cpu_to_le32, desc, and sis190_give_to_asic().
Referenced by sis190_alloc_rx_iob().
|
inlinestatic |
Definition at line 187 of file sis190.c.
References cpu_to_le32, desc, RingEnd, and wmb().
Referenced by sis190_alloc_rx_iob(), and sis190_process_rx().
Definition at line 196 of file sis190.c.
References alloc_iob(), io_buffer::data, DBG, desc, RX_BUF_SIZE, sis190_make_unusable_by_asic(), sis190_map_to_asic(), and virt_to_bus().
Referenced by sis190_rx_fill().
|
static |
Definition at line 214 of file sis190.c.
References end, NUM_RX_DESC, sis190_alloc_rx_iob(), start, and tp.
Referenced by sis190_init_ring(), and sis190_process_rx().
|
inlinestatic |
Definition at line 232 of file sis190.c.
References CRCOK, ErrMask, and status.
Referenced by sis190_process_rx().
|
static |
Definition at line 242 of file sis190.c.
References count, cur_rx, tulip_private::cur_rx, io_buffer::data, DBG, DBG2, DBGIO_HD, desc, iob_put, le32_to_cpu, netdev_rx(), NULL, NUM_RX_DESC, OWNbit, RX_BUF_SIZE, RxSizeMask, sis190_give_to_asic(), sis190_make_unusable_by_asic(), sis190_rx_fill(), sis190_rx_pkt_err(), status, and tp.
Referenced by sis190_poll().
|
inlinestatic |
Definition at line 295 of file sis190.c.
References status, and TxErrMask.
Referenced by sis190_process_tx().
|
static |
Definition at line 305 of file sis190.c.
References DBG, DBG2, EINVAL, le32_to_cpu, netdev_tx_complete(), netdev_tx_complete_err(), NULL, NUM_TX_DESC, OWNbit, pending, sis190_tx_pkt_err(), status, tp, and txd.
Referenced by sis190_poll().
|
static |
Definition at line 344 of file sis190.c.
References sis190_private::dev, IntrStatus, ioaddr, LinkChange, netdev_link_ok(), net_device::priv, RxQInt, sis190_phy_task(), sis190_process_rx(), sis190_process_tx(), SIS_R32, SIS_W32, status, tp, and TxQ0Int.
|
inlinestatic |
Definition at line 370 of file sis190.c.
References tulip_private::cur_rx, and tp.
Referenced by sis190_init_ring().
|
static |
Definition at line 375 of file sis190.c.
References sis190_private::dev, ENOMEM, memset(), NUM_RX_DESC, NUM_TX_DESC, net_device::priv, sis190_free(), sis190_init_ring_indexes(), sis190_mark_as_last_descriptor(), sis190_rx_fill(), and tp.
Referenced by sis190_open().
|
static |
Definition at line 396 of file sis190.c.
References AcceptBroadcast, AcceptMulticast, AcceptMyPhys, sis190_private::dev, ioaddr, net_device::priv, RxHashTable, RxMacControl, SIS_W16, SIS_W32, and tp.
Referenced by sis190_hw_start().
|
static |
Definition at line 412 of file sis190.c.
References IntrControl, ioaddr, sis190_asic_down(), SIS_PCI_COMMIT, and SIS_W32.
Referenced by sis190_hw_start(), sis190_init_board(), and sis190_remove().
|
static |
Definition at line 420 of file sis190.c.
References CmdTxEnb, sis190_private::dev, GMIIControl, IntrMask, IntrStatus, ioaddr, net_device::priv, RxControl, RxDescStartAddr, RxHashTable, RxMacControl, RxWolCtrl, RxWolData, sis190_set_rx_mode(), sis190_soft_reset(), SIS_PCI_COMMIT, SIS_W16, SIS_W32, tp, TxControl, TxDescStartAddr, and TxMacControl.
Referenced by sis190_open().
|
static |
Definition at line 448 of file sis190.c.
References ADVERTISE_1000FULL, ADVERTISE_1000HALF, BMCR_RESET, BMSR_ANEGCOMPLETE, DBG, net_device::dev, EXPANSION_NWAY, F_HAS_RGMII, F_PHY_BCM5461, ioaddr, LPA_1000FULL, LPA_1000HALF, LPA_100FULL, LPA_100HALF, LPA_10FULL, LPA_10HALF, LPA_NPAGE, mdelay(), mdio_read(), mdio_read_latched(), mdio_write(), MII_ADVERTISE, MII_BMCR, MII_BMSR, MII_CTRL1000, MII_EXPANSION, MII_LPA, MII_STAT1000, msg(), netdev_link_down(), netdev_link_up(), NULL, RGDelay, SIS_R32, SIS_W32, StationControl, tp, udelay(), and val.
Referenced by sis190_poll(), and sis190_probe().
|
static |
Definition at line 549 of file sis190.c.
References cpu_to_le32, DBG, sis190_private::dev, ENOMEM, error, malloc_phys(), out, net_device::priv, rc, RING_ALIGNMENT, RX_RING_BYTES, sis190_free(), sis190_hw_start(), sis190_init_ring(), sis190_init_rxfilter(), tp, TX_RING_BYTES, and virt_to_bus().
|
static |
Definition at line 588 of file sis190.c.
References sis190_private::dev, IntrMask, ioaddr, net_device::priv, sis190_asic_down(), SIS_R32, and tp.
Referenced by sis190_close().
|
static |
Definition at line 598 of file sis190.c.
References tulip_private::cur_rx, sis190_private::dev, free_iob(), free_phys(), NULL, NUM_RX_DESC, NUM_TX_DESC, net_device::priv, RX_RING_BYTES, tp, and TX_RING_BYTES.
Referenced by sis190_close(), sis190_init_ring(), and sis190_open().
|
static |
Definition at line 625 of file sis190.c.
References sis190_private::dev, sis190_down(), and sis190_free().
|
static |
Definition at line 631 of file sis190.c.
References CmdReset, CmdTxEnb, cpu_to_le32, CRCbit, io_buffer::data, DBG, DEFbit, desc, sis190_private::dev, EINVAL, ETH_ZLEN, INTbit, ioaddr, iob_len(), iob_pad(), le32_to_cpu, len, NUM_TX_DESC, OWNbit, PADbit, net_device::priv, RingEnd, SIS_W32, tp, TxControl, virt_to_bus(), and wmb().
|
static |
Definition at line 672 of file sis190.c.
References free, sis190_phy::list, list_for_each_entry_safe, and next.
Referenced by sis190_mii_probe(), and sis190_mii_remove().
|
static |
sis190_default_phy - Select default PHY for sis190 mac.
@dev: the net device to probe for
Select first detected PHY with link as default. If no one is link on, select PHY whose types is HOME as default. If HOME doesn't exist, select LAN.
Definition at line 689 of file sis190.c.
References BMCR_ANENABLE, BMCR_ISOLATE, BMSR_LSTATUS, DBG, HOME, ioaddr, LAN, list_entry, list_for_each_entry, mdio_read(), mdio_read_latched(), mdio_write(), MII_BMCR, MII_BMSR, NULL, mii_if_info::phy_id, sis190_phy::phy_id, status, tp, sis190_phy::type, and UNKNOWN.
Referenced by sis190_mii_probe().
|
static |
Definition at line 742 of file sis190.c.
References BMSR_100FULL, BMSR_100HALF, DBG, mii_chip_info::feature, HOME, sis190_phy::id, mii_chip_info::id, INIT_LIST_HEAD, ioaddr, LAN, sis190_phy::list, mdio_read(), mii_chip_table, MII_PHYSID1, MII_PHYSID2, MIX, mii_chip_info::name, sis190_phy::phy_id, sis190_phy::status, tp, sis190_phy::type, mii_chip_info::type, and UNKNOWN.
Referenced by sis190_mii_probe().
|
static |
Definition at line 778 of file sis190.c.
References F_HAS_RGMII, F_PHY_88E1111, ioaddr, mdio_write(), reg, tp, and udelay().
Referenced by sis190_mii_probe().
|
static |
sis190_mii_probe - Probe MII PHY for sis190 @dev: the net device to probe for
Search for total of 32 possible mii phy addresses. Identify and set current phy if found one, return error if it failed to found.
Definition at line 805 of file sis190.c.
References __mdio_read(), __mdio_write(), DBG, mii_if_info::dev, sis190_private::dev, EIO, ENOMEM, INIT_LIST_HEAD, ioaddr, sis190_phy::list, list_add, list_empty, mii_if_info::mdio_read, mdio_read_latched(), mii_if_info::mdio_write, MII_BMSR, MII_REG_ANY, out, mii_if_info::phy_id, sis190_phy::phy_id, PHY_ID_ANY, mii_if_info::phy_id_mask, PHY_MAX_ADDR, net_device::priv, rc, mii_if_info::reg_num_mask, sis190_default_phy(), sis190_free_phy(), sis190_init_phy(), sis190_mii_probe_88e1111_fixup(), status, tp, and zalloc().
Referenced by sis190_probe().
|
static |
Definition at line 859 of file sis190.c.
References sis190_private::dev, net_device::priv, sis190_free_phy(), and tp.
Referenced by sis190_probe(), and sis190_remove().
|
static |
Definition at line 866 of file sis190.c.
References adjust_pci_device(), alloc_etherdev(), DBG, pci_device::dev, net_device::dev, EIO, ENOMEM, ioaddr, pci_device::membase, memset(), netdev, pci_ioremap(), rc, sis190_irq_mask_and_ack(), SIS190_REGS_SIZE, sis190_soft_reset(), and tp.
Referenced by sis190_probe().
|
static |
Definition at line 911 of file sis190.c.
References F_HAS_RGMII, reg, and tp.
Referenced by sis190_get_mac_addr_from_apc(), and sis190_get_mac_addr_from_eeprom().
|
static |
Definition at line 916 of file sis190.c.
References cpu_to_le16, DBG, sis190_private::dev, EEPROMInfo, EEPROMMACAddr, EEPROMSignature, EIO, ETH_ALEN, net_device::hw_addr, ioaddr, net_device::priv, sig, sis190_read_eeprom(), sis190_set_rgmii(), tp, and u16.
Referenced by sis190_get_mac_addr().
|
static |
sis190_get_mac_addr_from_apc - Get MAC address for SiS96x model @pdev: PCI device @dev: network device to get address for
SiS96x model, use APC CMOS RAM to store MAC address. APC CMOS RAM is accessed through ISA bridge. MAC address is read into @net_dev->dev_addr.
Definition at line 955 of file sis190.c.
References container_of, DBG, pci_device::dev, sis190_private::dev, pci_device::device, EIO, ETH_ALEN, net_device::hw_addr, inb(), list_for_each_entry, NULL, outb, pci_read_config_byte(), pci_write_config_byte(), net_device::priv, reg, device::siblings, sis190_set_rgmii(), tp, udelay(), and pci_device::vendor.
Referenced by sis190_get_mac_addr().
|
inlinestatic |
sis190_init_rxfilter - Initialize the Rx filter @dev: network device to initialize
Set receive filter address to our MAC address and enable packet filtering.
Definition at line 1019 of file sis190.c.
References sis190_private::dev, ETH_ALEN, ioaddr, net_device::ll_addr, net_device::priv, RxMacAddr, RxMacControl, SIS_PCI_COMMIT, SIS_R16, SIS_W16, SIS_W8, and tp.
Referenced by sis190_open().
|
static |
Definition at line 1041 of file sis190.c.
References sis190_private::dev, pci_read_config_byte(), rc, reg, sis190_get_mac_addr_from_apc(), and sis190_get_mac_addr_from_eeprom().
Referenced by sis190_probe().
|
static |
Definition at line 1058 of file sis190.c.
References ADVERTISE_1000FULL, ADVERTISE_100FULL, ADVERTISE_100HALF, ADVERTISE_10FULL, ADVERTISE_10HALF, ADVERTISE_SLCT, BMCR_ANENABLE, BMCR_ANRESTART, BMCR_RESET, DBG, sis190_private::dev, ioaddr, mdio_read(), mdio_write(), MII_ADVERTISE, MII_BMCR, MII_CTRL1000, net_device::priv, tp, and val.
Referenced by sis190_probe().
|
static |
Definition at line 1083 of file sis190.c.
References sis190_private::dev, IntrMask, IntrStatus, ioaddr, net_device::priv, sis190_intr_mask, SIS_PCI_COMMIT, SIS_W32, and tp.
|
static |
Definition at line 1106 of file sis190.c.
References net_device::dev, iounmap(), netdev_init(), out, pci_set_drvdata(), rc, register_netdev(), sis190_get_mac_addr(), sis190_init_board(), sis190_mii_probe(), sis190_mii_remove(), sis190_netdev_ops, sis190_phy_task(), sis190_set_speed_auto(), and tp.
|
static |
Definition at line 1145 of file sis190.c.
References sis190_private::dev, net_device::dev, ioaddr, iounmap(), netdev_nullify(), netdev_put(), pci_get_drvdata(), net_device::priv, sis190_mii_remove(), sis190_soft_reset(), tp, and unregister_netdev().
|
static |
|
static |
struct pci_driver sis190_pci_driver __pci_driver |
|
static |
Definition at line 72 of file sis190.c.
Referenced by sis190_irq().
|
static |
Definition at line 1098 of file sis190.c.
Referenced by sis190_probe().