diff options
Diffstat (limited to 'drivers/net/qlge/qlge_ethtool.c')
-rw-r--r-- | drivers/net/qlge/qlge_ethtool.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/net/qlge/qlge_ethtool.c b/drivers/net/qlge/qlge_ethtool.c index 4892d64f4e05..8149cc9de4ca 100644 --- a/drivers/net/qlge/qlge_ethtool.c +++ b/drivers/net/qlge/qlge_ethtool.c | |||
@@ -375,7 +375,10 @@ static void ql_get_drvinfo(struct net_device *ndev, | |||
375 | strncpy(drvinfo->bus_info, pci_name(qdev->pdev), 32); | 375 | strncpy(drvinfo->bus_info, pci_name(qdev->pdev), 32); |
376 | drvinfo->n_stats = 0; | 376 | drvinfo->n_stats = 0; |
377 | drvinfo->testinfo_len = 0; | 377 | drvinfo->testinfo_len = 0; |
378 | drvinfo->regdump_len = 0; | 378 | if (!test_bit(QL_FRC_COREDUMP, &qdev->flags)) |
379 | drvinfo->regdump_len = sizeof(struct ql_mpi_coredump); | ||
380 | else | ||
381 | drvinfo->regdump_len = sizeof(struct ql_reg_dump); | ||
379 | drvinfo->eedump_len = 0; | 382 | drvinfo->eedump_len = 0; |
380 | } | 383 | } |
381 | 384 | ||
@@ -547,7 +550,12 @@ static void ql_self_test(struct net_device *ndev, | |||
547 | 550 | ||
548 | static int ql_get_regs_len(struct net_device *ndev) | 551 | static int ql_get_regs_len(struct net_device *ndev) |
549 | { | 552 | { |
550 | return sizeof(struct ql_reg_dump); | 553 | struct ql_adapter *qdev = netdev_priv(ndev); |
554 | |||
555 | if (!test_bit(QL_FRC_COREDUMP, &qdev->flags)) | ||
556 | return sizeof(struct ql_mpi_coredump); | ||
557 | else | ||
558 | return sizeof(struct ql_reg_dump); | ||
551 | } | 559 | } |
552 | 560 | ||
553 | static void ql_get_regs(struct net_device *ndev, | 561 | static void ql_get_regs(struct net_device *ndev, |
@@ -555,7 +563,12 @@ static void ql_get_regs(struct net_device *ndev, | |||
555 | { | 563 | { |
556 | struct ql_adapter *qdev = netdev_priv(ndev); | 564 | struct ql_adapter *qdev = netdev_priv(ndev); |
557 | 565 | ||
558 | ql_gen_reg_dump(qdev, p); | 566 | ql_get_dump(qdev, p); |
567 | qdev->core_is_dumped = 0; | ||
568 | if (!test_bit(QL_FRC_COREDUMP, &qdev->flags)) | ||
569 | regs->len = sizeof(struct ql_mpi_coredump); | ||
570 | else | ||
571 | regs->len = sizeof(struct ql_reg_dump); | ||
559 | } | 572 | } |
560 | 573 | ||
561 | static int ql_get_coalesce(struct net_device *dev, struct ethtool_coalesce *c) | 574 | static int ql_get_coalesce(struct net_device *dev, struct ethtool_coalesce *c) |