aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2006-09-25 06:51:41 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-28 18:36:43 -0400
commite81ee637e4aed723f71007c90a901268317ed6d6 (patch)
tree25fec34b4577eb36b52b8e4e45a191138ac49404 /drivers/usb
parent2e3a43f0b6f16705ec76d3744b82a116965ebebe (diff)
usb-serial: possible irq lock inversion (PPP vs. usb/serial)
========================================================= [ INFO: possible irq lock inversion dependency detected ]
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/cyberjack.c6
-rw-r--r--drivers/usb/serial/generic.c6
-rw-r--r--drivers/usb/serial/ipw.c6
-rw-r--r--drivers/usb/serial/ir-usb.c6
-rw-r--r--drivers/usb/serial/keyspan_pda.c6
-rw-r--r--drivers/usb/serial/omninet.c6
-rw-r--r--drivers/usb/serial/safe_serial.c6
7 files changed, 21 insertions, 21 deletions
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
index 6286aba86fae..d954ec34b018 100644
--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
@@ -214,14 +214,14 @@ static int cyberjack_write (struct usb_serial_port *port, const unsigned char *b
214 return (0); 214 return (0);
215 } 215 }
216 216
217 spin_lock(&port->lock); 217 spin_lock_bh(&port->lock);
218 if (port->write_urb_busy) { 218 if (port->write_urb_busy) {
219 spin_unlock(&port->lock); 219 spin_unlock_bh(&port->lock);
220 dbg("%s - already writing", __FUNCTION__); 220 dbg("%s - already writing", __FUNCTION__);
221 return 0; 221 return 0;
222 } 222 }
223 port->write_urb_busy = 1; 223 port->write_urb_busy = 1;
224 spin_unlock(&port->lock); 224 spin_unlock_bh(&port->lock);
225 225
226 spin_lock_irqsave(&priv->lock, flags); 226 spin_lock_irqsave(&priv->lock, flags);
227 227
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 172713556393..21cbaa0fb96b 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -175,14 +175,14 @@ int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char *
175 175
176 /* only do something if we have a bulk out endpoint */ 176 /* only do something if we have a bulk out endpoint */
177 if (serial->num_bulk_out) { 177 if (serial->num_bulk_out) {
178 spin_lock(&port->lock); 178 spin_lock_bh(&port->lock);
179 if (port->write_urb_busy) { 179 if (port->write_urb_busy) {
180 spin_unlock(&port->lock); 180 spin_unlock_bh(&port->lock);
181 dbg("%s - already writing", __FUNCTION__); 181 dbg("%s - already writing", __FUNCTION__);
182 return 0; 182 return 0;
183 } 183 }
184 port->write_urb_busy = 1; 184 port->write_urb_busy = 1;
185 spin_unlock(&port->lock); 185 spin_unlock_bh(&port->lock);
186 186
187 count = (count > port->bulk_out_size) ? port->bulk_out_size : count; 187 count = (count > port->bulk_out_size) ? port->bulk_out_size : count;
188 188
diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c
index 87306cb6f9f5..812bc213a963 100644
--- a/drivers/usb/serial/ipw.c
+++ b/drivers/usb/serial/ipw.c
@@ -394,14 +394,14 @@ static int ipw_write(struct usb_serial_port *port, const unsigned char *buf, int
394 return 0; 394 return 0;
395 } 395 }
396 396
397 spin_lock(&port->lock); 397 spin_lock_bh(&port->lock);
398 if (port->write_urb_busy) { 398 if (port->write_urb_busy) {
399 spin_unlock(&port->lock); 399 spin_unlock_bh(&port->lock);
400 dbg("%s - already writing", __FUNCTION__); 400 dbg("%s - already writing", __FUNCTION__);
401 return 0; 401 return 0;
402 } 402 }
403 port->write_urb_busy = 1; 403 port->write_urb_busy = 1;
404 spin_unlock(&port->lock); 404 spin_unlock_bh(&port->lock);
405 405
406 count = min(count, port->bulk_out_size); 406 count = min(count, port->bulk_out_size);
407 memcpy(port->bulk_out_buffer, buf, count); 407 memcpy(port->bulk_out_buffer, buf, count);
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
index 1738b0b6a376..1b348df388ed 100644
--- a/drivers/usb/serial/ir-usb.c
+++ b/drivers/usb/serial/ir-usb.c
@@ -342,14 +342,14 @@ static int ir_write (struct usb_serial_port *port, const unsigned char *buf, int
342 if (count == 0) 342 if (count == 0)
343 return 0; 343 return 0;
344 344
345 spin_lock(&port->lock); 345 spin_lock_bh(&port->lock);
346 if (port->write_urb_busy) { 346 if (port->write_urb_busy) {
347 spin_unlock(&port->lock); 347 spin_unlock_bh(&port->lock);
348 dbg("%s - already writing", __FUNCTION__); 348 dbg("%s - already writing", __FUNCTION__);
349 return 0; 349 return 0;
350 } 350 }
351 port->write_urb_busy = 1; 351 port->write_urb_busy = 1;
352 spin_unlock(&port->lock); 352 spin_unlock_bh(&port->lock);
353 353
354 transfer_buffer = port->write_urb->transfer_buffer; 354 transfer_buffer = port->write_urb->transfer_buffer;
355 transfer_size = min(count, port->bulk_out_size - 1); 355 transfer_size = min(count, port->bulk_out_size - 1);
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index 49b8dc039d1f..59e777f1e8fd 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -518,13 +518,13 @@ static int keyspan_pda_write(struct usb_serial_port *port,
518 the TX urb is in-flight (wait until it completes) 518 the TX urb is in-flight (wait until it completes)
519 the device is full (wait until it says there is room) 519 the device is full (wait until it says there is room)
520 */ 520 */
521 spin_lock(&port->lock); 521 spin_lock_bh(&port->lock);
522 if (port->write_urb_busy || priv->tx_throttled) { 522 if (port->write_urb_busy || priv->tx_throttled) {
523 spin_unlock(&port->lock); 523 spin_unlock_bh(&port->lock);
524 return 0; 524 return 0;
525 } 525 }
526 port->write_urb_busy = 1; 526 port->write_urb_busy = 1;
527 spin_unlock(&port->lock); 527 spin_unlock_bh(&port->lock);
528 528
529 /* At this point the URB is in our control, nobody else can submit it 529 /* At this point the URB is in our control, nobody else can submit it
530 again (the only sudden transition was the one from EINPROGRESS to 530 again (the only sudden transition was the one from EINPROGRESS to
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
index e49f40913c27..a764ff4e326c 100644
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
@@ -256,14 +256,14 @@ static int omninet_write (struct usb_serial_port *port, const unsigned char *buf
256 return (0); 256 return (0);
257 } 257 }
258 258
259 spin_lock(&wport->lock); 259 spin_lock_bh(&wport->lock);
260 if (wport->write_urb_busy) { 260 if (wport->write_urb_busy) {
261 spin_unlock(&wport->lock); 261 spin_unlock_bh(&wport->lock);
262 dbg("%s - already writing", __FUNCTION__); 262 dbg("%s - already writing", __FUNCTION__);
263 return 0; 263 return 0;
264 } 264 }
265 wport->write_urb_busy = 1; 265 wport->write_urb_busy = 1;
266 spin_unlock(&wport->lock); 266 spin_unlock_bh(&wport->lock);
267 267
268 count = (count > OMNINET_BULKOUTSIZE) ? OMNINET_BULKOUTSIZE : count; 268 count = (count > OMNINET_BULKOUTSIZE) ? OMNINET_BULKOUTSIZE : count;
269 269
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
index 789771ecdb11..1e07dfad6853 100644
--- a/drivers/usb/serial/safe_serial.c
+++ b/drivers/usb/serial/safe_serial.c
@@ -298,14 +298,14 @@ static int safe_write (struct usb_serial_port *port, const unsigned char *buf, i
298 dbg ("%s - write request of 0 bytes", __FUNCTION__); 298 dbg ("%s - write request of 0 bytes", __FUNCTION__);
299 return (0); 299 return (0);
300 } 300 }
301 spin_lock(&port->lock); 301 spin_lock_bh(&port->lock);
302 if (port->write_urb_busy) { 302 if (port->write_urb_busy) {
303 spin_unlock(&port->lock); 303 spin_unlock_bh(&port->lock);
304 dbg("%s - already writing", __FUNCTION__); 304 dbg("%s - already writing", __FUNCTION__);
305 return 0; 305 return 0;
306 } 306 }
307 port->write_urb_busy = 1; 307 port->write_urb_busy = 1;
308 spin_unlock(&port->lock); 308 spin_unlock_bh(&port->lock);
309 309
310 packet_length = port->bulk_out_size; // get max packetsize 310 packet_length = port->bulk_out_size; // get max packetsize
311 311