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
4b5e362c
Commit
4b5e362c
authored
Oct 28, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: Bring ESP driver in line with modern EH handling.
parent
52712a65
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
38 deletions
+30
-38
drivers/scsi/esp.c
drivers/scsi/esp.c
+7
-2
drivers/scsi/esp.h
drivers/scsi/esp.h
+23
-36
No files found.
drivers/scsi/esp.c
View file @
4b5e362c
...
@@ -1041,6 +1041,8 @@ static void __init esp_init_swstate(struct esp *esp)
...
@@ -1041,6 +1041,8 @@ static void __init esp_init_swstate(struct esp *esp)
esp
->
resetting_bus
=
0
;
esp
->
resetting_bus
=
0
;
esp
->
snip
=
0
;
esp
->
snip
=
0
;
init_waitqueue_head
(
&
esp
->
reset_queue
);
/* Debugging... */
/* Debugging... */
for
(
i
=
0
;
i
<
32
;
i
++
)
for
(
i
=
0
;
i
<
32
;
i
++
)
esp
->
espcmdlog
[
i
]
=
0
;
esp
->
espcmdlog
[
i
]
=
0
;
...
@@ -2045,6 +2047,7 @@ static int esp_finish_reset(struct esp *esp)
...
@@ -2045,6 +2047,7 @@ static int esp_finish_reset(struct esp *esp)
/* SCSI bus reset is complete. */
/* SCSI bus reset is complete. */
esp
->
resetting_bus
=
0
;
esp
->
resetting_bus
=
0
;
wake_up
(
&
esp
->
reset_queue
);
/* Ok, now it is safe to get commands going once more. */
/* Ok, now it is safe to get commands going once more. */
if
(
esp
->
issue_SC
)
if
(
esp
->
issue_SC
)
...
@@ -2065,7 +2068,7 @@ static int esp_do_resetbus(struct esp *esp)
...
@@ -2065,7 +2068,7 @@ static int esp_do_resetbus(struct esp *esp)
/* Reset ESP chip, reset hanging bus, then kill active and
/* Reset ESP chip, reset hanging bus, then kill active and
* disconnected commands for targets without soft reset.
* disconnected commands for targets without soft reset.
*/
*/
int
esp_reset
(
Scsi_Cmnd
*
SCptr
,
unsigned
int
how
)
int
esp_reset
(
Scsi_Cmnd
*
SCptr
)
{
{
struct
esp
*
esp
=
(
struct
esp
*
)
SCptr
->
host
->
hostdata
;
struct
esp
*
esp
=
(
struct
esp
*
)
SCptr
->
host
->
hostdata
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -2074,7 +2077,9 @@ int esp_reset(Scsi_Cmnd *SCptr, unsigned int how)
...
@@ -2074,7 +2077,9 @@ int esp_reset(Scsi_Cmnd *SCptr, unsigned int how)
(
void
)
esp_do_resetbus
(
esp
);
(
void
)
esp_do_resetbus
(
esp
);
spin_unlock_irqrestore
(
esp
->
ehost
->
host_lock
,
flags
);
spin_unlock_irqrestore
(
esp
->
ehost
->
host_lock
,
flags
);
return
SCSI_RESET_PENDING
;
wait_event
(
esp
->
reset_queue
,
(
esp
->
resetting_bus
==
0
));
return
SUCCESS
;
}
}
/* Internal ESP done function. */
/* Internal ESP done function. */
...
...
drivers/scsi/esp.h
View file @
4b5e362c
...
@@ -196,6 +196,7 @@ struct esp {
...
@@ -196,6 +196,7 @@ struct esp {
* cannot be assosciated with any specific command.
* cannot be assosciated with any specific command.
*/
*/
u8
resetting_bus
;
u8
resetting_bus
;
wait_queue_head_t
reset_queue
;
};
};
/* Bitfield meanings for the above registers. */
/* Bitfield meanings for the above registers. */
...
@@ -407,51 +408,37 @@ extern const char *esp_info(struct Scsi_Host *);
...
@@ -407,51 +408,37 @@ extern const char *esp_info(struct Scsi_Host *);
extern
int
esp_queue
(
Scsi_Cmnd
*
,
void
(
*
done
)(
Scsi_Cmnd
*
));
extern
int
esp_queue
(
Scsi_Cmnd
*
,
void
(
*
done
)(
Scsi_Cmnd
*
));
extern
int
esp_command
(
Scsi_Cmnd
*
);
extern
int
esp_command
(
Scsi_Cmnd
*
);
extern
int
esp_abort
(
Scsi_Cmnd
*
);
extern
int
esp_abort
(
Scsi_Cmnd
*
);
extern
int
esp_reset
(
Scsi_Cmnd
*
,
unsigned
int
);
extern
int
esp_reset
(
Scsi_Cmnd
*
);
extern
int
esp_proc_info
(
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
extern
int
esp_proc_info
(
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
hostno
,
int
inout
);
int
hostno
,
int
inout
);
extern
void
esp_slave_detach
(
Scsi_Device
*
SDptr
);
extern
void
esp_slave_detach
(
Scsi_Device
*
SDptr
);
#ifdef CONFIG_SPARC64
#ifdef CONFIG_SPARC64
#define SCSI_SPARC_ESP { \
#define ESP_HIGHMEM_IO 1
proc_name: "esp", \
proc_info: &esp_proc_info, \
name: "Sun ESP 100/100a/200", \
detect: esp_detect, \
slave_detach: esp_slave_detach, \
info: esp_info, \
command: esp_command, \
queuecommand: esp_queue, \
abort: esp_abort, \
reset: esp_reset, \
can_queue: 7, \
this_id: 7, \
sg_tablesize: SG_ALL, \
cmd_per_lun: 1, \
use_clustering: ENABLE_CLUSTERING, \
highmem_io: 1, \
}
#else
#else
/* Sparc32's iommu code cannot handle highmem pages yet. */
/* Sparc32's iommu code cannot handle highmem pages yet. */
#define SCSI_SPARC_ESP { \
#define ESP_HIGHMEM_IO 0
proc_name: "esp", \
proc_info: &esp_proc_info, \
name: "Sun ESP 100/100a/200", \
detect: esp_detect, \
slave_detach: esp_slave_detach, \
info: esp_info, \
command: esp_command, \
queuecommand: esp_queue, \
abort: esp_abort, \
reset: esp_reset, \
can_queue: 7, \
this_id: 7, \
sg_tablesize: SG_ALL, \
cmd_per_lun: 1, \
use_clustering: ENABLE_CLUSTERING, \
}
#endif
#endif
#define SCSI_SPARC_ESP { \
.proc_name = "esp", \
.proc_info = &esp_proc_info, \
.name = "Sun ESP 100/100a/200", \
.detect = esp_detect, \
.slave_detach = esp_slave_detach, \
.info = esp_info, \
.command = esp_command, \
.queuecommand = esp_queue, \
.eh_abort_handler = esp_abort, \
.eh_bus_reset_handler = esp_reset, \
.can_queue = 7, \
.this_id = 7, \
.sg_tablesize = SG_ALL, \
.cmd_per_lun = 1, \
.use_clustering = ENABLE_CLUSTERING, \
.highmem_io = ESP_HIGHMEM_IO, \
}
/* For our interrupt engine. */
/* For our interrupt engine. */
#define for_each_esp(esp) \
#define for_each_esp(esp) \
for((esp) = espchain; (esp); (esp) = (esp)->next)
for((esp) = espchain; (esp); (esp) = (esp)->next)
...
...
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