Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
410f65ef
Commit
410f65ef
authored
Sep 16, 2004
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] kill useless spinlock wrappers in BusLogic
Signed-off-by:
James Bottomley
<
James.Bottomley@SteelEye.com
>
parent
05b4e3b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
48 deletions
+8
-48
drivers/scsi/BusLogic.c
drivers/scsi/BusLogic.c
+8
-8
drivers/scsi/BusLogic.h
drivers/scsi/BusLogic.h
+0
-40
No files found.
drivers/scsi/BusLogic.c
View file @
410f65ef
...
...
@@ -2621,7 +2621,7 @@ static irqreturn_t BusLogic_InterruptHandler(int IRQ_Channel, void *DeviceIdenti
/*
Acquire exclusive access to Host Adapter.
*/
BusLogic_AcquireHostAdapterLockIH
(
HostAdapter
,
&
ProcessorFlags
);
spin_lock_irqsave
(
HostAdapter
->
SCSI_Host
->
host_lock
,
ProcessorFlags
);
/*
Handle Interrupts appropriately for each Host Adapter type.
*/
...
...
@@ -2689,7 +2689,7 @@ static irqreturn_t BusLogic_InterruptHandler(int IRQ_Channel, void *DeviceIdenti
/*
Release exclusive access to Host Adapter.
*/
BusLogic_ReleaseHostAdapterLockIH
(
HostAdapter
,
&
ProcessorFlags
);
spin_unlock_irqrestore
(
HostAdapter
->
SCSI_Host
->
host_lock
,
ProcessorFlags
);
return
IRQ_HANDLED
;
}
...
...
@@ -2777,9 +2777,9 @@ static int BusLogic_QueueCommand(struct scsi_cmnd *Command, void (*CompletionRou
*/
CCB
=
BusLogic_AllocateCCB
(
HostAdapter
);
if
(
CCB
==
NULL
)
{
BusLogic_ReleaseHostAdapterLock
(
HostAdapter
);
spin_unlock_irq
(
HostAdapter
->
SCSI_Host
->
host_lock
);
BusLogic_Delay
(
1
);
BusLogic_AcquireHostAdapterLock
(
HostAdapter
);
spin_lock_irq
(
HostAdapter
->
SCSI_Host
->
host_lock
);
CCB
=
BusLogic_AllocateCCB
(
HostAdapter
);
if
(
CCB
==
NULL
)
{
Command
->
result
=
DID_ERROR
<<
16
;
...
...
@@ -2903,10 +2903,10 @@ static int BusLogic_QueueCommand(struct scsi_cmnd *Command, void (*CompletionRou
error as a Host Adapter Hard Reset should be initiated soon.
*/
if
(
!
BusLogic_WriteOutgoingMailbox
(
HostAdapter
,
BusLogic_MailboxStartCommand
,
CCB
))
{
BusLogic_ReleaseHostAdapterLock
(
HostAdapter
);
spin_unlock_irq
(
HostAdapter
->
SCSI_Host
->
host_lock
);
BusLogic_Warning
(
"Unable to write Outgoing Mailbox - "
"Pausing for 1 second
\n
"
,
HostAdapter
);
BusLogic_Delay
(
1
);
BusLogic_AcquireHostAdapterLock
(
HostAdapter
);
spin_lock_irq
(
HostAdapter
->
SCSI_Host
->
host_lock
);
if
(
!
BusLogic_WriteOutgoingMailbox
(
HostAdapter
,
BusLogic_MailboxStartCommand
,
CCB
))
{
BusLogic_Warning
(
"Still unable to write Outgoing Mailbox - "
"Host Adapter Dead?
\n
"
,
HostAdapter
);
BusLogic_DeallocateCCB
(
CCB
);
...
...
@@ -3044,9 +3044,9 @@ static int BusLogic_ResetHostAdapter(struct BusLogic_HostAdapter *HostAdapter, b
*/
if
(
HardReset
)
{
BusLogic_ReleaseHostAdapterLock
(
HostAdapter
);
spin_unlock_irq
(
HostAdapter
->
SCSI_Host
->
host_lock
);
BusLogic_Delay
(
HostAdapter
->
BusSettleTime
);
BusLogic_AcquireHostAdapterLock
(
HostAdapter
);
spin_lock_irq
(
HostAdapter
->
SCSI_Host
->
host_lock
);
}
for
(
TargetID
=
0
;
TargetID
<
HostAdapter
->
MaxTargetDevices
;
TargetID
++
)
{
...
...
drivers/scsi/BusLogic.h
View file @
410f65ef
...
...
@@ -1169,46 +1169,6 @@ struct SCSI_Inquiry {
unsigned
char
ProductRevisionLevel
[
4
];
/* Bytes 32-35 */
};
/*
BusLogic_AcquireHostAdapterLock acquires exclusive access to Host Adapter.
*/
static
inline
void
BusLogic_AcquireHostAdapterLock
(
struct
BusLogic_HostAdapter
*
HostAdapter
)
{
spin_lock_irq
(
HostAdapter
->
SCSI_Host
->
host_lock
);
}
/*
BusLogic_ReleaseHostAdapterLock releases exclusive access to Host Adapter.
*/
static
inline
void
BusLogic_ReleaseHostAdapterLock
(
struct
BusLogic_HostAdapter
*
HostAdapter
)
{
spin_unlock_irq
(
HostAdapter
->
SCSI_Host
->
host_lock
);
}
/*
BusLogic_AcquireHostAdapterLockIH acquires exclusive access to Host Adapter,
but is only called from the interrupt handler.
*/
static
inline
void
BusLogic_AcquireHostAdapterLockIH
(
struct
BusLogic_HostAdapter
*
HostAdapter
,
unsigned
long
*
ProcessorFlags
)
{
spin_lock_irqsave
(
HostAdapter
->
SCSI_Host
->
host_lock
,
*
ProcessorFlags
);
}
/*
BusLogic_ReleaseHostAdapterLockIH releases exclusive access to Host Adapter,
but is only called from the interrupt handler.
*/
static
inline
void
BusLogic_ReleaseHostAdapterLockIH
(
struct
BusLogic_HostAdapter
*
HostAdapter
,
unsigned
long
*
ProcessorFlags
)
{
spin_unlock_irqrestore
(
HostAdapter
->
SCSI_Host
->
host_lock
,
*
ProcessorFlags
);
}
/*
Define functions to provide an abstraction for reading and writing the
...
...
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