]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
staging: qlge: remove mpi_core_to_log which sends coredump to the kernel ring buffer
authorCoiby Xu <coiby.xu@gmail.com>
Sat, 23 Jan 2021 10:46:11 +0000 (18:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jan 2021 15:54:20 +0000 (16:54 +0100)
devlink health could be used to get coredump. No need to send so much
data to the kernel ring buffer.

Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
Link: https://lore.kernel.org/r/20210123104613.38359-7-coiby.xu@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/qlge/TODO
drivers/staging/qlge/qlge.h
drivers/staging/qlge/qlge_dbg.c
drivers/staging/qlge/qlge_ethtool.c
drivers/staging/qlge/qlge_main.c
drivers/staging/qlge/qlge_mpi.c

index 5ac55664c3e20460fa7f8109f3dd307aa46a1ac4..e68c95f477543b06b3f092880707f50f4a602d47 100644 (file)
@@ -18,8 +18,6 @@
   of questionable value. In particular, qlge_dbg.c has hundreds of lines of
   code bitrotting away in ifdef land (doesn't compile since commit
   18c49b91777c ("qlge: do vlan cleanup", v3.1-rc1), 8 years ago).
-* triggering an ethtool regdump will hexdump a 176k struct to dmesg depending
-  on some module parameters.
 * the flow control implementation in firmware is buggy (sends a flood of pause
   frames, resets the link, device and driver buffer queues become
   desynchronized), disable it by default
index 41f69751d34d41fb1bd1e7c99f42710a05b0895e..aa5721862140ec5484367539e0f6417feffb6f77 100644 (file)
@@ -2153,7 +2153,6 @@ struct qlge_adapter {
        u32 port_init;
        u32 link_status;
        struct qlge_mpi_coredump *mpi_coredump;
-       u32 core_is_dumped;
        u32 link_config;
        u32 led_config;
        u32 max_frame_size;
@@ -2166,7 +2165,6 @@ struct qlge_adapter {
        struct delayed_work mpi_work;
        struct delayed_work mpi_port_cfg_work;
        struct delayed_work mpi_idc_work;
-       struct delayed_work mpi_core_to_log;
        struct completion ide_completion;
        const struct nic_operations *nic_ops;
        u16 device_id;
@@ -2257,7 +2255,6 @@ int qlge_write_cfg(struct qlge_adapter *qdev, void *ptr, int size, u32 bit,
 void qlge_queue_fw_error(struct qlge_adapter *qdev);
 void qlge_mpi_work(struct work_struct *work);
 void qlge_mpi_reset_work(struct work_struct *work);
-void qlge_mpi_core_to_log(struct work_struct *work);
 int qlge_wait_reg_rdy(struct qlge_adapter *qdev, u32 reg, u32 bit, u32 ebit);
 void qlge_queue_asic_error(struct qlge_adapter *qdev);
 void qlge_set_ethtool_ops(struct net_device *ndev);
index b0d4ea071f3200f7cbf03c42f35f8bbd6f17b7da..5c64d6de3b30304efb27b82e63b9517e7e9e1b02 100644 (file)
@@ -1313,17 +1313,6 @@ void qlge_get_dump(struct qlge_adapter *qdev, void *buff)
        }
 }
 
-/* Coredump to messages log file using separate worker thread */
-void qlge_mpi_core_to_log(struct work_struct *work)
-{
-       struct qlge_adapter *qdev =
-               container_of(work, struct qlge_adapter, mpi_core_to_log.work);
-
-       print_hex_dump(KERN_DEBUG, "Core is dumping to log file!\n",
-                      DUMP_PREFIX_OFFSET, 32, 4, qdev->mpi_coredump,
-                      sizeof(*qdev->mpi_coredump), false);
-}
-
 #ifdef QL_REG_DUMP
 static void qlge_dump_intr_states(struct qlge_adapter *qdev)
 {
index 24b079523d5cb87240c1989ef84cfe3122b8fab8..3e911f147dfcf3a74c5cddec48a8ef8d005ece0e 100644 (file)
@@ -617,7 +617,6 @@ static void qlge_get_regs(struct net_device *ndev,
        struct qlge_adapter *qdev = netdev_to_qdev(ndev);
 
        qlge_get_dump(qdev, p);
-       qdev->core_is_dumped = 0;
        if (!test_bit(QL_FRC_COREDUMP, &qdev->flags))
                regs->len = sizeof(struct qlge_mpi_coredump);
        else
index 2ec688d3d94667ff52659873fd9963921d8853c9..747dbb54dde4961f0127ee03b4727327e2c1ab5e 100644 (file)
@@ -3800,7 +3800,6 @@ static void qlge_cancel_all_work_sync(struct qlge_adapter *qdev)
        cancel_delayed_work_sync(&qdev->mpi_reset_work);
        cancel_delayed_work_sync(&qdev->mpi_work);
        cancel_delayed_work_sync(&qdev->mpi_idc_work);
-       cancel_delayed_work_sync(&qdev->mpi_core_to_log);
        cancel_delayed_work_sync(&qdev->mpi_port_cfg_work);
 }
 
@@ -4493,7 +4492,6 @@ static int qlge_init_device(struct pci_dev *pdev, struct qlge_adapter *qdev,
        INIT_DELAYED_WORK(&qdev->mpi_work, qlge_mpi_work);
        INIT_DELAYED_WORK(&qdev->mpi_port_cfg_work, qlge_mpi_port_cfg_work);
        INIT_DELAYED_WORK(&qdev->mpi_idc_work, qlge_mpi_idc_work);
-       INIT_DELAYED_WORK(&qdev->mpi_core_to_log, qlge_mpi_core_to_log);
        init_completion(&qdev->ide_completion);
        mutex_init(&qdev->mpi_mutex);
 
index 2b77995ec76cfb224bcead9f89c01fa5651a4aa8..2630ebf5034132b05965a1aebcafdcc6edafdbbc 100644 (file)
@@ -1269,11 +1269,5 @@ void qlge_mpi_reset_work(struct work_struct *work)
                return;
        }
 
-       if (qdev->mpi_coredump && !qlge_core_dump(qdev, qdev->mpi_coredump)) {
-               netif_err(qdev, drv, qdev->ndev, "Core is dumped!\n");
-               qdev->core_is_dumped = 1;
-               queue_delayed_work(qdev->workqueue,
-                                  &qdev->mpi_core_to_log, 5 * HZ);
-       }
        qlge_soft_reset_mpi_risc(qdev);
 }