Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
7082c040
Commit
7082c040
authored
Jul 28, 2009
by
Thomas Gleixner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scsi: aacraid: convert to anon_semaphore
Signed-off-by:
Thomas Gleixner
<
tglx@linutronix.de
>
parent
43b8515c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
drivers/scsi/aacraid/aacraid.h
drivers/scsi/aacraid/aacraid.h
+2
-2
drivers/scsi/aacraid/commctrl.c
drivers/scsi/aacraid/commctrl.c
+2
-2
drivers/scsi/aacraid/commsup.c
drivers/scsi/aacraid/commsup.c
+7
-7
drivers/scsi/aacraid/dpcsup.c
drivers/scsi/aacraid/dpcsup.c
+2
-2
No files found.
drivers/scsi/aacraid/aacraid.h
View file @
7082c040
...
...
@@ -719,7 +719,7 @@ struct aac_fib_context {
u32
unique
;
// unique value representing this context
ulong
jiffies
;
// used for cleanup - dmb changed to ulong
struct
list_head
next
;
// used to link context's into a linked list
struct
semaphore
wait_sem
;
// this is used to wait for the next fib to arrive.
struct
anon_
semaphore
wait_sem
;
// this is used to wait for the next fib to arrive.
int
wait
;
// Set to true when thread is in WaitForSingleObject
unsigned
long
count
;
// total number of FIBs on FibList
struct
list_head
fib_list
;
// this holds fibs and their attachd hw_fibs
...
...
@@ -789,7 +789,7 @@ struct fib {
* This is the event the sendfib routine will wait on if the
* caller did not pass one and this is synch io.
*/
struct
semaphore
event_wait
;
struct
anon_
semaphore
event_wait
;
spinlock_t
event_lock
;
u32
done
;
/* gets set to 1 when fib is complete */
...
...
drivers/scsi/aacraid/commctrl.c
View file @
7082c040
...
...
@@ -190,7 +190,7 @@ static int open_getadapter_fib(struct aac_dev * dev, void __user *arg)
/*
* Initialize the mutex used to wait for the next AIF.
*/
semaphore_init_locked
(
&
fibctx
->
wait_sem
);
anon_
semaphore_init_locked
(
&
fibctx
->
wait_sem
);
fibctx
->
wait
=
0
;
/*
* Initialize the fibs and set the count of fibs on
...
...
@@ -321,7 +321,7 @@ return_fib:
ssleep
(
1
);
}
if
(
f
.
wait
)
{
if
(
down_interruptible
(
&
fibctx
->
wait_sem
)
<
0
)
{
if
(
anon_
down_interruptible
(
&
fibctx
->
wait_sem
)
<
0
)
{
status
=
-
EINTR
;
}
else
{
/* Lock again and retry */
...
...
drivers/scsi/aacraid/commsup.c
View file @
7082c040
...
...
@@ -124,7 +124,7 @@ int aac_fib_setup(struct aac_dev * dev)
fibptr
->
hw_fib_va
=
hw_fib
;
fibptr
->
data
=
(
void
*
)
fibptr
->
hw_fib_va
->
data
;
fibptr
->
next
=
fibptr
+
1
;
/* Forward chain the fibs */
semaphore_init_locked
(
&
fibptr
->
event_wait
);
anon_
semaphore_init_locked
(
&
fibptr
->
event_wait
);
spin_lock_init
(
&
fibptr
->
event_lock
);
hw_fib
->
header
.
XferState
=
cpu_to_le32
(
0xffffffff
);
hw_fib
->
header
.
SenderSize
=
cpu_to_le16
(
dev
->
max_fib_size
);
...
...
@@ -490,7 +490,7 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size,
* hardware failure has occurred.
*/
unsigned
long
count
=
36000000L
;
/* 3 minutes */
while
(
down_trylock
(
&
fibptr
->
event_wait
))
{
while
(
anon_
down_trylock
(
&
fibptr
->
event_wait
))
{
int
blink
;
if
(
--
count
==
0
)
{
struct
aac_queue
*
q
=
&
dev
->
queues
->
queue
[
AdapNormCmdQueue
];
...
...
@@ -515,9 +515,9 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size,
}
udelay
(
5
);
}
}
else
if
(
down_interruptible
(
&
fibptr
->
event_wait
))
{
}
else
if
(
anon_
down_interruptible
(
&
fibptr
->
event_wait
))
{
fibptr
->
done
=
2
;
up
(
&
fibptr
->
event_wait
);
anon_
up
(
&
fibptr
->
event_wait
);
}
spin_lock_irqsave
(
&
fibptr
->
event_lock
,
flags
);
if
((
fibptr
->
done
==
0
)
||
(
fibptr
->
done
==
2
))
{
...
...
@@ -1177,7 +1177,7 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced)
(
fib
->
hw_fib_va
->
header
.
XferState
&
cpu_to_le32
(
ResponseExpected
)))
{
unsigned
long
flagv
;
spin_lock_irqsave
(
&
fib
->
event_lock
,
flagv
);
up
(
&
fib
->
event_wait
);
anon_
up
(
&
fib
->
event_wait
);
spin_unlock_irqrestore
(
&
fib
->
event_lock
,
flagv
);
schedule
();
retval
=
0
;
...
...
@@ -1460,7 +1460,7 @@ int aac_check_health(struct aac_dev * aac)
* Set the event to wake up the
* thread that will waiting.
*/
up
(
&
fibctx
->
wait_sem
);
anon_
up
(
&
fibctx
->
wait_sem
);
}
else
{
printk
(
KERN_WARNING
"aifd: didn't allocate NewFib.
\n
"
);
kfree
(
fib
);
...
...
@@ -1691,7 +1691,7 @@ int aac_command_thread(void *data)
* Set the event to wake up the
* thread that is waiting.
*/
up
(
&
fibctx
->
wait_sem
);
anon_
up
(
&
fibctx
->
wait_sem
);
}
else
{
printk
(
KERN_WARNING
"aifd: didn't allocate NewFib.
\n
"
);
}
...
...
drivers/scsi/aacraid/dpcsup.c
View file @
7082c040
...
...
@@ -127,7 +127,7 @@ unsigned int aac_response_normal(struct aac_queue * q)
spin_lock_irqsave
(
&
fib
->
event_lock
,
flagv
);
if
(
!
fib
->
done
)
fib
->
done
=
1
;
up
(
&
fib
->
event_wait
);
anon_
up
(
&
fib
->
event_wait
);
spin_unlock_irqrestore
(
&
fib
->
event_lock
,
flagv
);
FIB_COUNTER_INCREMENT
(
aac_config
.
NormalRecved
);
if
(
fib
->
done
==
2
)
{
...
...
@@ -322,7 +322,7 @@ unsigned int aac_intr_normal(struct aac_dev * dev, u32 index)
spin_lock_irqsave
(
&
fib
->
event_lock
,
flagv
);
if
(
!
fib
->
done
)
fib
->
done
=
1
;
up
(
&
fib
->
event_wait
);
anon_
up
(
&
fib
->
event_wait
);
spin_unlock_irqrestore
(
&
fib
->
event_lock
,
flagv
);
FIB_COUNTER_INCREMENT
(
aac_config
.
NormalRecved
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment