aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ethtool.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r--include/linux/ethtool.h43
1 files changed, 38 insertions, 5 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 15e4eb713694..ef4a2d84d922 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -49,13 +49,14 @@ static inline __u32 ethtool_cmd_speed(struct ethtool_cmd *ep)
49 return (ep->speed_hi << 16) | ep->speed; 49 return (ep->speed_hi << 16) | ep->speed;
50} 50}
51 51
52#define ETHTOOL_FWVERS_LEN 32
52#define ETHTOOL_BUSINFO_LEN 32 53#define ETHTOOL_BUSINFO_LEN 32
53/* these strings are set to whatever the driver author decides... */ 54/* these strings are set to whatever the driver author decides... */
54struct ethtool_drvinfo { 55struct ethtool_drvinfo {
55 __u32 cmd; 56 __u32 cmd;
56 char driver[32]; /* driver short name, "tulip", "eepro100" */ 57 char driver[32]; /* driver short name, "tulip", "eepro100" */
57 char version[32]; /* driver version string */ 58 char version[32]; /* driver version string */
58 char fw_version[32]; /* firmware version string, if applicable */ 59 char fw_version[ETHTOOL_FWVERS_LEN]; /* firmware version string */
59 char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */ 60 char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */
60 /* For PCI devices, use pci_name(pci_dev). */ 61 /* For PCI devices, use pci_name(pci_dev). */
61 char reserved1[32]; 62 char reserved1[32];
@@ -495,13 +496,10 @@ struct ethtool_ops {
495 u32 (*get_priv_flags)(struct net_device *); 496 u32 (*get_priv_flags)(struct net_device *);
496 int (*set_priv_flags)(struct net_device *, u32); 497 int (*set_priv_flags)(struct net_device *, u32);
497 int (*get_sset_count)(struct net_device *, int); 498 int (*get_sset_count)(struct net_device *, int);
498
499 /* the following hooks are obsolete */
500 int (*self_test_count)(struct net_device *);/* use get_sset_count */
501 int (*get_stats_count)(struct net_device *);/* use get_sset_count */
502 int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *); 499 int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *);
503 int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); 500 int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *);
504 int (*flash_device)(struct net_device *, struct ethtool_flash *); 501 int (*flash_device)(struct net_device *, struct ethtool_flash *);
502 int (*reset)(struct net_device *, u32 *);
505}; 503};
506#endif /* __KERNEL__ */ 504#endif /* __KERNEL__ */
507 505
@@ -559,6 +557,7 @@ struct ethtool_ops {
559#define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */ 557#define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */
560#define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ 558#define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */
561#define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ 559#define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */
560#define ETHTOOL_RESET 0x00000034 /* Reset hardware */
562 561
563/* compatibility with older code */ 562/* compatibility with older code */
564#define SPARC_ETH_GSET ETHTOOL_GSET 563#define SPARC_ETH_GSET ETHTOOL_GSET
@@ -633,6 +632,8 @@ struct ethtool_ops {
633#define PORT_MII 0x02 632#define PORT_MII 0x02
634#define PORT_FIBRE 0x03 633#define PORT_FIBRE 0x03
635#define PORT_BNC 0x04 634#define PORT_BNC 0x04
635#define PORT_DA 0x05
636#define PORT_NONE 0xef
636#define PORT_OTHER 0xff 637#define PORT_OTHER 0xff
637 638
638/* Which transceiver to use. */ 639/* Which transceiver to use. */
@@ -676,6 +677,8 @@ struct ethtool_ops {
676#define AH_V6_FLOW 0x0b 677#define AH_V6_FLOW 0x0b
677#define ESP_V6_FLOW 0x0c 678#define ESP_V6_FLOW 0x0c
678#define IP_USER_FLOW 0x0d 679#define IP_USER_FLOW 0x0d
680#define IPV4_FLOW 0x10
681#define IPV6_FLOW 0x11
679 682
680/* L3-L4 network traffic flow hash options */ 683/* L3-L4 network traffic flow hash options */
681#define RXH_L2DA (1 << 1) 684#define RXH_L2DA (1 << 1)
@@ -689,4 +692,34 @@ struct ethtool_ops {
689 692
690#define RX_CLS_FLOW_DISC 0xffffffffffffffffULL 693#define RX_CLS_FLOW_DISC 0xffffffffffffffffULL
691 694
695/* Reset flags */
696/* The reset() operation must clear the flags for the components which
697 * were actually reset. On successful return, the flags indicate the
698 * components which were not reset, either because they do not exist
699 * in the hardware or because they cannot be reset independently. The
700 * driver must never reset any components that were not requested.
701 */
702enum ethtool_reset_flags {
703 /* These flags represent components dedicated to the interface
704 * the command is addressed to. Shift any flag left by
705 * ETH_RESET_SHARED_SHIFT to reset a shared component of the
706 * same type.
707 */
708 ETH_RESET_MGMT = 1 << 0, /* Management processor */
709 ETH_RESET_IRQ = 1 << 1, /* Interrupt requester */
710 ETH_RESET_DMA = 1 << 2, /* DMA engine */
711 ETH_RESET_FILTER = 1 << 3, /* Filtering/flow direction */
712 ETH_RESET_OFFLOAD = 1 << 4, /* Protocol offload */
713 ETH_RESET_MAC = 1 << 5, /* Media access controller */
714 ETH_RESET_PHY = 1 << 6, /* Transceiver/PHY */
715 ETH_RESET_RAM = 1 << 7, /* RAM shared between
716 * multiple components */
717
718 ETH_RESET_DEDICATED = 0x0000ffff, /* All components dedicated to
719 * this interface */
720 ETH_RESET_ALL = 0xffffffff, /* All components used by this
721 * interface, even if shared */
722};
723#define ETH_RESET_SHARED_SHIFT 16
724
692#endif /* _LINUX_ETHTOOL_H */ 725#endif /* _LINUX_ETHTOOL_H */