hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/net/ethernet/via/via-velocity.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * This code is derived from the VIA reference driver (copyright message
34 * below) provided to Red Hat by VIA Networking Technologies, Inc. for
....@@ -24,23 +25,14 @@
2425 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
2526 * All rights reserved.
2627 *
27
- * This software may be redistributed and/or modified under
28
- * the terms of the GNU General Public License as published by the Free
29
- * Software Foundation; either version 2 of the License, or
30
- * any later version.
31
- *
32
- * This program is distributed in the hope that it will be useful, but
33
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
34
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
35
- * for more details.
36
- *
3728 * Author: Chuang Liang-Shing, AJ Jiang
3829 *
3930 * Date: Jan 24, 2003
4031 *
4132 * MODULE_LICENSE("GPL");
42
- *
4333 */
34
+
35
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
4436
4537 #include <linux/module.h>
4638 #include <linux/types.h>
....@@ -90,7 +82,6 @@
9082 };
9183
9284 static int velocity_nics;
93
-static int msglevel = MSG_LEVEL_INFO;
9485
9586 static void velocity_set_power_state(struct velocity_info *vptr, char state)
9687 {
....@@ -381,7 +372,7 @@
381372
382373 MODULE_DEVICE_TABLE(pci, velocity_pci_id_table);
383374
384
-/**
375
+/*
385376 * Describe the OF device identifiers that we support in this
386377 * device driver. Used for devicetree nodes.
387378 */
....@@ -393,7 +384,7 @@
393384
394385 /**
395386 * get_chip_name - identifier to name
396
- * @id: chip identifier
387
+ * @chip_id: chip identifier
397388 *
398389 * Given a chip identifier return a suitable description. Returns
399390 * a pointer a static string valid while the driver is loaded.
....@@ -415,24 +406,22 @@
415406 * @max: highest value allowed
416407 * @def: default value
417408 * @name: property name
418
- * @dev: device name
419409 *
420410 * Set an integer property in the module options. This function does
421411 * all the verification and checking as well as reporting so that
422412 * we don't duplicate code for each option.
423413 */
424414 static void velocity_set_int_opt(int *opt, int val, int min, int max, int def,
425
- char *name, const char *devname)
415
+ char *name)
426416 {
427417 if (val == -1)
428418 *opt = def;
429419 else if (val < min || val > max) {
430
- VELOCITY_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: the value of parameter %s is invalid, the valid range is (%d-%d)\n",
431
- devname, name, min, max);
420
+ pr_notice("the value of parameter %s is invalid, the valid range is (%d-%d)\n",
421
+ name, min, max);
432422 *opt = def;
433423 } else {
434
- VELOCITY_PRT(MSG_LEVEL_INFO, KERN_INFO "%s: set value of parameter %s to %d\n",
435
- devname, name, val);
424
+ pr_info("set value of parameter %s to %d\n", name, val);
436425 *opt = val;
437426 }
438427 }
....@@ -444,25 +433,24 @@
444433 * @def: default value (yes/no)
445434 * @flag: numeric value to set for true.
446435 * @name: property name
447
- * @dev: device name
448436 *
449437 * Set a boolean property in the module options. This function does
450438 * all the verification and checking as well as reporting so that
451439 * we don't duplicate code for each option.
452440 */
453441 static void velocity_set_bool_opt(u32 *opt, int val, int def, u32 flag,
454
- char *name, const char *devname)
442
+ char *name)
455443 {
456444 (*opt) &= (~flag);
457445 if (val == -1)
458446 *opt |= (def ? flag : 0);
459447 else if (val < 0 || val > 1) {
460
- printk(KERN_NOTICE "%s: the value of parameter %s is invalid, the valid range is (0-1)\n",
461
- devname, name);
448
+ pr_notice("the value of parameter %s is invalid, the valid range is (%d-%d)\n",
449
+ name, 0, 1);
462450 *opt |= (def ? flag : 0);
463451 } else {
464
- printk(KERN_INFO "%s: set parameter %s to %s\n",
465
- devname, name, val ? "TRUE" : "FALSE");
452
+ pr_info("set parameter %s to %s\n",
453
+ name, val ? "TRUE" : "FALSE");
466454 *opt |= (val ? flag : 0);
467455 }
468456 }
....@@ -471,24 +459,38 @@
471459 * velocity_get_options - set options on device
472460 * @opts: option structure for the device
473461 * @index: index of option to use in module options array
474
- * @devname: device name
475462 *
476463 * Turn the module and command options into a single structure
477464 * for the current device
478465 */
479
-static void velocity_get_options(struct velocity_opt *opts, int index,
480
- const char *devname)
466
+static void velocity_get_options(struct velocity_opt *opts, int index)
481467 {
482468
483
- velocity_set_int_opt(&opts->rx_thresh, rx_thresh[index], RX_THRESH_MIN, RX_THRESH_MAX, RX_THRESH_DEF, "rx_thresh", devname);
484
- velocity_set_int_opt(&opts->DMA_length, DMA_length[index], DMA_LENGTH_MIN, DMA_LENGTH_MAX, DMA_LENGTH_DEF, "DMA_length", devname);
485
- velocity_set_int_opt(&opts->numrx, RxDescriptors[index], RX_DESC_MIN, RX_DESC_MAX, RX_DESC_DEF, "RxDescriptors", devname);
486
- velocity_set_int_opt(&opts->numtx, TxDescriptors[index], TX_DESC_MIN, TX_DESC_MAX, TX_DESC_DEF, "TxDescriptors", devname);
469
+ velocity_set_int_opt(&opts->rx_thresh, rx_thresh[index],
470
+ RX_THRESH_MIN, RX_THRESH_MAX, RX_THRESH_DEF,
471
+ "rx_thresh");
472
+ velocity_set_int_opt(&opts->DMA_length, DMA_length[index],
473
+ DMA_LENGTH_MIN, DMA_LENGTH_MAX, DMA_LENGTH_DEF,
474
+ "DMA_length");
475
+ velocity_set_int_opt(&opts->numrx, RxDescriptors[index],
476
+ RX_DESC_MIN, RX_DESC_MAX, RX_DESC_DEF,
477
+ "RxDescriptors");
478
+ velocity_set_int_opt(&opts->numtx, TxDescriptors[index],
479
+ TX_DESC_MIN, TX_DESC_MAX, TX_DESC_DEF,
480
+ "TxDescriptors");
487481
488
- velocity_set_int_opt(&opts->flow_cntl, flow_control[index], FLOW_CNTL_MIN, FLOW_CNTL_MAX, FLOW_CNTL_DEF, "flow_control", devname);
489
- velocity_set_bool_opt(&opts->flags, IP_byte_align[index], IP_ALIG_DEF, VELOCITY_FLAGS_IP_ALIGN, "IP_byte_align", devname);
490
- velocity_set_int_opt((int *) &opts->spd_dpx, speed_duplex[index], MED_LNK_MIN, MED_LNK_MAX, MED_LNK_DEF, "Media link mode", devname);
491
- velocity_set_int_opt(&opts->wol_opts, wol_opts[index], WOL_OPT_MIN, WOL_OPT_MAX, WOL_OPT_DEF, "Wake On Lan options", devname);
482
+ velocity_set_int_opt(&opts->flow_cntl, flow_control[index],
483
+ FLOW_CNTL_MIN, FLOW_CNTL_MAX, FLOW_CNTL_DEF,
484
+ "flow_control");
485
+ velocity_set_bool_opt(&opts->flags, IP_byte_align[index],
486
+ IP_ALIG_DEF, VELOCITY_FLAGS_IP_ALIGN,
487
+ "IP_byte_align");
488
+ velocity_set_int_opt((int *) &opts->spd_dpx, speed_duplex[index],
489
+ MED_LNK_MIN, MED_LNK_MAX, MED_LNK_DEF,
490
+ "Media link mode");
491
+ velocity_set_int_opt(&opts->wol_opts, wol_opts[index],
492
+ WOL_OPT_MIN, WOL_OPT_MAX, WOL_OPT_DEF,
493
+ "Wake On Lan options");
492494 opts->numrx = (opts->numrx & ~3);
493495 }
494496
....@@ -746,7 +748,7 @@
746748 /**
747749 * velocity_mii_write - write MII data
748750 * @regs: velocity registers
749
- * @index: MII register index
751
+ * @mii_addr: MII register index
750752 * @data: 16bit data for the MII register
751753 *
752754 * Perform a single write to an MII 16bit register. Returns zero
....@@ -867,6 +869,7 @@
867869
868870 /**
869871 * velocity_set_media_mode - set media mode
872
+ * @vptr: velocity adapter
870873 * @mii_status: old MII link state
871874 *
872875 * Check the media link state and configure the flow control
....@@ -889,7 +892,7 @@
889892 * If connection type is AUTO
890893 */
891894 if (mii_status & VELOCITY_AUTONEG_ENABLE) {
892
- VELOCITY_PRT(MSG_LEVEL_INFO, "Velocity is AUTO mode\n");
895
+ netdev_info(vptr->netdev, "Velocity is in AUTO mode\n");
893896 /* clear force MAC mode bit */
894897 BYTE_REG_BITS_OFF(CHIPGCR_FCMODE, &regs->CHIPGCR);
895898 /* set duplex mode of MAC according to duplex mode of MII */
....@@ -924,12 +927,14 @@
924927 if (mii_status & VELOCITY_DUPLEX_FULL) {
925928 CHIPGCR |= CHIPGCR_FCFDX;
926929 writeb(CHIPGCR, &regs->CHIPGCR);
927
- VELOCITY_PRT(MSG_LEVEL_INFO, "set Velocity to forced full mode\n");
930
+ netdev_info(vptr->netdev,
931
+ "set Velocity to forced full mode\n");
928932 if (vptr->rev_id < REV_ID_VT3216_A0)
929933 BYTE_REG_BITS_OFF(TCR_TB2BDIS, &regs->TCR);
930934 } else {
931935 CHIPGCR &= ~CHIPGCR_FCFDX;
932
- VELOCITY_PRT(MSG_LEVEL_INFO, "set Velocity to forced half mode\n");
936
+ netdev_info(vptr->netdev,
937
+ "set Velocity to forced half mode\n");
933938 writeb(CHIPGCR, &regs->CHIPGCR);
934939 if (vptr->rev_id < REV_ID_VT3216_A0)
935940 BYTE_REG_BITS_ON(TCR_TB2BDIS, &regs->TCR);
....@@ -982,45 +987,61 @@
982987 */
983988 static void velocity_print_link_status(struct velocity_info *vptr)
984989 {
990
+ const char *link;
991
+ const char *speed;
992
+ const char *duplex;
985993
986994 if (vptr->mii_status & VELOCITY_LINK_FAIL) {
987
- VELOCITY_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: failed to detect cable link\n", vptr->netdev->name);
988
- } else if (vptr->options.spd_dpx == SPD_DPX_AUTO) {
989
- VELOCITY_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: Link auto-negotiation", vptr->netdev->name);
995
+ netdev_notice(vptr->netdev, "failed to detect cable link\n");
996
+ return;
997
+ }
998
+
999
+ if (vptr->options.spd_dpx == SPD_DPX_AUTO) {
1000
+ link = "auto-negotiation";
9901001
9911002 if (vptr->mii_status & VELOCITY_SPEED_1000)
992
- VELOCITY_PRT(MSG_LEVEL_INFO, " speed 1000M bps");
1003
+ speed = "1000";
9931004 else if (vptr->mii_status & VELOCITY_SPEED_100)
994
- VELOCITY_PRT(MSG_LEVEL_INFO, " speed 100M bps");
1005
+ speed = "100";
9951006 else
996
- VELOCITY_PRT(MSG_LEVEL_INFO, " speed 10M bps");
1007
+ speed = "10";
9971008
9981009 if (vptr->mii_status & VELOCITY_DUPLEX_FULL)
999
- VELOCITY_PRT(MSG_LEVEL_INFO, " full duplex\n");
1010
+ duplex = "full";
10001011 else
1001
- VELOCITY_PRT(MSG_LEVEL_INFO, " half duplex\n");
1012
+ duplex = "half";
10021013 } else {
1003
- VELOCITY_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: Link forced", vptr->netdev->name);
1014
+ link = "forced";
1015
+
10041016 switch (vptr->options.spd_dpx) {
10051017 case SPD_DPX_1000_FULL:
1006
- VELOCITY_PRT(MSG_LEVEL_INFO, " speed 1000M bps full duplex\n");
1018
+ speed = "1000";
1019
+ duplex = "full";
10071020 break;
10081021 case SPD_DPX_100_HALF:
1009
- VELOCITY_PRT(MSG_LEVEL_INFO, " speed 100M bps half duplex\n");
1022
+ speed = "100";
1023
+ duplex = "half";
10101024 break;
10111025 case SPD_DPX_100_FULL:
1012
- VELOCITY_PRT(MSG_LEVEL_INFO, " speed 100M bps full duplex\n");
1026
+ speed = "100";
1027
+ duplex = "full";
10131028 break;
10141029 case SPD_DPX_10_HALF:
1015
- VELOCITY_PRT(MSG_LEVEL_INFO, " speed 10M bps half duplex\n");
1030
+ speed = "10";
1031
+ duplex = "half";
10161032 break;
10171033 case SPD_DPX_10_FULL:
1018
- VELOCITY_PRT(MSG_LEVEL_INFO, " speed 10M bps full duplex\n");
1034
+ speed = "10";
1035
+ duplex = "full";
10191036 break;
10201037 default:
1038
+ speed = "unknown";
1039
+ duplex = "unknown";
10211040 break;
10221041 }
10231042 }
1043
+ netdev_notice(vptr->netdev, "Link %s speed %sM bps %s duplex\n",
1044
+ link, speed, duplex);
10241045 }
10251046
10261047 /**
....@@ -1236,6 +1257,7 @@
12361257
12371258 /**
12381259 * setup_queue_timers - Setup interrupt timers
1260
+ * @vptr: velocity adapter
12391261 *
12401262 * Setup interrupt frequency during suppression (timeout if the frame
12411263 * count isn't filled).
....@@ -1260,8 +1282,7 @@
12601282
12611283 /**
12621284 * setup_adaptive_interrupts - Setup interrupt suppression
1263
- *
1264
- * @vptr velocity adapter
1285
+ * @vptr: velocity adapter
12651286 *
12661287 * The velocity is able to suppress interrupt during high interrupt load.
12671288 * This function turns on that feature.
....@@ -1618,8 +1639,7 @@
16181639 velocity_init_rx_ring_indexes(vptr);
16191640
16201641 if (velocity_rx_refill(vptr) != vptr->options.numrx) {
1621
- VELOCITY_PRT(MSG_LEVEL_ERR, KERN_ERR
1622
- "%s: failed to allocate RX buffer.\n", vptr->netdev->name);
1642
+ netdev_err(vptr->netdev, "failed to allocate RX buffer\n");
16231643 velocity_free_rd_ring(vptr);
16241644 goto out;
16251645 }
....@@ -1703,6 +1723,7 @@
17031723 * velocity_free_tx_buf - free transmit buffer
17041724 * @vptr: velocity
17051725 * @tdinfo: buffer
1726
+ * @td: transmit descriptor to free
17061727 *
17071728 * Release an transmit buffer. If the buffer was preallocated then
17081729 * recycle it, if not then unmap the buffer.
....@@ -1727,7 +1748,7 @@
17271748 dma_unmap_single(vptr->dev, tdinfo->skb_dma[i],
17281749 le16_to_cpu(pktlen), DMA_TO_DEVICE);
17291750 }
1730
- dev_kfree_skb_irq(skb);
1751
+ dev_consume_skb_irq(skb);
17311752 tdinfo->skb = NULL;
17321753 }
17331754
....@@ -1802,7 +1823,8 @@
18021823 if (status & ISR_TXSTLI) {
18031824 struct mac_regs __iomem *regs = vptr->mac_regs;
18041825
1805
- printk(KERN_ERR "TD structure error TDindex=%hx\n", readw(&regs->TDIdx[0]));
1826
+ netdev_err(vptr->netdev, "TD structure error TDindex=%hx\n",
1827
+ readw(&regs->TDIdx[0]));
18061828 BYTE_REG_BITS_ON(TXESR_TDSTR, &regs->TXESR);
18071829 writew(TRDCSR_RUN, &regs->TDCSRClr);
18081830 netif_stop_queue(vptr->netdev);
....@@ -1876,7 +1898,7 @@
18761898
18771899 /**
18781900 * tx_srv - transmit interrupt service
1879
- * @vptr; Velocity
1901
+ * @vptr: Velocity
18801902 *
18811903 * Scan the queues looking for transmitted packets that
18821904 * we can complete and clean up. Update any statistics as
....@@ -1970,8 +1992,7 @@
19701992 * velocity_rx_copy - in place Rx copy for small packets
19711993 * @rx_skb: network layer packet buffer candidate
19721994 * @pkt_size: received data size
1973
- * @rd: receive packet descriptor
1974
- * @dev: network device
1995
+ * @vptr: velocity adapter
19751996 *
19761997 * Replace the current skb that is scheduled for Rx processing by a
19771998 * shorter, immediately allocated skb, if the received packet is small
....@@ -2033,7 +2054,7 @@
20332054
20342055 if (unlikely(rd->rdesc0.RSR & (RSR_STP | RSR_EDP | RSR_RL))) {
20352056 if (rd->rdesc0.RSR & (RSR_STP | RSR_EDP))
2036
- VELOCITY_PRT(MSG_LEVEL_VERBOSE, KERN_ERR " %s : the received frame spans multiple RDs.\n", vptr->netdev->name);
2057
+ netdev_err(vptr->netdev, "received frame spans multiple RDs\n");
20372058 stats->rx_length_errors++;
20382059 return -EINVAL;
20392060 }
....@@ -2077,6 +2098,7 @@
20772098 /**
20782099 * velocity_rx_srv - service RX interrupt
20792100 * @vptr: velocity
2101
+ * @budget_left: remaining budget
20802102 *
20812103 * Walk the receive ring of the velocity adapter and remove
20822104 * any received packets from the receive queue. Hand the ring
....@@ -2625,7 +2647,6 @@
26252647
26262648 /**
26272649 * velocity_init_info - init private data
2628
- * @pdev: PCI device
26292650 * @vptr: Velocity info
26302651 * @info: Board type
26312652 *
....@@ -2644,7 +2665,6 @@
26442665 /**
26452666 * velocity_get_pci_info - retrieve PCI info for device
26462667 * @vptr: velocity device
2647
- * @pdev: PCI device it matches
26482668 *
26492669 * Retrieve the PCI configuration space data that interests us from
26502670 * the kernel PCI layer
....@@ -2681,7 +2701,6 @@
26812701 /**
26822702 * velocity_get_platform_info - retrieve platform info for device
26832703 * @vptr: velocity device
2684
- * @pdev: platform device it matches
26852704 *
26862705 * Retrieve the Platform configuration data that interests us
26872706 */
....@@ -2718,11 +2737,8 @@
27182737 */
27192738 static void velocity_print_info(struct velocity_info *vptr)
27202739 {
2721
- struct net_device *dev = vptr->netdev;
2722
-
2723
- printk(KERN_INFO "%s: %s\n", dev->name, get_chip_name(vptr->chip_id));
2724
- printk(KERN_INFO "%s: Ethernet Address: %pM\n",
2725
- dev->name, dev->dev_addr);
2740
+ netdev_info(vptr->netdev, "%s - Ethernet Address: %pM\n",
2741
+ get_chip_name(vptr->chip_id), vptr->netdev->dev_addr);
27262742 }
27272743
27282744 static u32 velocity_get_link(struct net_device *dev)
....@@ -2734,8 +2750,9 @@
27342750
27352751 /**
27362752 * velocity_probe - set up discovered velocity device
2737
- * @pdev: PCI device
2738
- * @ent: PCI device table entry that matched
2753
+ * @dev: PCI device
2754
+ * @info: table of match
2755
+ * @irq: interrupt info
27392756 * @bustype: bus that device is connected to
27402757 *
27412758 * Configure a discovered adapter from scratch. Return a negative
....@@ -2745,10 +2762,8 @@
27452762 const struct velocity_info_tbl *info,
27462763 enum velocity_bus_type bustype)
27472764 {
2748
- static int first = 1;
27492765 struct net_device *netdev;
27502766 int i;
2751
- const char *drv_string;
27522767 struct velocity_info *vptr;
27532768 struct mac_regs __iomem *regs;
27542769 int ret = -ENOMEM;
....@@ -2770,13 +2785,9 @@
27702785 SET_NETDEV_DEV(netdev, dev);
27712786 vptr = netdev_priv(netdev);
27722787
2773
- if (first) {
2774
- printk(KERN_INFO "%s Ver. %s\n",
2775
- VELOCITY_FULL_DRV_NAM, VELOCITY_VERSION);
2776
- printk(KERN_INFO "Copyright (c) 2002, 2003 VIA Networking Technologies, Inc.\n");
2777
- printk(KERN_INFO "Copyright (c) 2004 Red Hat Inc.\n");
2778
- first = 0;
2779
- }
2788
+ pr_info_once("%s Ver. %s\n", VELOCITY_FULL_DRV_NAM, VELOCITY_VERSION);
2789
+ pr_info_once("Copyright (c) 2002, 2003 VIA Networking Technologies, Inc.\n");
2790
+ pr_info_once("Copyright (c) 2004 Red Hat Inc.\n");
27802791
27812792 netdev->irq = irq;
27822793 vptr->netdev = netdev;
....@@ -2812,9 +2823,7 @@
28122823 netdev->dev_addr[i] = readb(&regs->PAR[i]);
28132824
28142825
2815
- drv_string = dev_driver_string(dev);
2816
-
2817
- velocity_get_options(&vptr->options, velocity_nics, drv_string);
2826
+ velocity_get_options(&vptr->options, velocity_nics);
28182827
28192828 /*
28202829 * Mask out the options cannot be set to the chip
....@@ -2960,6 +2969,7 @@
29602969 #ifdef CONFIG_PM_SLEEP
29612970 /**
29622971 * wol_calc_crc - WOL CRC
2972
+ * @size: size of the wake mask
29632973 * @pattern: data pattern
29642974 * @mask_pattern: mask
29652975 *
....@@ -3254,12 +3264,16 @@
32543264 * @dev: network device
32553265 *
32563266 * Called before an ethtool operation. We need to make sure the
3257
- * chip is out of D3 state before we poke at it.
3267
+ * chip is out of D3 state before we poke at it. In case of ethtool
3268
+ * ops nesting, only wake the device up in the outermost block.
32583269 */
32593270 static int velocity_ethtool_up(struct net_device *dev)
32603271 {
32613272 struct velocity_info *vptr = netdev_priv(dev);
3262
- if (!netif_running(dev))
3273
+
3274
+ if (vptr->ethtool_ops_nesting == U32_MAX)
3275
+ return -EBUSY;
3276
+ if (!vptr->ethtool_ops_nesting++ && !netif_running(dev))
32633277 velocity_set_power_state(vptr, PCI_D0);
32643278 return 0;
32653279 }
....@@ -3269,12 +3283,14 @@
32693283 * @dev: network device
32703284 *
32713285 * Called after an ethtool operation. Restore the chip back to D3
3272
- * state if it isn't running.
3286
+ * state if it isn't running. In case of ethtool ops nesting, only
3287
+ * put the device to sleep in the outermost block.
32733288 */
32743289 static void velocity_ethtool_down(struct net_device *dev)
32753290 {
32763291 struct velocity_info *vptr = netdev_priv(dev);
3277
- if (!netif_running(dev))
3292
+
3293
+ if (!--vptr->ethtool_ops_nesting && !netif_running(dev))
32783294 velocity_set_power_state(vptr, PCI_D3hot);
32793295 }
32803296
....@@ -3460,16 +3476,6 @@
34603476 return 0;
34613477 }
34623478
3463
-static u32 velocity_get_msglevel(struct net_device *dev)
3464
-{
3465
- return msglevel;
3466
-}
3467
-
3468
-static void velocity_set_msglevel(struct net_device *dev, u32 value)
3469
-{
3470
- msglevel = value;
3471
-}
3472
-
34733479 static int get_pending_timer_val(int val)
34743480 {
34753481 int mult_bits = val >> 6;
....@@ -3592,7 +3598,7 @@
35923598 "tx_jumbo",
35933599 "rx_mac_control_frames",
35943600 "tx_mac_control_frames",
3595
- "rx_frame_alignement_errors",
3601
+ "rx_frame_alignment_errors",
35963602 "rx_long_ok",
35973603 "rx_long_err",
35983604 "tx_sqe_errors",
....@@ -3639,11 +3645,11 @@
36393645 }
36403646
36413647 static const struct ethtool_ops velocity_ethtool_ops = {
3648
+ .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
3649
+ ETHTOOL_COALESCE_MAX_FRAMES,
36423650 .get_drvinfo = velocity_get_drvinfo,
36433651 .get_wol = velocity_ethtool_get_wol,
36443652 .set_wol = velocity_ethtool_set_wol,
3645
- .get_msglevel = velocity_get_msglevel,
3646
- .set_msglevel = velocity_set_msglevel,
36473653 .get_link = velocity_get_link,
36483654 .get_strings = velocity_get_strings,
36493655 .get_sset_count = velocity_get_sset_count,