aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/emulex/benet/be_ethtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be_ethtool.c')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_ethtool.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c
index 25f516d6eb9e..0cd3311409a8 100644
--- a/drivers/net/ethernet/emulex/benet/be_ethtool.c
+++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c
@@ -681,22 +681,21 @@ static int be_set_dump(struct net_device *netdev, struct ethtool_dump *dump)
681 struct device *dev = &adapter->pdev->dev; 681 struct device *dev = &adapter->pdev->dev;
682 int status; 682 int status;
683 683
684 if (!lancer_chip(adapter)) { 684 if (!lancer_chip(adapter) ||
685 dev_err(dev, "FW dump not supported\n"); 685 !check_privilege(adapter, MAX_PRIVILEGES))
686 return -EOPNOTSUPP; 686 return -EOPNOTSUPP;
687 }
688
689 if (dump_present(adapter)) {
690 dev_err(dev, "Previous dump not cleared, not forcing dump\n");
691 return 0;
692 }
693 687
694 switch (dump->flag) { 688 switch (dump->flag) {
695 case LANCER_INITIATE_FW_DUMP: 689 case LANCER_INITIATE_FW_DUMP:
696 status = lancer_initiate_dump(adapter); 690 status = lancer_initiate_dump(adapter);
697 if (!status) 691 if (!status)
698 dev_info(dev, "F/w dump initiated successfully\n"); 692 dev_info(dev, "FW dump initiated successfully\n");
699 break; 693 break;
694 case LANCER_DELETE_FW_DUMP:
695 status = lancer_delete_dump(adapter);
696 if (!status)
697 dev_info(dev, "FW dump deleted successfully\n");
698 break;
700 default: 699 default:
701 dev_err(dev, "Invalid dump level: 0x%x\n", dump->flag); 700 dev_err(dev, "Invalid dump level: 0x%x\n", dump->flag);
702 return -EINVAL; 701 return -EINVAL;