/* SPDX-License-Identifier: GPL-2.0-or-later */ /* D-Link DL2000-based Gigabit Ethernet Adapter Linux driver */ /* Copyright (c) 2001, 2002 by D-Link Corporation Written by Edward Peng.<edward_peng@dlink.com.tw> Created 03-May-2001, base on Linux' sundance.c.
/* Ioctl custom data */ struct ioctl_data { char signature[10]; int cmd; int len; char *data;
};
/* The Rx and Tx buffer descriptors. */ struct netdev_desc {
__le64 next_desc;
__le64 status;
__le64 fraginfo;
};
#define PRIV_ALIGN 15 /* Required alignment mask */ /* Use __attribute__((aligned (L1_CACHE_BYTES))) to maintain alignment
within the structure. */ struct netdev_private { /* Descriptor rings first for alignment. */ struct netdev_desc *rx_ring; struct netdev_desc *tx_ring; struct sk_buff *rx_skbuff[RX_RING_SIZE]; struct sk_buff *tx_skbuff[TX_RING_SIZE];
dma_addr_t tx_ring_dma;
dma_addr_t rx_ring_dma; struct pci_dev *pdev; void __iomem *ioaddr; void __iomem *eeprom_addr; // To ensure synchronization when stats are updated.
spinlock_t stats_lock;
spinlock_t tx_lock;
spinlock_t rx_lock; unsignedint rx_buf_sz; /* Based on MTU+slack. */ unsignedint speed; /* Operating speed */ unsignedint vlan; /* VLAN Id */ unsignedint chip_id; /* PCI table chip id */ unsignedint rx_coalesce; /* Maximum frames each RxDMAComplete intr */ unsignedint rx_timeout; /* Wait time between RxDMAComplete intr */ unsignedint tx_coalesce; /* Maximum frames each tx interrupt */ unsignedint full_duplex:1; /* Full-duplex operation requested. */ unsignedint an_enable:2; /* Auto-Negotiated Enable */ unsignedint jumbo:1; /* Jumbo frame enable */ unsignedint coalesce:1; /* Rx coalescing enable */ unsignedint tx_flow:1; /* Tx flow control enable */ unsignedint rx_flow:1; /* Rx flow control enable */ unsignedint phy_media:1; /* 1: fiber, 0: copper */ unsignedint link_status:1; /* Current link status */ struct netdev_desc *last_tx; /* Last Tx descriptor used. */ unsignedlong cur_rx, old_rx; /* Producer/consumer ring indices */ unsignedlong cur_tx, old_tx; struct timer_list timer; int wake_polarity; char name[256]; /* net device description */
u8 duplex_polarity;
u16 mcast_filter[4];
u16 advertising; /* NWay media advertisement */
u16 negotiate; /* Negotiated media */ int phy_addr; /* PHY addresses. */
u16 led_mode; /* LED mode read from EEPROM (IP1000A only) */
bool rmon_enable;
};
/* The station address location in the EEPROM. */ /* The struct pci_device_id consist of: vendor, device Vendor and device ID to match (or PCI_ANY_ID) subvendor, subdevice Subsystem vendor and device ID to match (or PCI_ANY_ID) class Device class to match. The class_mask tells which bits class_mask of the class are honored during the comparison. driver_data Data private to the driver.
*/ #define CHIP_IP1000A 1
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.