diff options
author | Manish chopra <manish.chopra@qlogic.com> | 2012-06-28 16:12:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-29 03:52:32 -0400 |
commit | a777c892cea917b6c67c61f8dff47d8caae7b8a1 (patch) | |
tree | dd2b03191897c203f13bda7fbc6ce0723c79ffcb | |
parent | d0087b29f77176480c27c203988b5704847d617c (diff) |
netxen_nic: restrict force firmware dump when dump is disabled.
o Set the ethtool_dump flag (=ETH_FW_DUMP_DISABLE) when dump is disabled.
o update driver version to 4.0.80
Signed-off-by: Manish chopra <manish.chopra@qlogic.com>
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/qlogic/netxen/netxen_nic.h | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c | 13 |
2 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic.h b/drivers/net/ethernet/qlogic/netxen/netxen_nic.h index 37ccbe54e62d..eb3dfdbb642b 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic.h +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic.h | |||
@@ -53,8 +53,8 @@ | |||
53 | 53 | ||
54 | #define _NETXEN_NIC_LINUX_MAJOR 4 | 54 | #define _NETXEN_NIC_LINUX_MAJOR 4 |
55 | #define _NETXEN_NIC_LINUX_MINOR 0 | 55 | #define _NETXEN_NIC_LINUX_MINOR 0 |
56 | #define _NETXEN_NIC_LINUX_SUBVERSION 79 | 56 | #define _NETXEN_NIC_LINUX_SUBVERSION 80 |
57 | #define NETXEN_NIC_LINUX_VERSIONID "4.0.79" | 57 | #define NETXEN_NIC_LINUX_VERSIONID "4.0.80" |
58 | 58 | ||
59 | #define NETXEN_VERSION_CODE(a, b, c) (((a) << 24) + ((b) << 16) + (c)) | 59 | #define NETXEN_VERSION_CODE(a, b, c) (((a) << 24) + ((b) << 16) + (c)) |
60 | #define _major(v) (((v) >> 24) & 0xff) | 60 | #define _major(v) (((v) >> 24) & 0xff) |
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c index 9103e3e36c28..10468e7932dd 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c | |||
@@ -826,7 +826,12 @@ netxen_get_dump_flag(struct net_device *netdev, struct ethtool_dump *dump) | |||
826 | dump->len = mdump->md_dump_size; | 826 | dump->len = mdump->md_dump_size; |
827 | else | 827 | else |
828 | dump->len = 0; | 828 | dump->len = 0; |
829 | dump->flag = mdump->md_capture_mask; | 829 | |
830 | if (!mdump->md_enabled) | ||
831 | dump->flag = ETH_FW_DUMP_DISABLE; | ||
832 | else | ||
833 | dump->flag = mdump->md_capture_mask; | ||
834 | |||
830 | dump->version = adapter->fw_version; | 835 | dump->version = adapter->fw_version; |
831 | return 0; | 836 | return 0; |
832 | } | 837 | } |
@@ -840,8 +845,10 @@ netxen_set_dump(struct net_device *netdev, struct ethtool_dump *val) | |||
840 | 845 | ||
841 | switch (val->flag) { | 846 | switch (val->flag) { |
842 | case NX_FORCE_FW_DUMP_KEY: | 847 | case NX_FORCE_FW_DUMP_KEY: |
843 | if (!mdump->md_enabled) | 848 | if (!mdump->md_enabled) { |
844 | mdump->md_enabled = 1; | 849 | netdev_info(netdev, "FW dump not enabled\n"); |
850 | return 0; | ||
851 | } | ||
845 | if (adapter->fw_mdump_rdy) { | 852 | if (adapter->fw_mdump_rdy) { |
846 | netdev_info(netdev, "Previous dump not cleared, not forcing dump\n"); | 853 | netdev_info(netdev, "Previous dump not cleared, not forcing dump\n"); |
847 | return 0; | 854 | return 0; |