]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: ena: Remove autopolling mode
authorDr. David Alan Gilbert <linux@treblig.org>
Sun, 3 Nov 2024 19:41:49 +0000 (19:41 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 5 Nov 2024 02:12:56 +0000 (18:12 -0800)
This manually reverts
commit a4e262cde3cd ("net: ena: allow automatic fallback to polling mode")

which is unused.

(I did it manually because there are other minor comment
and function changes surrounding it).
Build tested only.

Suggested-by: David Arinzon <darinzon@amazon.com>
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://patch.msgid.link/20241103194149.293456-1-linux@treblig.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/amazon/ena/ena_com.c
drivers/net/ethernet/amazon/ena/ena_com.h

index d958cda9e58ba92d39d457e89e54fda82f819dd2..b23331ea2478a949a4bc2ee047262696bfe41c1f 100644 (file)
@@ -763,25 +763,16 @@ static int ena_com_wait_and_process_admin_cq_interrupts(struct ena_comp_ctx *com
 
                if (comp_ctx->status == ENA_CMD_COMPLETED) {
                        netdev_err(admin_queue->ena_dev->net_device,
-                                  "The ena device sent a completion but the driver didn't receive a MSI-X interrupt (cmd %d), autopolling mode is %s\n",
-                                  comp_ctx->cmd_opcode, admin_queue->auto_polling ? "ON" : "OFF");
-                       /* Check if fallback to polling is enabled */
-                       if (admin_queue->auto_polling)
-                               admin_queue->polling = true;
+                                  "The ena device sent a completion but the driver didn't receive a MSI-X interrupt (cmd %d)\n",
+                                  comp_ctx->cmd_opcode);
                } else {
                        netdev_err(admin_queue->ena_dev->net_device,
                                   "The ena device didn't send a completion for the admin cmd %d status %d\n",
                                   comp_ctx->cmd_opcode, comp_ctx->status);
                }
-               /* Check if shifted to polling mode.
-                * This will happen if there is a completion without an interrupt
-                * and autopolling mode is enabled. Continuing normal execution in such case
-                */
-               if (!admin_queue->polling) {
-                       admin_queue->running_state = false;
-                       ret = -ETIME;
-                       goto err;
-               }
+               admin_queue->running_state = false;
+               ret = -ETIME;
+               goto err;
        }
 
        ret = ena_com_comp_status_to_errno(admin_queue, comp_ctx->comp_status);
@@ -1650,12 +1641,6 @@ void ena_com_set_admin_polling_mode(struct ena_com_dev *ena_dev, bool polling)
        ena_dev->admin_queue.polling = polling;
 }
 
-void ena_com_set_admin_auto_polling_mode(struct ena_com_dev *ena_dev,
-                                        bool polling)
-{
-       ena_dev->admin_queue.auto_polling = polling;
-}
-
 int ena_com_mmio_reg_read_request_init(struct ena_com_dev *ena_dev)
 {
        struct ena_com_mmio_read *mmio_read = &ena_dev->mmio_read;
index a372c5e768a74ce6139a34b99b825735305e1b70..975876cfe720c44fa6357a5cbbd19e7b7281d6a1 100644 (file)
@@ -224,9 +224,6 @@ struct ena_com_admin_queue {
        /* Indicate if the admin queue should poll for completion */
        bool polling;
 
-       /* Define if fallback to polling mode should occur */
-       bool auto_polling;
-
        u16 curr_cmd_id;
 
        /* Indicate that the ena was initialized and can
@@ -493,17 +490,6 @@ bool ena_com_get_admin_running_state(struct ena_com_dev *ena_dev);
  */
 void ena_com_set_admin_polling_mode(struct ena_com_dev *ena_dev, bool polling);
 
-/* ena_com_set_admin_auto_polling_mode - Enable autoswitch to polling mode
- * @ena_dev: ENA communication layer struct
- * @polling: Enable/Disable polling mode
- *
- * Set the autopolling mode.
- * If autopolling is on:
- * In case of missing interrupt when data is available switch to polling.
- */
-void ena_com_set_admin_auto_polling_mode(struct ena_com_dev *ena_dev,
-                                        bool polling);
-
 /* ena_com_admin_q_comp_intr_handler - admin queue interrupt handler
  * @ena_dev: ENA communication layer struct
  *