[PATCH 10/11] USB: serial: io_edgeport: replace atomic command allocations
From: Johan Hovold
Date: Wed Oct 21 2026 - 10:25:21 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 fd983ebd1b6d..fbb8249bb5b7 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;
@@ -2128,8 +2128,7 @@ static int write_cmd_usb(struct edgeport_port *edge_port,
buffer, length, edge_bulk_out_cmd_callback, edge_port);
edge_port->commandPending = true;
- 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",
@@ -2186,7 +2185,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;
@@ -2280,7 +2279,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