[PATCH v2 11/12] USB: serial: io_edgeport: replace atomic command allocations

From: Johan Hovold

Date: Fri Oct 23 2026 - 08:18:00 EST


With the line settings no longer being updated from the interrupt
completion handler there is no need for command URBs and buffers to be
allocated atomically.

Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
---
drivers/usb/serial/io_edgeport.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
index ebbe8c5370cd..d47c2295a7cf 100644
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -2079,7 +2079,7 @@ static int send_iosp_ext_cmd(struct edgeport_port *edge_port,
int length = 0;
int status = 0;

- buffer = kmalloc(10, GFP_ATOMIC);
+ buffer = kmalloc(10, GFP_KERNEL);
if (!buffer)
return -ENOMEM;

@@ -2114,7 +2114,7 @@ static int write_cmd_usb(struct edgeport_port *edge_port,
usb_serial_debug_data(dev, __func__, length, buffer);

/* Allocate our next urb */
- urb = usb_alloc_urb(0, GFP_ATOMIC);
+ urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb)
return -ENOMEM;

@@ -2125,8 +2125,7 @@ static int write_cmd_usb(struct edgeport_port *edge_port,

edge_port->commandPending = true;
usb_anchor_urb(urb, &edge_serial->cmd_anchor);
- status = usb_submit_urb(urb, GFP_ATOMIC);
-
+ status = usb_submit_urb(urb, GFP_KERNEL);
if (status) {
/* something went wrong */
dev_err(dev, "%s - usb_submit_urb(write command) failed, status = %d\n",
@@ -2183,7 +2182,7 @@ static int send_cmd_write_baud_rate(struct edgeport_port *edge_port,
}

/* Alloc memory for the string of commands. */
- cmdBuffer = kmalloc(0x100, GFP_ATOMIC);
+ cmdBuffer = kmalloc(0x100, GFP_KERNEL);
if (!cmdBuffer)
return -ENOMEM;

@@ -2277,7 +2276,7 @@ static int send_cmd_write_uart_register(struct edgeport_port *edge_port,
}

/* Alloc memory for the string of commands. */
- cmdBuffer = kmalloc(0x10, GFP_ATOMIC);
+ cmdBuffer = kmalloc(0x10, GFP_KERNEL);
if (cmdBuffer == NULL)
return -ENOMEM;

--
2.55.0