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
nexedi
linux
Commits
5f88d042
Commit
5f88d042
authored
Nov 17, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCSI]: drivers/scsi/esp.c needs interrupt.h plus fix abort/reset locking.
parent
4d1738db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
drivers/scsi/esp.c
drivers/scsi/esp.c
+9
-11
No files found.
drivers/scsi/esp.c
View file @
5f88d042
...
...
@@ -24,6 +24,7 @@
#include <linux/stat.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include "scsi.h"
#include "hosts.h"
...
...
@@ -1931,15 +1932,12 @@ static void esp_dump_state(struct esp *esp)
ESPLOG
((
"
\n
"
));
}
/* Abort a command. */
/* Abort a command.
The host_lock is acquired by caller.
*/
static
int
esp_abort
(
Scsi_Cmnd
*
SCptr
)
{
struct
esp
*
esp
=
(
struct
esp
*
)
SCptr
->
host
->
hostdata
;
unsigned
long
flags
;
int
don
;
spin_lock_irqsave
(
esp
->
ehost
->
host_lock
,
flags
);
ESPLOG
((
"esp%d: Aborting command
\n
"
,
esp
->
esp_id
));
esp_dump_state
(
esp
);
...
...
@@ -1954,7 +1952,6 @@ static int esp_abort(Scsi_Cmnd *SCptr)
esp
->
msgout_len
=
1
;
esp
->
msgout_ctr
=
0
;
esp_cmd
(
esp
,
ESP_CMD_SATN
);
spin_unlock_irqrestore
(
esp
->
ehost
->
host_lock
,
flags
);
return
SUCCESS
;
}
...
...
@@ -1983,7 +1980,6 @@ static int esp_abort(Scsi_Cmnd *SCptr)
if
(
don
)
ESP_INTSON
(
esp
->
dregs
);
spin_unlock_irqrestore
(
esp
->
ehost
->
host_lock
,
flags
);
return
SUCCESS
;
}
}
...
...
@@ -1997,7 +1993,6 @@ static int esp_abort(Scsi_Cmnd *SCptr)
if
(
esp
->
current_SC
)
{
if
(
don
)
ESP_INTSON
(
esp
->
dregs
);
spin_unlock_irqrestore
(
esp
->
ehost
->
host_lock
,
flags
);
return
FAILED
;
}
...
...
@@ -2010,7 +2005,7 @@ static int esp_abort(Scsi_Cmnd *SCptr)
if
(
don
)
ESP_INTSON
(
esp
->
dregs
);
spin_unlock_irqrestore
(
esp
->
ehost
->
host_lock
,
flags
);
return
FAILED
;
}
...
...
@@ -2067,18 +2062,21 @@ static int esp_do_resetbus(struct esp *esp)
/* Reset ESP chip, reset hanging bus, then kill active and
* disconnected commands for targets without soft reset.
*
* The host_lock is acquired by caller.
*/
static
int
esp_reset
(
Scsi_Cmnd
*
SCptr
)
{
struct
esp
*
esp
=
(
struct
esp
*
)
SCptr
->
host
->
hostdata
;
unsigned
long
flags
;
spin_lock_irqsave
(
esp
->
ehost
->
host_lock
,
flags
);
(
void
)
esp_do_resetbus
(
esp
);
spin_unlock_irqrestore
(
esp
->
ehost
->
host_lock
,
flags
);
spin_unlock_irq
(
esp
->
ehost
->
host_lock
);
wait_event
(
esp
->
reset_queue
,
(
esp
->
resetting_bus
==
0
));
spin_lock_irq
(
esp
->
ehost
->
host_lock
);
return
SUCCESS
;
}
...
...
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