lkml.org 
[lkml]   [2002]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 2.5.53 : drivers/scsi/qlogicfc.c locking fixes
This is a small patch to fix the remaining deprecated
save_flags/cli/restore_flags construction in the qlogicfc.c scsi driver.

Please review.

Paulo Andre'

---

--- qlogicfc.c.orig 2002-12-29 22:07:37.000000000 +0000
+++ qlogicfc.c 2002-12-29 22:12:38.000000000 +0000
@@ -108,6 +108,8 @@

#define TRACE_BUF_LEN (32*1024)

+static spinlock_t qlogicfc_lock = SPIN_LOCK_UNLOCKED;
+
struct {
u_long next;
struct {
@@ -122,14 +124,13 @@
{ \
unsigned long flags; \
\
- save_flags(flags); \
- cli(); \
+ spin_lock_irqsave(&qlogicfc_lock, flags); \
trace.buf[trace.next].name = (w); \
trace.buf[trace.next].time = jiffies; \
trace.buf[trace.next].index = (i); \
trace.buf[trace.next].addr = (long) (a); \
trace.next = (trace.next + 1) & (TRACE_BUF_LEN - 1); \
- restore_flags(flags); \
+ spin_unlock_irqrestore(&qlogicfc_lock, flags); \
}

#else
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:31    [W:0.057 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site