aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ethtool.h
diff options
context:
space:
mode:
authorAjit Khaparde <ajitk@serverengines.com>2009-09-02 13:02:55 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-03 02:07:39 -0400
commit05c6a8d7a7d778f26d8eb821556988993b766092 (patch)
treeff76707c7433b2931a66d209d09e01325fc75274 /include/linux/ethtool.h
parent451f14439847db302e5104c44458b2dbb4b1829d (diff)
net/ethtool: Add support for the ethtool feature to flash firmware image from a specified file.
This patch adds support to flash a firmware image to a device using ethtool. The driver gets the filename of the firmware image and flashes the image using the request firmware path. The region "on the chip" to be flashed can be specified by an option. It is upto the device driver to enumerate the region number passed by ethtool, to the region to be flashed. The default behavior is to flash all the regions on the chip. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r--include/linux/ethtool.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 90c4a3616d94..15e4eb713694 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -362,6 +362,18 @@ struct ethtool_rxnfc {
362 __u32 rule_locs[0]; 362 __u32 rule_locs[0];
363}; 363};
364 364
365#define ETHTOOL_FLASH_MAX_FILENAME 128
366enum ethtool_flash_op_type {
367 ETHTOOL_FLASH_ALL_REGIONS = 0,
368};
369
370/* for passing firmware flashing related parameters */
371struct ethtool_flash {
372 __u32 cmd;
373 __u32 region;
374 char data[ETHTOOL_FLASH_MAX_FILENAME];
375};
376
365#ifdef __KERNEL__ 377#ifdef __KERNEL__
366 378
367struct net_device; 379struct net_device;
@@ -489,6 +501,7 @@ struct ethtool_ops {
489 int (*get_stats_count)(struct net_device *);/* use get_sset_count */ 501 int (*get_stats_count)(struct net_device *);/* use get_sset_count */
490 int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *); 502 int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *);
491 int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); 503 int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *);
504 int (*flash_device)(struct net_device *, struct ethtool_flash *);
492}; 505};
493#endif /* __KERNEL__ */ 506#endif /* __KERNEL__ */
494 507
@@ -545,6 +558,7 @@ struct ethtool_ops {
545#define ETHTOOL_GRXCLSRLALL 0x00000030 /* Get all RX classification rule */ 558#define ETHTOOL_GRXCLSRLALL 0x00000030 /* Get all RX classification rule */
546#define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */ 559#define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */
547#define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ 560#define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */
561#define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */
548 562
549/* compatibility with older code */ 563/* compatibility with older code */
550#define SPARC_ETH_GSET ETHTOOL_GSET 564#define SPARC_ETH_GSET ETHTOOL_GSET