Loading MAINTAINERS +5 −3 Original line number Diff line number Diff line Loading @@ -1696,11 +1696,13 @@ M: mtk-manpages@gmx.net W: ftp://ftp.kernel.org/pub/linux/docs/manpages S: Maintained MARVELL MV64340 ETHERNET DRIVER MARVELL MV643XX ETHERNET DRIVER P: Dale Farnsworth M: dale@farnsworth.org P: Manish Lachwani L: linux-mips@linux-mips.org M: mlachwani@mvista.com L: netdev@vger.kernel.org S: Supported S: Odd Fixes for 2.4; Maintained for 2.6. MATROX FRAMEBUFFER DRIVER P: Petr Vandrovec Loading drivers/net/b44.c +1 −1 Original line number Diff line number Diff line Loading @@ -2136,7 +2136,7 @@ static int __init b44_init(void) /* Setup paramaters for syncing RX/TX DMA descriptors */ dma_desc_align_mask = ~(dma_desc_align_size - 1); dma_desc_sync_size = max(dma_desc_align_size, sizeof(struct dma_desc)); dma_desc_sync_size = max_t(unsigned int, dma_desc_align_size, sizeof(struct dma_desc)); return pci_module_init(&b44_driver); } Loading drivers/net/e100.c +96 −46 Original line number Diff line number Diff line Loading @@ -160,7 +160,7 @@ #define DRV_NAME "e100" #define DRV_EXT "-NAPI" #define DRV_VERSION "3.4.14-k4"DRV_EXT #define DRV_VERSION "3.5.10-k2"DRV_EXT #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" #define DRV_COPYRIGHT "Copyright(c) 1999-2005 Intel Corporation" #define PFX DRV_NAME ": " Loading Loading @@ -1170,7 +1170,7 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb) 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ } static void e100_load_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb) static void e100_setup_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb) { /* *INDENT-OFF* */ static struct { Loading Loading @@ -1284,12 +1284,46 @@ static void e100_load_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb) for (i = 0; i < UCODE_SIZE; i++) cb->u.ucode[i] = cpu_to_le32(ucode[i]); cb->command = cpu_to_le16(cb_ucode); cb->command = cpu_to_le16(cb_ucode | cb_el); return; } noloaducode: cb->command = cpu_to_le16(cb_nop); cb->command = cpu_to_le16(cb_nop | cb_el); } static inline int e100_exec_cb_wait(struct nic *nic, struct sk_buff *skb, void (*cb_prepare)(struct nic *, struct cb *, struct sk_buff *)) { int err = 0, counter = 50; struct cb *cb = nic->cb_to_clean; if ((err = e100_exec_cb(nic, NULL, e100_setup_ucode))) DPRINTK(PROBE,ERR, "ucode cmd failed with error %d\n", err); /* must restart cuc */ nic->cuc_cmd = cuc_start; /* wait for completion */ e100_write_flush(nic); udelay(10); /* wait for possibly (ouch) 500ms */ while (!(cb->status & cpu_to_le16(cb_complete))) { msleep(10); if (!--counter) break; } /* ack any interupts, something could have been set */ writeb(~0, &nic->csr->scb.stat_ack); /* if the command failed, or is not OK, notify and return */ if (!counter || !(cb->status & cpu_to_le16(cb_ok))) { DPRINTK(PROBE,ERR, "ucode load failed\n"); err = -EPERM; } return err; } static void e100_setup_iaaddr(struct nic *nic, struct cb *cb, Loading Loading @@ -1388,7 +1422,7 @@ static int e100_hw_init(struct nic *nic) return err; if((err = e100_exec_cmd(nic, ruc_load_base, 0))) return err; if((err = e100_exec_cb(nic, NULL, e100_load_ucode))) if ((err = e100_exec_cb_wait(nic, NULL, e100_setup_ucode))) return err; if((err = e100_exec_cb(nic, NULL, e100_configure))) return err; Loading Loading @@ -2631,7 +2665,9 @@ static int __devinit e100_probe(struct pci_dev *pdev, nic->flags |= wol_magic; /* ack any pending wake events, disable PME */ pci_enable_wake(pdev, 0, 0); err = pci_enable_wake(pdev, 0, 0); if (err) DPRINTK(PROBE, ERR, "Error clearing wake event\n"); strcpy(netdev->name, "eth%d"); if((err = register_netdev(netdev))) { Loading Loading @@ -2682,6 +2718,7 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *netdev = pci_get_drvdata(pdev); struct nic *nic = netdev_priv(netdev); int retval; if(netif_running(netdev)) e100_down(nic); Loading @@ -2689,9 +2726,14 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state) netif_device_detach(netdev); pci_save_state(pdev); pci_enable_wake(pdev, pci_choose_state(pdev, state), nic->flags & (wol_magic | e100_asf(nic))); retval = pci_enable_wake(pdev, pci_choose_state(pdev, state), nic->flags & (wol_magic | e100_asf(nic))); if (retval) DPRINTK(PROBE,ERR, "Error enabling wake\n"); pci_disable_device(pdev); pci_set_power_state(pdev, pci_choose_state(pdev, state)); retval = pci_set_power_state(pdev, pci_choose_state(pdev, state)); if (retval) DPRINTK(PROBE,ERR, "Error %d setting power state\n", retval); return 0; } Loading @@ -2700,11 +2742,16 @@ static int e100_resume(struct pci_dev *pdev) { struct net_device *netdev = pci_get_drvdata(pdev); struct nic *nic = netdev_priv(netdev); int retval; pci_set_power_state(pdev, PCI_D0); retval = pci_set_power_state(pdev, PCI_D0); if (retval) DPRINTK(PROBE,ERR, "Error waking adapter\n"); pci_restore_state(pdev); /* ack any pending wake events, disable PME */ pci_enable_wake(pdev, 0, 0); retval = pci_enable_wake(pdev, 0, 0); if (retval) DPRINTK(PROBE,ERR, "Error clearing wake events\n"); if(e100_hw_init(nic)) DPRINTK(HW, ERR, "e100_hw_init failed\n"); Loading @@ -2721,12 +2768,15 @@ static void e100_shutdown(struct pci_dev *pdev) { struct net_device *netdev = pci_get_drvdata(pdev); struct nic *nic = netdev_priv(netdev); int retval; #ifdef CONFIG_PM pci_enable_wake(pdev, 0, nic->flags & (wol_magic | e100_asf(nic))); retval = pci_enable_wake(pdev, 0, nic->flags & (wol_magic | e100_asf(nic))); #else pci_enable_wake(pdev, 0, nic->flags & (wol_magic)); retval = pci_enable_wake(pdev, 0, nic->flags & (wol_magic)); #endif if (retval) DPRINTK(PROBE,ERR, "Error enabling wake\n"); } Loading drivers/net/e1000/e1000.h +39 −12 Original line number Diff line number Diff line Loading @@ -72,10 +72,6 @@ #include <linux/mii.h> #include <linux/ethtool.h> #include <linux/if_vlan.h> #ifdef CONFIG_E1000_MQ #include <linux/cpu.h> #include <linux/smp.h> #endif #define BAR_0 0 #define BAR_1 1 Loading @@ -87,6 +83,10 @@ struct e1000_adapter; #include "e1000_hw.h" #ifdef CONFIG_E1000_MQ #include <linux/cpu.h> #include <linux/smp.h> #endif #ifdef DBG #define E1000_DBG(args...) printk(KERN_DEBUG "e1000: " args) Loading Loading @@ -169,6 +169,13 @@ struct e1000_buffer { uint16_t next_to_watch; }; #ifdef CONFIG_E1000_MQ struct e1000_queue_stats { uint64_t packets; uint64_t bytes; }; #endif struct e1000_ps_page { struct page *ps_page[PS_PAGE_BUFFERS]; }; struct e1000_ps_page_dma { uint64_t ps_page_dma[PS_PAGE_BUFFERS]; }; Loading @@ -191,10 +198,12 @@ struct e1000_tx_ring { spinlock_t tx_lock; uint16_t tdh; uint16_t tdt; uint64_t pkt; boolean_t last_tx_tso; #ifdef CONFIG_E1000_MQ struct e1000_queue_stats tx_stats; #endif }; struct e1000_rx_ring { Loading @@ -216,9 +225,17 @@ struct e1000_rx_ring { struct e1000_ps_page *ps_page; struct e1000_ps_page_dma *ps_page_dma; struct sk_buff *rx_skb_top; struct sk_buff *rx_skb_prev; /* cpu for rx queue */ int cpu; uint16_t rdh; uint16_t rdt; uint64_t pkt; #ifdef CONFIG_E1000_MQ struct e1000_queue_stats rx_stats; #endif }; #define E1000_DESC_UNUSED(R) \ Loading Loading @@ -251,6 +268,9 @@ struct e1000_adapter { uint16_t link_speed; uint16_t link_duplex; spinlock_t stats_lock; #ifdef CONFIG_E1000_NAPI spinlock_t tx_queue_lock; #endif atomic_t irq_sem; struct work_struct tx_timeout_task; struct work_struct watchdog_task; Loading @@ -264,6 +284,7 @@ struct e1000_adapter { #ifdef CONFIG_E1000_MQ struct e1000_tx_ring **cpu_tx_ring; /* per-cpu */ #endif unsigned long tx_queue_len; uint32_t txd_cmd; uint32_t tx_int_delay; uint32_t tx_abs_int_delay; Loading @@ -271,9 +292,11 @@ struct e1000_adapter { uint64_t gotcl_old; uint64_t tpt_old; uint64_t colc_old; uint32_t tx_timeout_count; uint32_t tx_fifo_head; uint32_t tx_head_addr; uint32_t tx_fifo_size; uint8_t tx_timeout_factor; atomic_t tx_fifo_stall; boolean_t pcix_82544; boolean_t detect_tx_hung; Loading @@ -288,7 +311,8 @@ struct e1000_adapter { struct e1000_rx_ring *rx_ring); #endif void (*alloc_rx_buf) (struct e1000_adapter *adapter, struct e1000_rx_ring *rx_ring); struct e1000_rx_ring *rx_ring, int cleaned_count); struct e1000_rx_ring *rx_ring; /* One per active queue */ #ifdef CONFIG_E1000_NAPI struct net_device *polling_netdev; /* One per active queue */ Loading @@ -296,13 +320,15 @@ struct e1000_adapter { #ifdef CONFIG_E1000_MQ struct net_device **cpu_netdev; /* per-cpu */ struct call_async_data_struct rx_sched_call_data; int cpu_for_queue[4]; cpumask_t cpumask; #endif int num_queues; int num_tx_queues; int num_rx_queues; uint64_t hw_csum_err; uint64_t hw_csum_good; uint64_t rx_hdr_split; uint32_t alloc_rx_buff_failed; uint32_t rx_int_delay; uint32_t rx_abs_int_delay; boolean_t rx_csum; Loading Loading @@ -330,6 +356,7 @@ struct e1000_adapter { struct e1000_rx_ring test_rx_ring; u32 *config_space; int msg_enable; #ifdef CONFIG_PCI_MSI boolean_t have_msi; Loading drivers/net/e1000/e1000_ethtool.c +119 −48 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ static const struct e1000_stats e1000_gstrings_stats[] = { { "tx_deferred_ok", E1000_STAT(stats.dc) }, { "tx_single_coll_ok", E1000_STAT(stats.scc) }, { "tx_multi_coll_ok", E1000_STAT(stats.mcc) }, { "tx_timeout_count", E1000_STAT(tx_timeout_count) }, { "rx_long_length_errors", E1000_STAT(stats.roc) }, { "rx_short_length_errors", E1000_STAT(stats.ruc) }, { "rx_align_errors", E1000_STAT(stats.algnerrc) }, Loading @@ -93,9 +94,20 @@ static const struct e1000_stats e1000_gstrings_stats[] = { { "rx_csum_offload_good", E1000_STAT(hw_csum_good) }, { "rx_csum_offload_errors", E1000_STAT(hw_csum_err) }, { "rx_header_split", E1000_STAT(rx_hdr_split) }, { "alloc_rx_buff_failed", E1000_STAT(alloc_rx_buff_failed) }, }; #define E1000_STATS_LEN \ #ifdef CONFIG_E1000_MQ #define E1000_QUEUE_STATS_LEN \ (((struct e1000_adapter *)netdev->priv)->num_tx_queues + \ ((struct e1000_adapter *)netdev->priv)->num_rx_queues) \ * (sizeof(struct e1000_queue_stats) / sizeof(uint64_t)) #else #define E1000_QUEUE_STATS_LEN 0 #endif #define E1000_GLOBAL_STATS_LEN \ sizeof(e1000_gstrings_stats) / sizeof(struct e1000_stats) #define E1000_STATS_LEN (E1000_GLOBAL_STATS_LEN + E1000_QUEUE_STATS_LEN) static const char e1000_gstrings_test[][ETH_GSTRING_LEN] = { "Register test (offline)", "Eeprom test (offline)", "Interrupt test (offline)", "Loopback test (offline)", Loading Loading @@ -183,6 +195,14 @@ e1000_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) struct e1000_adapter *adapter = netdev_priv(netdev); struct e1000_hw *hw = &adapter->hw; /* When SoL/IDER sessions are active, autoneg/speed/duplex * cannot be changed */ if (e1000_check_phy_reset_block(hw)) { DPRINTK(DRV, ERR, "Cannot change link characteristics " "when SoL/IDER is active.\n"); return -EINVAL; } if (ecmd->autoneg == AUTONEG_ENABLE) { hw->autoneg = 1; if(hw->media_type == e1000_media_type_fiber) Loading Loading @@ -568,7 +588,7 @@ e1000_get_drvinfo(struct net_device *netdev, strncpy(drvinfo->driver, e1000_driver_name, 32); strncpy(drvinfo->version, e1000_driver_version, 32); /* EEPROM image version # is reported as firware version # for /* EEPROM image version # is reported as firmware version # for * 8257{1|2|3} controllers */ e1000_read_eeprom(&adapter->hw, 5, 1, &eeprom_data); switch (adapter->hw.mac_type) { Loading @@ -581,7 +601,7 @@ e1000_get_drvinfo(struct net_device *netdev, eeprom_data & 0x000F); break; default: sprintf(firmware_version, "n/a"); sprintf(firmware_version, "N/A"); } strncpy(drvinfo->fw_version, firmware_version, 32); Loading Loading @@ -623,8 +643,8 @@ e1000_set_ringparam(struct net_device *netdev, struct e1000_rx_ring *rxdr, *rx_old, *rx_new; int i, err, tx_ring_size, rx_ring_size; tx_ring_size = sizeof(struct e1000_tx_ring) * adapter->num_queues; rx_ring_size = sizeof(struct e1000_rx_ring) * adapter->num_queues; tx_ring_size = sizeof(struct e1000_tx_ring) * adapter->num_tx_queues; rx_ring_size = sizeof(struct e1000_rx_ring) * adapter->num_rx_queues; if (netif_running(adapter->netdev)) e1000_down(adapter); Loading Loading @@ -663,10 +683,10 @@ e1000_set_ringparam(struct net_device *netdev, E1000_MAX_TXD : E1000_MAX_82544_TXD)); E1000_ROUNDUP(txdr->count, REQ_TX_DESCRIPTOR_MULTIPLE); for (i = 0; i < adapter->num_queues; i++) { for (i = 0; i < adapter->num_tx_queues; i++) txdr[i].count = txdr->count; for (i = 0; i < adapter->num_rx_queues; i++) rxdr[i].count = rxdr->count; } if(netif_running(adapter->netdev)) { /* Try to get new resources before deleting old */ Loading Loading @@ -990,7 +1010,6 @@ e1000_free_desc_rings(struct e1000_adapter *adapter) kfree(txdr->buffer_info); txdr->buffer_info = NULL; kfree(rxdr->buffer_info); rxdr->buffer_info = NULL; Loading Loading @@ -1327,8 +1346,8 @@ e1000_set_phy_loopback(struct e1000_adapter *adapter) static int e1000_setup_loopback_test(struct e1000_adapter *adapter) { uint32_t rctl; struct e1000_hw *hw = &adapter->hw; uint32_t rctl; if (hw->media_type == e1000_media_type_fiber || hw->media_type == e1000_media_type_internal_serdes) { Loading Loading @@ -1362,13 +1381,13 @@ e1000_setup_loopback_test(struct e1000_adapter *adapter) static void e1000_loopback_cleanup(struct e1000_adapter *adapter) { struct e1000_hw *hw = &adapter->hw; uint32_t rctl; uint16_t phy_reg; struct e1000_hw *hw = &adapter->hw; rctl = E1000_READ_REG(&adapter->hw, RCTL); rctl = E1000_READ_REG(hw, RCTL); rctl &= ~(E1000_RCTL_LBM_TCVR | E1000_RCTL_LBM_MAC); E1000_WRITE_REG(&adapter->hw, RCTL, rctl); E1000_WRITE_REG(hw, RCTL, rctl); switch (hw->mac_type) { case e1000_82571: Loading @@ -1380,7 +1399,7 @@ e1000_loopback_cleanup(struct e1000_adapter *adapter) msec_delay(10); break; } /* fall thru for Cu adapters */ /* Fall Through */ case e1000_82545: case e1000_82546: case e1000_82545_rev_3: Loading @@ -1401,7 +1420,7 @@ static void e1000_create_lbtest_frame(struct sk_buff *skb, unsigned int frame_size) { memset(skb->data, 0xFF, frame_size); frame_size = (frame_size % 2) ? (frame_size - 1) : frame_size; frame_size &= ~1; memset(&skb->data[frame_size / 2], 0xAA, frame_size / 2 - 1); memset(&skb->data[frame_size / 2 + 10], 0xBE, 1); memset(&skb->data[frame_size / 2 + 12], 0xAF, 1); Loading @@ -1410,7 +1429,7 @@ e1000_create_lbtest_frame(struct sk_buff *skb, unsigned int frame_size) static int e1000_check_lbtest_frame(struct sk_buff *skb, unsigned int frame_size) { frame_size = (frame_size % 2) ? (frame_size - 1) : frame_size; frame_size &= ~1; if(*(skb->data + 3) == 0xFF) { if((*(skb->data + frame_size / 2 + 10) == 0xBE) && (*(skb->data + frame_size / 2 + 12) == 0xAF)) { Loading Loading @@ -1488,14 +1507,25 @@ e1000_run_loopback_test(struct e1000_adapter *adapter) static int e1000_loopback_test(struct e1000_adapter *adapter, uint64_t *data) { if((*data = e1000_setup_desc_rings(adapter))) goto err_loopback; /* PHY loopback cannot be performed if SoL/IDER * sessions are active */ if (e1000_check_phy_reset_block(&adapter->hw)) { DPRINTK(DRV, ERR, "Cannot do PHY loopback test " "when SoL/IDER is active.\n"); *data = 0; goto out; } if ((*data = e1000_setup_desc_rings(adapter))) goto out; if ((*data = e1000_setup_loopback_test(adapter))) goto err_loopback_setup; goto err_loopback; *data = e1000_run_loopback_test(adapter); e1000_loopback_cleanup(adapter); err_loopback_setup: e1000_free_desc_rings(adapter); err_loopback: e1000_free_desc_rings(adapter); out: return *data; } Loading Loading @@ -1617,6 +1647,7 @@ e1000_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) case E1000_DEV_ID_82546EB_FIBER: case E1000_DEV_ID_82546GB_FIBER: case E1000_DEV_ID_82571EB_FIBER: /* Wake events only supported on port A for dual fiber */ if(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1) { wol->supported = 0; Loading Loading @@ -1660,6 +1691,7 @@ e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) case E1000_DEV_ID_82546EB_FIBER: case E1000_DEV_ID_82546GB_FIBER: case E1000_DEV_ID_82571EB_FIBER: /* Wake events only supported on port A for dual fiber */ if(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1) return wol->wolopts ? -EOPNOTSUPP : 0; Loading Loading @@ -1721,17 +1753,17 @@ e1000_phys_id(struct net_device *netdev, uint32_t data) mod_timer(&adapter->blink_timer, jiffies); msleep_interruptible(data * 1000); del_timer_sync(&adapter->blink_timer); } else if(adapter->hw.mac_type < e1000_82573) { E1000_WRITE_REG(&adapter->hw, LEDCTL, (E1000_LEDCTL_LED2_BLINK_RATE | } else if (adapter->hw.mac_type < e1000_82573) { E1000_WRITE_REG(&adapter->hw, LEDCTL, (E1000_LEDCTL_LED2_BLINK_RATE | E1000_LEDCTL_LED0_BLINK | E1000_LEDCTL_LED2_BLINK | (E1000_LEDCTL_MODE_LED_ON << E1000_LEDCTL_LED2_MODE_SHIFT) | (E1000_LEDCTL_MODE_LINK_ACTIVITY << E1000_LEDCTL_LED0_MODE_SHIFT) | (E1000_LEDCTL_MODE_LED_OFF << E1000_LEDCTL_LED1_MODE_SHIFT))); msleep_interruptible(data * 1000); } else { E1000_WRITE_REG(&adapter->hw, LEDCTL, (E1000_LEDCTL_LED2_BLINK_RATE | } else { E1000_WRITE_REG(&adapter->hw, LEDCTL, (E1000_LEDCTL_LED2_BLINK_RATE | E1000_LEDCTL_LED1_BLINK | E1000_LEDCTL_LED2_BLINK | (E1000_LEDCTL_MODE_LED_ON << E1000_LEDCTL_LED2_MODE_SHIFT) | (E1000_LEDCTL_MODE_LINK_ACTIVITY << E1000_LEDCTL_LED1_MODE_SHIFT) | Loading Loading @@ -1768,19 +1800,43 @@ e1000_get_ethtool_stats(struct net_device *netdev, struct ethtool_stats *stats, uint64_t *data) { struct e1000_adapter *adapter = netdev_priv(netdev); #ifdef CONFIG_E1000_MQ uint64_t *queue_stat; int stat_count = sizeof(struct e1000_queue_stats) / sizeof(uint64_t); int j, k; #endif int i; e1000_update_stats(adapter); for(i = 0; i < E1000_STATS_LEN; i++) { for (i = 0; i < E1000_GLOBAL_STATS_LEN; i++) { char *p = (char *)adapter+e1000_gstrings_stats[i].stat_offset; data[i] = (e1000_gstrings_stats[i].sizeof_stat == sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p; } #ifdef CONFIG_E1000_MQ for (j = 0; j < adapter->num_tx_queues; j++) { queue_stat = (uint64_t *)&adapter->tx_ring[j].tx_stats; for (k = 0; k < stat_count; k++) data[i + k] = queue_stat[k]; i += k; } for (j = 0; j < adapter->num_rx_queues; j++) { queue_stat = (uint64_t *)&adapter->rx_ring[j].rx_stats; for (k = 0; k < stat_count; k++) data[i + k] = queue_stat[k]; i += k; } #endif /* BUG_ON(i != E1000_STATS_LEN); */ } static void e1000_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data) { #ifdef CONFIG_E1000_MQ struct e1000_adapter *adapter = netdev_priv(netdev); #endif uint8_t *p = data; int i; switch(stringset) { Loading @@ -1789,11 +1845,26 @@ e1000_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data) E1000_TEST_LEN*ETH_GSTRING_LEN); break; case ETH_SS_STATS: for (i=0; i < E1000_STATS_LEN; i++) { memcpy(data + i * ETH_GSTRING_LEN, e1000_gstrings_stats[i].stat_string, for (i = 0; i < E1000_GLOBAL_STATS_LEN; i++) { memcpy(p, e1000_gstrings_stats[i].stat_string, ETH_GSTRING_LEN); p += ETH_GSTRING_LEN; } #ifdef CONFIG_E1000_MQ for (i = 0; i < adapter->num_tx_queues; i++) { sprintf(p, "tx_queue_%u_packets", i); p += ETH_GSTRING_LEN; sprintf(p, "tx_queue_%u_bytes", i); p += ETH_GSTRING_LEN; } for (i = 0; i < adapter->num_rx_queues; i++) { sprintf(p, "rx_queue_%u_packets", i); p += ETH_GSTRING_LEN; sprintf(p, "rx_queue_%u_bytes", i); p += ETH_GSTRING_LEN; } #endif /* BUG_ON(p - data != E1000_STATS_LEN * ETH_GSTRING_LEN); */ break; } } Loading Loading
MAINTAINERS +5 −3 Original line number Diff line number Diff line Loading @@ -1696,11 +1696,13 @@ M: mtk-manpages@gmx.net W: ftp://ftp.kernel.org/pub/linux/docs/manpages S: Maintained MARVELL MV64340 ETHERNET DRIVER MARVELL MV643XX ETHERNET DRIVER P: Dale Farnsworth M: dale@farnsworth.org P: Manish Lachwani L: linux-mips@linux-mips.org M: mlachwani@mvista.com L: netdev@vger.kernel.org S: Supported S: Odd Fixes for 2.4; Maintained for 2.6. MATROX FRAMEBUFFER DRIVER P: Petr Vandrovec Loading
drivers/net/b44.c +1 −1 Original line number Diff line number Diff line Loading @@ -2136,7 +2136,7 @@ static int __init b44_init(void) /* Setup paramaters for syncing RX/TX DMA descriptors */ dma_desc_align_mask = ~(dma_desc_align_size - 1); dma_desc_sync_size = max(dma_desc_align_size, sizeof(struct dma_desc)); dma_desc_sync_size = max_t(unsigned int, dma_desc_align_size, sizeof(struct dma_desc)); return pci_module_init(&b44_driver); } Loading
drivers/net/e100.c +96 −46 Original line number Diff line number Diff line Loading @@ -160,7 +160,7 @@ #define DRV_NAME "e100" #define DRV_EXT "-NAPI" #define DRV_VERSION "3.4.14-k4"DRV_EXT #define DRV_VERSION "3.5.10-k2"DRV_EXT #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" #define DRV_COPYRIGHT "Copyright(c) 1999-2005 Intel Corporation" #define PFX DRV_NAME ": " Loading Loading @@ -1170,7 +1170,7 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb) 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ } static void e100_load_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb) static void e100_setup_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb) { /* *INDENT-OFF* */ static struct { Loading Loading @@ -1284,12 +1284,46 @@ static void e100_load_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb) for (i = 0; i < UCODE_SIZE; i++) cb->u.ucode[i] = cpu_to_le32(ucode[i]); cb->command = cpu_to_le16(cb_ucode); cb->command = cpu_to_le16(cb_ucode | cb_el); return; } noloaducode: cb->command = cpu_to_le16(cb_nop); cb->command = cpu_to_le16(cb_nop | cb_el); } static inline int e100_exec_cb_wait(struct nic *nic, struct sk_buff *skb, void (*cb_prepare)(struct nic *, struct cb *, struct sk_buff *)) { int err = 0, counter = 50; struct cb *cb = nic->cb_to_clean; if ((err = e100_exec_cb(nic, NULL, e100_setup_ucode))) DPRINTK(PROBE,ERR, "ucode cmd failed with error %d\n", err); /* must restart cuc */ nic->cuc_cmd = cuc_start; /* wait for completion */ e100_write_flush(nic); udelay(10); /* wait for possibly (ouch) 500ms */ while (!(cb->status & cpu_to_le16(cb_complete))) { msleep(10); if (!--counter) break; } /* ack any interupts, something could have been set */ writeb(~0, &nic->csr->scb.stat_ack); /* if the command failed, or is not OK, notify and return */ if (!counter || !(cb->status & cpu_to_le16(cb_ok))) { DPRINTK(PROBE,ERR, "ucode load failed\n"); err = -EPERM; } return err; } static void e100_setup_iaaddr(struct nic *nic, struct cb *cb, Loading Loading @@ -1388,7 +1422,7 @@ static int e100_hw_init(struct nic *nic) return err; if((err = e100_exec_cmd(nic, ruc_load_base, 0))) return err; if((err = e100_exec_cb(nic, NULL, e100_load_ucode))) if ((err = e100_exec_cb_wait(nic, NULL, e100_setup_ucode))) return err; if((err = e100_exec_cb(nic, NULL, e100_configure))) return err; Loading Loading @@ -2631,7 +2665,9 @@ static int __devinit e100_probe(struct pci_dev *pdev, nic->flags |= wol_magic; /* ack any pending wake events, disable PME */ pci_enable_wake(pdev, 0, 0); err = pci_enable_wake(pdev, 0, 0); if (err) DPRINTK(PROBE, ERR, "Error clearing wake event\n"); strcpy(netdev->name, "eth%d"); if((err = register_netdev(netdev))) { Loading Loading @@ -2682,6 +2718,7 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *netdev = pci_get_drvdata(pdev); struct nic *nic = netdev_priv(netdev); int retval; if(netif_running(netdev)) e100_down(nic); Loading @@ -2689,9 +2726,14 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state) netif_device_detach(netdev); pci_save_state(pdev); pci_enable_wake(pdev, pci_choose_state(pdev, state), nic->flags & (wol_magic | e100_asf(nic))); retval = pci_enable_wake(pdev, pci_choose_state(pdev, state), nic->flags & (wol_magic | e100_asf(nic))); if (retval) DPRINTK(PROBE,ERR, "Error enabling wake\n"); pci_disable_device(pdev); pci_set_power_state(pdev, pci_choose_state(pdev, state)); retval = pci_set_power_state(pdev, pci_choose_state(pdev, state)); if (retval) DPRINTK(PROBE,ERR, "Error %d setting power state\n", retval); return 0; } Loading @@ -2700,11 +2742,16 @@ static int e100_resume(struct pci_dev *pdev) { struct net_device *netdev = pci_get_drvdata(pdev); struct nic *nic = netdev_priv(netdev); int retval; pci_set_power_state(pdev, PCI_D0); retval = pci_set_power_state(pdev, PCI_D0); if (retval) DPRINTK(PROBE,ERR, "Error waking adapter\n"); pci_restore_state(pdev); /* ack any pending wake events, disable PME */ pci_enable_wake(pdev, 0, 0); retval = pci_enable_wake(pdev, 0, 0); if (retval) DPRINTK(PROBE,ERR, "Error clearing wake events\n"); if(e100_hw_init(nic)) DPRINTK(HW, ERR, "e100_hw_init failed\n"); Loading @@ -2721,12 +2768,15 @@ static void e100_shutdown(struct pci_dev *pdev) { struct net_device *netdev = pci_get_drvdata(pdev); struct nic *nic = netdev_priv(netdev); int retval; #ifdef CONFIG_PM pci_enable_wake(pdev, 0, nic->flags & (wol_magic | e100_asf(nic))); retval = pci_enable_wake(pdev, 0, nic->flags & (wol_magic | e100_asf(nic))); #else pci_enable_wake(pdev, 0, nic->flags & (wol_magic)); retval = pci_enable_wake(pdev, 0, nic->flags & (wol_magic)); #endif if (retval) DPRINTK(PROBE,ERR, "Error enabling wake\n"); } Loading
drivers/net/e1000/e1000.h +39 −12 Original line number Diff line number Diff line Loading @@ -72,10 +72,6 @@ #include <linux/mii.h> #include <linux/ethtool.h> #include <linux/if_vlan.h> #ifdef CONFIG_E1000_MQ #include <linux/cpu.h> #include <linux/smp.h> #endif #define BAR_0 0 #define BAR_1 1 Loading @@ -87,6 +83,10 @@ struct e1000_adapter; #include "e1000_hw.h" #ifdef CONFIG_E1000_MQ #include <linux/cpu.h> #include <linux/smp.h> #endif #ifdef DBG #define E1000_DBG(args...) printk(KERN_DEBUG "e1000: " args) Loading Loading @@ -169,6 +169,13 @@ struct e1000_buffer { uint16_t next_to_watch; }; #ifdef CONFIG_E1000_MQ struct e1000_queue_stats { uint64_t packets; uint64_t bytes; }; #endif struct e1000_ps_page { struct page *ps_page[PS_PAGE_BUFFERS]; }; struct e1000_ps_page_dma { uint64_t ps_page_dma[PS_PAGE_BUFFERS]; }; Loading @@ -191,10 +198,12 @@ struct e1000_tx_ring { spinlock_t tx_lock; uint16_t tdh; uint16_t tdt; uint64_t pkt; boolean_t last_tx_tso; #ifdef CONFIG_E1000_MQ struct e1000_queue_stats tx_stats; #endif }; struct e1000_rx_ring { Loading @@ -216,9 +225,17 @@ struct e1000_rx_ring { struct e1000_ps_page *ps_page; struct e1000_ps_page_dma *ps_page_dma; struct sk_buff *rx_skb_top; struct sk_buff *rx_skb_prev; /* cpu for rx queue */ int cpu; uint16_t rdh; uint16_t rdt; uint64_t pkt; #ifdef CONFIG_E1000_MQ struct e1000_queue_stats rx_stats; #endif }; #define E1000_DESC_UNUSED(R) \ Loading Loading @@ -251,6 +268,9 @@ struct e1000_adapter { uint16_t link_speed; uint16_t link_duplex; spinlock_t stats_lock; #ifdef CONFIG_E1000_NAPI spinlock_t tx_queue_lock; #endif atomic_t irq_sem; struct work_struct tx_timeout_task; struct work_struct watchdog_task; Loading @@ -264,6 +284,7 @@ struct e1000_adapter { #ifdef CONFIG_E1000_MQ struct e1000_tx_ring **cpu_tx_ring; /* per-cpu */ #endif unsigned long tx_queue_len; uint32_t txd_cmd; uint32_t tx_int_delay; uint32_t tx_abs_int_delay; Loading @@ -271,9 +292,11 @@ struct e1000_adapter { uint64_t gotcl_old; uint64_t tpt_old; uint64_t colc_old; uint32_t tx_timeout_count; uint32_t tx_fifo_head; uint32_t tx_head_addr; uint32_t tx_fifo_size; uint8_t tx_timeout_factor; atomic_t tx_fifo_stall; boolean_t pcix_82544; boolean_t detect_tx_hung; Loading @@ -288,7 +311,8 @@ struct e1000_adapter { struct e1000_rx_ring *rx_ring); #endif void (*alloc_rx_buf) (struct e1000_adapter *adapter, struct e1000_rx_ring *rx_ring); struct e1000_rx_ring *rx_ring, int cleaned_count); struct e1000_rx_ring *rx_ring; /* One per active queue */ #ifdef CONFIG_E1000_NAPI struct net_device *polling_netdev; /* One per active queue */ Loading @@ -296,13 +320,15 @@ struct e1000_adapter { #ifdef CONFIG_E1000_MQ struct net_device **cpu_netdev; /* per-cpu */ struct call_async_data_struct rx_sched_call_data; int cpu_for_queue[4]; cpumask_t cpumask; #endif int num_queues; int num_tx_queues; int num_rx_queues; uint64_t hw_csum_err; uint64_t hw_csum_good; uint64_t rx_hdr_split; uint32_t alloc_rx_buff_failed; uint32_t rx_int_delay; uint32_t rx_abs_int_delay; boolean_t rx_csum; Loading Loading @@ -330,6 +356,7 @@ struct e1000_adapter { struct e1000_rx_ring test_rx_ring; u32 *config_space; int msg_enable; #ifdef CONFIG_PCI_MSI boolean_t have_msi; Loading
drivers/net/e1000/e1000_ethtool.c +119 −48 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ static const struct e1000_stats e1000_gstrings_stats[] = { { "tx_deferred_ok", E1000_STAT(stats.dc) }, { "tx_single_coll_ok", E1000_STAT(stats.scc) }, { "tx_multi_coll_ok", E1000_STAT(stats.mcc) }, { "tx_timeout_count", E1000_STAT(tx_timeout_count) }, { "rx_long_length_errors", E1000_STAT(stats.roc) }, { "rx_short_length_errors", E1000_STAT(stats.ruc) }, { "rx_align_errors", E1000_STAT(stats.algnerrc) }, Loading @@ -93,9 +94,20 @@ static const struct e1000_stats e1000_gstrings_stats[] = { { "rx_csum_offload_good", E1000_STAT(hw_csum_good) }, { "rx_csum_offload_errors", E1000_STAT(hw_csum_err) }, { "rx_header_split", E1000_STAT(rx_hdr_split) }, { "alloc_rx_buff_failed", E1000_STAT(alloc_rx_buff_failed) }, }; #define E1000_STATS_LEN \ #ifdef CONFIG_E1000_MQ #define E1000_QUEUE_STATS_LEN \ (((struct e1000_adapter *)netdev->priv)->num_tx_queues + \ ((struct e1000_adapter *)netdev->priv)->num_rx_queues) \ * (sizeof(struct e1000_queue_stats) / sizeof(uint64_t)) #else #define E1000_QUEUE_STATS_LEN 0 #endif #define E1000_GLOBAL_STATS_LEN \ sizeof(e1000_gstrings_stats) / sizeof(struct e1000_stats) #define E1000_STATS_LEN (E1000_GLOBAL_STATS_LEN + E1000_QUEUE_STATS_LEN) static const char e1000_gstrings_test[][ETH_GSTRING_LEN] = { "Register test (offline)", "Eeprom test (offline)", "Interrupt test (offline)", "Loopback test (offline)", Loading Loading @@ -183,6 +195,14 @@ e1000_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) struct e1000_adapter *adapter = netdev_priv(netdev); struct e1000_hw *hw = &adapter->hw; /* When SoL/IDER sessions are active, autoneg/speed/duplex * cannot be changed */ if (e1000_check_phy_reset_block(hw)) { DPRINTK(DRV, ERR, "Cannot change link characteristics " "when SoL/IDER is active.\n"); return -EINVAL; } if (ecmd->autoneg == AUTONEG_ENABLE) { hw->autoneg = 1; if(hw->media_type == e1000_media_type_fiber) Loading Loading @@ -568,7 +588,7 @@ e1000_get_drvinfo(struct net_device *netdev, strncpy(drvinfo->driver, e1000_driver_name, 32); strncpy(drvinfo->version, e1000_driver_version, 32); /* EEPROM image version # is reported as firware version # for /* EEPROM image version # is reported as firmware version # for * 8257{1|2|3} controllers */ e1000_read_eeprom(&adapter->hw, 5, 1, &eeprom_data); switch (adapter->hw.mac_type) { Loading @@ -581,7 +601,7 @@ e1000_get_drvinfo(struct net_device *netdev, eeprom_data & 0x000F); break; default: sprintf(firmware_version, "n/a"); sprintf(firmware_version, "N/A"); } strncpy(drvinfo->fw_version, firmware_version, 32); Loading Loading @@ -623,8 +643,8 @@ e1000_set_ringparam(struct net_device *netdev, struct e1000_rx_ring *rxdr, *rx_old, *rx_new; int i, err, tx_ring_size, rx_ring_size; tx_ring_size = sizeof(struct e1000_tx_ring) * adapter->num_queues; rx_ring_size = sizeof(struct e1000_rx_ring) * adapter->num_queues; tx_ring_size = sizeof(struct e1000_tx_ring) * adapter->num_tx_queues; rx_ring_size = sizeof(struct e1000_rx_ring) * adapter->num_rx_queues; if (netif_running(adapter->netdev)) e1000_down(adapter); Loading Loading @@ -663,10 +683,10 @@ e1000_set_ringparam(struct net_device *netdev, E1000_MAX_TXD : E1000_MAX_82544_TXD)); E1000_ROUNDUP(txdr->count, REQ_TX_DESCRIPTOR_MULTIPLE); for (i = 0; i < adapter->num_queues; i++) { for (i = 0; i < adapter->num_tx_queues; i++) txdr[i].count = txdr->count; for (i = 0; i < adapter->num_rx_queues; i++) rxdr[i].count = rxdr->count; } if(netif_running(adapter->netdev)) { /* Try to get new resources before deleting old */ Loading Loading @@ -990,7 +1010,6 @@ e1000_free_desc_rings(struct e1000_adapter *adapter) kfree(txdr->buffer_info); txdr->buffer_info = NULL; kfree(rxdr->buffer_info); rxdr->buffer_info = NULL; Loading Loading @@ -1327,8 +1346,8 @@ e1000_set_phy_loopback(struct e1000_adapter *adapter) static int e1000_setup_loopback_test(struct e1000_adapter *adapter) { uint32_t rctl; struct e1000_hw *hw = &adapter->hw; uint32_t rctl; if (hw->media_type == e1000_media_type_fiber || hw->media_type == e1000_media_type_internal_serdes) { Loading Loading @@ -1362,13 +1381,13 @@ e1000_setup_loopback_test(struct e1000_adapter *adapter) static void e1000_loopback_cleanup(struct e1000_adapter *adapter) { struct e1000_hw *hw = &adapter->hw; uint32_t rctl; uint16_t phy_reg; struct e1000_hw *hw = &adapter->hw; rctl = E1000_READ_REG(&adapter->hw, RCTL); rctl = E1000_READ_REG(hw, RCTL); rctl &= ~(E1000_RCTL_LBM_TCVR | E1000_RCTL_LBM_MAC); E1000_WRITE_REG(&adapter->hw, RCTL, rctl); E1000_WRITE_REG(hw, RCTL, rctl); switch (hw->mac_type) { case e1000_82571: Loading @@ -1380,7 +1399,7 @@ e1000_loopback_cleanup(struct e1000_adapter *adapter) msec_delay(10); break; } /* fall thru for Cu adapters */ /* Fall Through */ case e1000_82545: case e1000_82546: case e1000_82545_rev_3: Loading @@ -1401,7 +1420,7 @@ static void e1000_create_lbtest_frame(struct sk_buff *skb, unsigned int frame_size) { memset(skb->data, 0xFF, frame_size); frame_size = (frame_size % 2) ? (frame_size - 1) : frame_size; frame_size &= ~1; memset(&skb->data[frame_size / 2], 0xAA, frame_size / 2 - 1); memset(&skb->data[frame_size / 2 + 10], 0xBE, 1); memset(&skb->data[frame_size / 2 + 12], 0xAF, 1); Loading @@ -1410,7 +1429,7 @@ e1000_create_lbtest_frame(struct sk_buff *skb, unsigned int frame_size) static int e1000_check_lbtest_frame(struct sk_buff *skb, unsigned int frame_size) { frame_size = (frame_size % 2) ? (frame_size - 1) : frame_size; frame_size &= ~1; if(*(skb->data + 3) == 0xFF) { if((*(skb->data + frame_size / 2 + 10) == 0xBE) && (*(skb->data + frame_size / 2 + 12) == 0xAF)) { Loading Loading @@ -1488,14 +1507,25 @@ e1000_run_loopback_test(struct e1000_adapter *adapter) static int e1000_loopback_test(struct e1000_adapter *adapter, uint64_t *data) { if((*data = e1000_setup_desc_rings(adapter))) goto err_loopback; /* PHY loopback cannot be performed if SoL/IDER * sessions are active */ if (e1000_check_phy_reset_block(&adapter->hw)) { DPRINTK(DRV, ERR, "Cannot do PHY loopback test " "when SoL/IDER is active.\n"); *data = 0; goto out; } if ((*data = e1000_setup_desc_rings(adapter))) goto out; if ((*data = e1000_setup_loopback_test(adapter))) goto err_loopback_setup; goto err_loopback; *data = e1000_run_loopback_test(adapter); e1000_loopback_cleanup(adapter); err_loopback_setup: e1000_free_desc_rings(adapter); err_loopback: e1000_free_desc_rings(adapter); out: return *data; } Loading Loading @@ -1617,6 +1647,7 @@ e1000_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) case E1000_DEV_ID_82546EB_FIBER: case E1000_DEV_ID_82546GB_FIBER: case E1000_DEV_ID_82571EB_FIBER: /* Wake events only supported on port A for dual fiber */ if(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1) { wol->supported = 0; Loading Loading @@ -1660,6 +1691,7 @@ e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) case E1000_DEV_ID_82546EB_FIBER: case E1000_DEV_ID_82546GB_FIBER: case E1000_DEV_ID_82571EB_FIBER: /* Wake events only supported on port A for dual fiber */ if(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1) return wol->wolopts ? -EOPNOTSUPP : 0; Loading Loading @@ -1721,17 +1753,17 @@ e1000_phys_id(struct net_device *netdev, uint32_t data) mod_timer(&adapter->blink_timer, jiffies); msleep_interruptible(data * 1000); del_timer_sync(&adapter->blink_timer); } else if(adapter->hw.mac_type < e1000_82573) { E1000_WRITE_REG(&adapter->hw, LEDCTL, (E1000_LEDCTL_LED2_BLINK_RATE | } else if (adapter->hw.mac_type < e1000_82573) { E1000_WRITE_REG(&adapter->hw, LEDCTL, (E1000_LEDCTL_LED2_BLINK_RATE | E1000_LEDCTL_LED0_BLINK | E1000_LEDCTL_LED2_BLINK | (E1000_LEDCTL_MODE_LED_ON << E1000_LEDCTL_LED2_MODE_SHIFT) | (E1000_LEDCTL_MODE_LINK_ACTIVITY << E1000_LEDCTL_LED0_MODE_SHIFT) | (E1000_LEDCTL_MODE_LED_OFF << E1000_LEDCTL_LED1_MODE_SHIFT))); msleep_interruptible(data * 1000); } else { E1000_WRITE_REG(&adapter->hw, LEDCTL, (E1000_LEDCTL_LED2_BLINK_RATE | } else { E1000_WRITE_REG(&adapter->hw, LEDCTL, (E1000_LEDCTL_LED2_BLINK_RATE | E1000_LEDCTL_LED1_BLINK | E1000_LEDCTL_LED2_BLINK | (E1000_LEDCTL_MODE_LED_ON << E1000_LEDCTL_LED2_MODE_SHIFT) | (E1000_LEDCTL_MODE_LINK_ACTIVITY << E1000_LEDCTL_LED1_MODE_SHIFT) | Loading Loading @@ -1768,19 +1800,43 @@ e1000_get_ethtool_stats(struct net_device *netdev, struct ethtool_stats *stats, uint64_t *data) { struct e1000_adapter *adapter = netdev_priv(netdev); #ifdef CONFIG_E1000_MQ uint64_t *queue_stat; int stat_count = sizeof(struct e1000_queue_stats) / sizeof(uint64_t); int j, k; #endif int i; e1000_update_stats(adapter); for(i = 0; i < E1000_STATS_LEN; i++) { for (i = 0; i < E1000_GLOBAL_STATS_LEN; i++) { char *p = (char *)adapter+e1000_gstrings_stats[i].stat_offset; data[i] = (e1000_gstrings_stats[i].sizeof_stat == sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p; } #ifdef CONFIG_E1000_MQ for (j = 0; j < adapter->num_tx_queues; j++) { queue_stat = (uint64_t *)&adapter->tx_ring[j].tx_stats; for (k = 0; k < stat_count; k++) data[i + k] = queue_stat[k]; i += k; } for (j = 0; j < adapter->num_rx_queues; j++) { queue_stat = (uint64_t *)&adapter->rx_ring[j].rx_stats; for (k = 0; k < stat_count; k++) data[i + k] = queue_stat[k]; i += k; } #endif /* BUG_ON(i != E1000_STATS_LEN); */ } static void e1000_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data) { #ifdef CONFIG_E1000_MQ struct e1000_adapter *adapter = netdev_priv(netdev); #endif uint8_t *p = data; int i; switch(stringset) { Loading @@ -1789,11 +1845,26 @@ e1000_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data) E1000_TEST_LEN*ETH_GSTRING_LEN); break; case ETH_SS_STATS: for (i=0; i < E1000_STATS_LEN; i++) { memcpy(data + i * ETH_GSTRING_LEN, e1000_gstrings_stats[i].stat_string, for (i = 0; i < E1000_GLOBAL_STATS_LEN; i++) { memcpy(p, e1000_gstrings_stats[i].stat_string, ETH_GSTRING_LEN); p += ETH_GSTRING_LEN; } #ifdef CONFIG_E1000_MQ for (i = 0; i < adapter->num_tx_queues; i++) { sprintf(p, "tx_queue_%u_packets", i); p += ETH_GSTRING_LEN; sprintf(p, "tx_queue_%u_bytes", i); p += ETH_GSTRING_LEN; } for (i = 0; i < adapter->num_rx_queues; i++) { sprintf(p, "rx_queue_%u_packets", i); p += ETH_GSTRING_LEN; sprintf(p, "rx_queue_%u_bytes", i); p += ETH_GSTRING_LEN; } #endif /* BUG_ON(p - data != E1000_STATS_LEN * ETH_GSTRING_LEN); */ break; } } Loading