On Sun, Mar 17, 2002 at 10:57:40AM -0800, Greg KH wrote:
> [EMAIL PROTECTED], 2002-03-17 10:31:22-08:00, [EMAIL PROTECTED]
> USB serial drivers
>
> Several functions in the serial drivers can be called from bottom
> half or interrupt context. They must use the GFP_ATOMIC flag for
> calls to kmalloc() and usb_submit_urb().
>
> Functions which must use GFP_ATOMIC:
> 1. All *_callback() functions.
> 2. Any code which is inside a spinlock.
> 3. write(), throttle(), unthrottle(), which may be called by
> the line discipline in bottom half context.
>
> Functions which can use GFP_KERNEL:
> 1. open(), close(), startup(), shutdown(), set_termios().
>
> drivers/usb/serial/cyberjack.c | 8 ++++----
> drivers/usb/serial/digi_acceleport.c | 14 +++++++-------
> drivers/usb/serial/empeg.c | 8 ++++----
> drivers/usb/serial/ftdi_sio.c | 4 ++--
> drivers/usb/serial/io_edgeport.c | 18 +++++++++---------
> drivers/usb/serial/ipaq.c | 4 ++--
> drivers/usb/serial/ir-usb.c | 4 ++--
> drivers/usb/serial/keyspan.c | 14 +++++++-------
> drivers/usb/serial/keyspan_pda.c | 4 ++--
> drivers/usb/serial/kl5kusb105.c | 8 ++++----
> drivers/usb/serial/mct_u232.c | 2 +-
> drivers/usb/serial/omninet.c | 4 ++--
> drivers/usb/serial/pl2303.c | 8 ++++----
> drivers/usb/serial/usbserial.c | 4 ++--
> drivers/usb/serial/visor.c | 10 +++++-----
> drivers/usb/serial/whiteheat.c | 2 +-
> 16 files changed, 58 insertions(+), 58 deletions(-)
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.527 -> 1.528
# drivers/usb/serial/kl5kusb105.c 1.4 -> 1.5
# drivers/usb/serial/io_edgeport.c 1.24 -> 1.25
# drivers/usb/serial/keyspan.c 1.22 -> 1.23
# drivers/usb/serial/ftdi_sio.c 1.25 -> 1.26
# drivers/usb/serial/ipaq.c 1.4 -> 1.5
# drivers/usb/serial/visor.c 1.25 -> 1.26
# drivers/usb/serial/omninet.c 1.16 -> 1.17
# drivers/usb/serial/whiteheat.c 1.15 -> 1.16
# drivers/usb/serial/usbserial.c 1.25 -> 1.26
# drivers/usb/serial/empeg.c 1.21 -> 1.22
# drivers/usb/serial/pl2303.c 1.11 -> 1.12
# drivers/usb/serial/ir-usb.c 1.11 -> 1.12
# drivers/usb/serial/digi_acceleport.c 1.16 -> 1.17
# drivers/usb/serial/keyspan_pda.c 1.13 -> 1.14
# drivers/usb/serial/mct_u232.c 1.20 -> 1.21
# drivers/usb/serial/cyberjack.c 1.11 -> 1.12
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/03/17 [EMAIL PROTECTED] 1.528
# USB serial drivers
#
# Several functions in the serial drivers can be called from bottom
# half or interrupt context. They must use the GFP_ATOMIC flag for
# calls to kmalloc() and usb_submit_urb().
#
# Functions which must use GFP_ATOMIC:
# 1. All *_callback() functions.
# 2. Any code which is inside a spinlock.
# 3. write(), throttle(), unthrottle(), which may be called by
# the line discipline in bottom half context.
#
# Functions which can use GFP_KERNEL:
# 1. open(), close(), startup(), shutdown(), set_termios().
# --------------------------------------------
#
diff -Nru a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
--- a/drivers/usb/serial/cyberjack.c Sun Mar 17 11:01:28 2002
+++ b/drivers/usb/serial/cyberjack.c Sun Mar 17 11:01:28 2002
@@ -262,7 +262,7 @@
port);
/* send the data out the bulk port */
- result = usb_submit_urb(port->write_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result) {
err(__FUNCTION__ " - failed submitting write urb, error %d",
result);
/* Throw away data. No better idea what to do with it. */
@@ -331,7 +331,7 @@
if( !old_rdtodo ) {
port->read_urb->dev = port->serial->dev;
- result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if( result )
err(__FUNCTION__ " - failed resubmitting read urb,
error %d", result);
dbg(__FUNCTION__ " - usb_submit_urb(read urb)");
@@ -387,7 +387,7 @@
/* Continue to read if we have still urbs to do. */
if( priv->rdtodo /* || (urb->actual_length==port->bulk_in_endpointAddress)*/ )
{
port->read_urb->dev = port->serial->dev;
- result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
err(__FUNCTION__ " - failed resubmitting read urb, error %d",
result);
dbg(__FUNCTION__ " - usb_submit_urb(read urb)");
@@ -440,7 +440,7 @@
port);
/* send the data out the bulk port */
- result = usb_submit_urb(port->write_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result) {
err(__FUNCTION__ " - failed submitting write urb, error %d",
result);
/* Throw away data. No better idea what to do with it. */
diff -Nru a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
--- a/drivers/usb/serial/digi_acceleport.c Sun Mar 17 11:01:28 2002
+++ b/drivers/usb/serial/digi_acceleport.c Sun Mar 17 11:01:28 2002
@@ -676,7 +676,7 @@
oob_port->write_urb->transfer_buffer_length = len;
oob_port->write_urb->dev = port->serial->dev;
- if( (ret=usb_submit_urb(oob_port->write_urb, GFP_KERNEL)) == 0 ) {
+ if( (ret=usb_submit_urb(oob_port->write_urb, GFP_ATOMIC)) == 0 ) {
oob_priv->dp_write_urb_in_use = 1;
count -= len;
buf += len;
@@ -764,7 +764,7 @@
}
port->write_urb->dev = port->serial->dev;
- if( (ret=usb_submit_urb(port->write_urb, GFP_KERNEL)) == 0 ) {
+ if( (ret=usb_submit_urb(port->write_urb, GFP_ATOMIC)) == 0 ) {
priv->dp_write_urb_in_use = 1;
priv->dp_out_buf_len = 0;
count -= len;
@@ -841,7 +841,7 @@
oob_port->write_urb->transfer_buffer_length = 8;
oob_port->write_urb->dev = port->serial->dev;
- if( (ret=usb_submit_urb(oob_port->write_urb, GFP_KERNEL)) == 0 ) {
+ if( (ret=usb_submit_urb(oob_port->write_urb, GFP_ATOMIC)) == 0 ) {
oob_priv->dp_write_urb_in_use = 1;
port_priv->dp_modem_signals =
(port_priv->dp_modem_signals&~(TIOCM_DTR|TIOCM_RTS))
@@ -962,7 +962,7 @@
/* restart read chain */
if( priv->dp_throttle_restart ) {
port->read_urb->dev = port->serial->dev;
- ret = usb_submit_urb( port->read_urb, GFP_KERNEL );
+ ret = usb_submit_urb( port->read_urb, GFP_ATOMIC );
}
/* turn throttle off */
@@ -1323,7 +1323,7 @@
/* copy in new data */
memcpy( data, from_user ? user_buf : buf, new_len );
- if( (ret=usb_submit_urb(port->write_urb, GFP_KERNEL)) == 0 ) {
+ if( (ret=usb_submit_urb(port->write_urb, GFP_ATOMIC)) == 0 ) {
priv->dp_write_urb_in_use = 1;
ret = new_len;
priv->dp_out_buf_len = 0;
@@ -1399,7 +1399,7 @@
memcpy( port->write_urb->transfer_buffer+2, priv->dp_out_buf,
priv->dp_out_buf_len );
- if( (ret=usb_submit_urb(port->write_urb, GFP_KERNEL)) == 0 ) {
+ if( (ret=usb_submit_urb(port->write_urb, GFP_ATOMIC)) == 0 ) {
priv->dp_write_urb_in_use = 1;
priv->dp_out_buf_len = 0;
}
@@ -1837,7 +1837,7 @@
/* continue read */
urb->dev = port->serial->dev;
- if( (ret=usb_submit_urb(urb, GFP_KERNEL)) != 0 ) {
+ if( (ret=usb_submit_urb(urb, GFP_ATOMIC)) != 0 ) {
err( __FUNCTION__ ": failed resubmitting urb, ret=%d, port=%d",
ret, priv->dp_port_num );
}
diff -Nru a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
--- a/drivers/usb/serial/empeg.c Sun Mar 17 11:01:28 2002
+++ b/drivers/usb/serial/empeg.c Sun Mar 17 11:01:28 2002
@@ -256,7 +256,7 @@
}
if (urb->transfer_buffer == NULL) {
- urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE,
GFP_KERNEL);
+ urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE,
+GFP_ATOMIC);
if (urb->transfer_buffer == NULL) {
err(__FUNCTION__" no more kernel memory...");
goto exit;
@@ -288,7 +288,7 @@
urb->transfer_flags |= USB_QUEUE_BULK;
/* send it down the pipe */
- status = usb_submit_urb(urb, GFP_KERNEL);
+ status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) {
err(__FUNCTION__ " - usb_submit_urb(write bulk) failed with
status = %d", status);
bytes_sent = status;
@@ -441,7 +441,7 @@
port->read_urb->transfer_flags |= USB_QUEUE_BULK;
- result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
@@ -466,7 +466,7 @@
port->read_urb->dev = port->serial->dev;
- result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
err(__FUNCTION__ " - failed submitting read urb, error %d", result);
diff -Nru a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
--- a/drivers/usb/serial/ftdi_sio.c Sun Mar 17 11:01:28 2002
+++ b/drivers/usb/serial/ftdi_sio.c Sun Mar 17 11:01:28 2002
@@ -469,7 +469,7 @@
port->write_urb->transfer_buffer, count,
ftdi_sio_write_bulk_callback, port);
- result = usb_submit_urb(port->write_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result) {
err(__FUNCTION__ " - failed submitting write urb, error %d", result);
return 0;
@@ -631,7 +631,7 @@
port->read_urb->transfer_buffer,
port->read_urb->transfer_buffer_length,
ftdi_sio_read_bulk_callback, port);
- result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
--- a/drivers/usb/serial/io_edgeport.c Sun Mar 17 11:01:28 2002
+++ b/drivers/usb/serial/io_edgeport.c Sun Mar 17 11:01:28 2002
@@ -790,7 +790,7 @@
/* we have pending bytes on the bulk in pipe,
send a request */
edge_serial->read_urb->dev =
edge_serial->serial->dev;
- result = usb_submit_urb(edge_serial->read_urb,
GFP_KERNEL);
+ result = usb_submit_urb(edge_serial->read_urb,
+GFP_ATOMIC);
if (result) {
dbg(__FUNCTION__" -
usb_submit_urb(read bulk) failed with result = %d", result);
}
@@ -867,7 +867,7 @@
/* there is, so resubmit our urb */
edge_serial->read_urb->dev = edge_serial->serial->dev;
- status = usb_submit_urb(edge_serial->read_urb, GFP_KERNEL);
+ status = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC);
if (status) {
err(__FUNCTION__" - usb_submit_urb(read bulk) failed,
status = %d", status);
}
@@ -1435,7 +1435,7 @@
/* build the data header for the buffer and port that we are about to send out
*/
count = fifo->count;
- buffer = kmalloc (count+2, GFP_KERNEL);
+ buffer = kmalloc (count+2, GFP_ATOMIC);
if (buffer == NULL) {
err(__FUNCTION__" - no more kernel memory...");
edge_port->write_in_progress = FALSE;
@@ -1474,7 +1474,7 @@
urb->transfer_flags |= USB_QUEUE_BULK;
urb->dev = edge_serial->serial->dev;
- status = usb_submit_urb(urb, GFP_KERNEL);
+ status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) {
/* something went wrong */
dbg(__FUNCTION__" - usb_submit_urb(write bulk) failed");
@@ -2431,7 +2431,7 @@
dbg(__FUNCTION__" - %d, %d", command, param);
- buffer = kmalloc (10, GFP_KERNEL);
+ buffer = kmalloc (10, GFP_ATOMIC);
if (!buffer) {
err(__FUNCTION__" - kmalloc(%d) failed.\n", 10);
return -ENOMEM;
@@ -2467,7 +2467,7 @@
usb_serial_debug_data (__FILE__, __FUNCTION__, length, buffer);
/* Allocate our next urb */
- urb = usb_alloc_urb (0, GFP_KERNEL);
+ urb = usb_alloc_urb (0, GFP_ATOMIC);
if (!urb)
return -ENOMEM;
@@ -2482,7 +2482,7 @@
urb->transfer_flags |= USB_QUEUE_BULK;
edge_port->commandPending = TRUE;
- status = usb_submit_urb(urb, GFP_KERNEL);
+ status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) {
/* something went wrong */
@@ -2532,7 +2532,7 @@
}
// Alloc memory for the string of commands.
- cmdBuffer = kmalloc (0x100, GFP_KERNEL);
+ cmdBuffer = kmalloc (0x100, GFP_ATOMIC);
if (!cmdBuffer) {
err(__FUNCTION__" - kmalloc(%d) failed.\n", 0x100);
return -ENOMEM;
@@ -2618,7 +2618,7 @@
dbg (__FUNCTION__" - write to %s register 0x%02x", (regNum == MCR) ? "MCR" :
"LCR", regValue);
// Alloc memory for the string of commands.
- cmdBuffer = kmalloc (0x10, GFP_KERNEL);
+ cmdBuffer = kmalloc (0x10, GFP_ATOMIC);
if (cmdBuffer == NULL ) {
return -ENOMEM;
}
diff -Nru a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
--- a/drivers/usb/serial/ipaq.c Sun Mar 17 11:01:28 2002
+++ b/drivers/usb/serial/ipaq.c Sun Mar 17 11:01:28 2002
@@ -297,7 +297,7 @@
usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
port->read_urb->transfer_buffer,
port->read_urb->transfer_buffer_length,
ipaq_read_bulk_callback, port);
- result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
return;
@@ -412,7 +412,7 @@
usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress),
port->write_urb->transfer_buffer, count,
ipaq_write_bulk_callback,
port);
- result = usb_submit_urb(urb, GFP_KERNEL);
+ result = usb_submit_urb(urb, GFP_ATOMIC);
if (result) {
err(__FUNCTION__ " - failed submitting write urb, error %d", result);
}
diff -Nru a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
--- a/drivers/usb/serial/ir-usb.c Sun Mar 17 11:01:28 2002
+++ b/drivers/usb/serial/ir-usb.c Sun Mar 17 11:01:28 2002
@@ -405,7 +405,7 @@
= USB_QUEUE_BULK
| USB_ZERO_PACKET;
- result = usb_submit_urb (port->write_urb, GFP_KERNEL);
+ result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
if (result)
err("%s - failed submitting write urb, error %d", __FUNCTION__,
result);
else
@@ -515,7 +515,7 @@
port->read_urb->transfer_flags = USB_QUEUE_BULK;
- result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
err("%s - failed resubmitting read urb, error %d",
diff -Nru a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
--- a/drivers/usb/serial/keyspan.c Sun Mar 17 11:01:28 2002
+++ b/drivers/usb/serial/keyspan.c Sun Mar 17 11:01:28 2002
@@ -378,7 +378,7 @@
this_urb->transfer_flags &= ~USB_ASYNC_UNLINK;
this_urb->dev = port->serial->dev;
- if ((err = usb_submit_urb(this_urb, GFP_KERNEL)) != 0) {
+ if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
dbg("usb_submit_urb(write bulk) failed (%d)\n", err);
}
p_priv->tx_start_time[flip] = jiffies;
@@ -436,7 +436,7 @@
/* Resubmit urb so we continue receiving */
urb->dev = port->serial->dev;
- if ((err = usb_submit_urb(urb, GFP_KERNEL)) != 0) {
+ if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
}
return;
@@ -535,7 +535,7 @@
exit:
/* Resubmit urb so we continue receiving */
urb->dev = serial->dev;
- if ((err = usb_submit_urb(urb, GFP_KERNEL)) != 0) {
+ if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
}
}
@@ -586,7 +586,7 @@
/* Resubmit urb so we continue receiving */
urb->dev = port->serial->dev;
- if ((err = usb_submit_urb(urb, GFP_KERNEL)) != 0) {
+ if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n",
err);
}
@@ -671,7 +671,7 @@
exit:
/* Resubmit urb so we continue receiving */
urb->dev = serial->dev;
- if ((err = usb_submit_urb(urb, GFP_KERNEL)) != 0) {
+ if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
}
}
@@ -764,7 +764,7 @@
/* Resubmit urb so we continue receiving */
urb->dev = serial->dev;
- if ((err = usb_submit_urb(urb, GFP_KERNEL)) != 0) {
+ if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
}
}
@@ -819,7 +819,7 @@
/* Resubmit urb so we continue receiving */
urb->dev = port->serial->dev;
- if ((err = usb_submit_urb(urb, GFP_KERNEL)) != 0) {
+ if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
}
}
diff -Nru a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
--- a/drivers/usb/serial/keyspan_pda.c Sun Mar 17 11:01:28 2002
+++ b/drivers/usb/serial/keyspan_pda.c Sun Mar 17 11:01:28 2002
@@ -292,7 +292,7 @@
/* just restart the receive interrupt URB */
dbg("keyspan_pda_rx_unthrottle port %d", port->number);
port->interrupt_in_urb->dev = port->serial->dev;
- if (usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL))
+ if (usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC))
dbg(" usb_submit_urb(read urb) failed");
return;
}
@@ -584,7 +584,7 @@
priv->tx_room -= count;
port->write_urb->dev = port->serial->dev;
- rc = usb_submit_urb(port->write_urb, GFP_KERNEL);
+ rc = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (rc) {
dbg(" usb_submit_urb(write bulk) failed");
goto exit;
diff -Nru a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c
--- a/drivers/usb/serial/kl5kusb105.c Sun Mar 17 11:01:28 2002
+++ b/drivers/usb/serial/kl5kusb105.c Sun Mar 17 11:01:28 2002
@@ -519,7 +519,7 @@
}
if (urb->transfer_buffer == NULL) {
- urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE,
GFP_KERNEL);
+ urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE,
+GFP_ATOMIC);
if (urb->transfer_buffer == NULL) {
err(__FUNCTION__ " - no more kernel memory...");
goto exit;
@@ -555,7 +555,7 @@
/* send the data out the bulk port */
- result = usb_submit_urb(urb, GFP_KERNEL);
+ result = usb_submit_urb(urb, GFP_ATOMIC);
if (result) {
err(__FUNCTION__
" - failed submitting write urb, error %d", result);
@@ -721,7 +721,7 @@
port->read_urb->transfer_buffer_length,
klsi_105_read_bulk_callback,
port);
- rc = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ rc = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (rc)
err(__FUNCTION__
" - failed resubmitting read urb, error %d", rc);
@@ -1019,7 +1019,7 @@
dbg(__FUNCTION__ " - port %d", port->number);
port->read_urb->dev = port->serial->dev;
- result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
err(__FUNCTION__ " - failed submitting read urb, error %d",
result);
diff -Nru a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
--- a/drivers/usb/serial/mct_u232.c Sun Mar 17 11:01:28 2002
+++ b/drivers/usb/serial/mct_u232.c Sun Mar 17 11:01:28 2002
@@ -470,7 +470,7 @@
port);
/* send the data out the bulk port */
- result = usb_submit_urb(port->write_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result) {
err(__FUNCTION__
" - failed submitting write urb, error %d", result);
diff -Nru a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
--- a/drivers/usb/serial/omninet.c Sun Mar 17 11:01:28 2002
+++ b/drivers/usb/serial/omninet.c Sun Mar 17 11:01:28 2002
@@ -265,7 +265,7 @@
usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
urb->transfer_buffer, urb->transfer_buffer_length,
omninet_read_bulk_callback, port);
- result = usb_submit_urb(urb, GFP_KERNEL);
+ result = usb_submit_urb(urb, GFP_ATOMIC);
if (result)
err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
@@ -316,7 +316,7 @@
wport->write_urb->transfer_buffer_length = 64;
wport->write_urb->dev = serial->dev;
- result = usb_submit_urb(wport->write_urb, GFP_KERNEL);
+ result = usb_submit_urb(wport->write_urb, GFP_ATOMIC);
if (result)
err(__FUNCTION__ " - failed submitting write urb, error %d", result);
else
diff -Nru a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
--- a/drivers/usb/serial/pl2303.c Sun Mar 17 11:01:28 2002
+++ b/drivers/usb/serial/pl2303.c Sun Mar 17 11:01:28 2002
@@ -195,7 +195,7 @@
port->write_urb->transfer_buffer_length = count;
port->write_urb->dev = port->serial->dev;
- result = usb_submit_urb (port->write_urb, GFP_KERNEL);
+ result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
if (result)
err(__FUNCTION__ " - failed submitting write urb, error %d", result);
else
@@ -643,7 +643,7 @@
dbg (__FUNCTION__ " - caught -EPROTO, resubmitting the urb");
urb->status = 0;
urb->dev = serial->dev;
- result = usb_submit_urb(urb, GFP_KERNEL);
+ result = usb_submit_urb(urb, GFP_ATOMIC);
if (result)
err(__FUNCTION__ " - failed resubmitting read urb,
error %d", result);
return;
@@ -668,7 +668,7 @@
/* Schedule the next read _if_ we are still open */
if (port->open_count) {
urb->dev = serial->dev;
- result = usb_submit_urb(urb, GFP_KERNEL);
+ result = usb_submit_urb(urb, GFP_ATOMIC);
if (result)
err(__FUNCTION__ " - failed resubmitting read urb, error %d",
result);
}
@@ -697,7 +697,7 @@
dbg (__FUNCTION__ " - nonzero write bulk status received: %d",
urb->status);
port->write_urb->transfer_buffer_length = 1;
port->write_urb->dev = port->serial->dev;
- result = usb_submit_urb (port->write_urb, GFP_KERNEL);
+ result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
if (result)
err(__FUNCTION__ " - failed resubmitting write urb, error %d",
result);
diff -Nru a/drivers/usb/serial/usbserial.c b/drivers/usb/serial/usbserial.c
--- a/drivers/usb/serial/usbserial.c Sun Mar 17 11:01:28 2002
+++ b/drivers/usb/serial/usbserial.c Sun Mar 17 11:01:28 2002
@@ -899,7 +899,7 @@
generic_write_bulk_callback), port);
/* send the data out the bulk port */
- result = usb_submit_urb(port->write_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result)
err(__FUNCTION__ " - failed submitting write urb, error %d",
result);
else
@@ -989,7 +989,7 @@
((serial->type->read_bulk_callback) ?
serial->type->read_bulk_callback :
generic_read_bulk_callback), port);
- result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
}
diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
--- a/drivers/usb/serial/visor.c Sun Mar 17 11:01:28 2002
+++ b/drivers/usb/serial/visor.c Sun Mar 17 11:01:28 2002
@@ -344,13 +344,13 @@
dbg(__FUNCTION__ " - port %d", port->number);
- buffer = kmalloc (count, GFP_KERNEL);
+ buffer = kmalloc (count, GFP_ATOMIC);
if (!buffer) {
err ("out of memory");
return -ENOMEM;
}
- urb = usb_alloc_urb(0, GFP_KERNEL);
+ urb = usb_alloc_urb(0, GFP_ATOMIC);
if (!urb) {
err ("no more free urbs");
kfree (buffer);
@@ -377,7 +377,7 @@
urb->transfer_flags |= USB_QUEUE_BULK;
/* send it down the pipe */
- status = usb_submit_urb(urb, GFP_KERNEL);
+ status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) {
err(__FUNCTION__ " - usb_submit_urb(write bulk) failed with status =
%d", status);
count = status;
@@ -491,7 +491,7 @@
port->read_urb->transfer_buffer,
port->read_urb->transfer_buffer_length,
visor_read_bulk_callback, port);
- result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
return;
@@ -512,7 +512,7 @@
dbg(__FUNCTION__ " - port %d", port->number);
port->read_urb->dev = port->serial->dev;
- result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
err(__FUNCTION__ " - failed submitting read urb, error %d", result);
}
diff -Nru a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
--- a/drivers/usb/serial/whiteheat.c Sun Mar 17 11:01:28 2002
+++ b/drivers/usb/serial/whiteheat.c Sun Mar 17 11:01:28 2002
@@ -240,7 +240,7 @@
usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
port->read_urb->transfer_buffer,
port->read_urb->transfer_buffer_length,
command_port_read_callback, port);
- result = usb_submit_urb(port->read_urb, GFP_KERNEL);
+ result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
dbg(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
}
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel