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
3f65bcdb
Commit
3f65bcdb
authored
Sep 25, 2003
by
Christoph Hellwig
Committed by
James Bottomley
Sep 25, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] handle failure when starting the eh thread
And while at it also fix the scsi_error_handler() prototype.
parent
e56dbc2b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
drivers/scsi/hosts.c
drivers/scsi/hosts.c
+8
-4
drivers/scsi/scsi_error.c
drivers/scsi/scsi_error.c
+2
-1
drivers/scsi/scsi_priv.h
drivers/scsi/scsi_priv.h
+1
-1
No files found.
drivers/scsi/hosts.c
View file @
3f65bcdb
...
@@ -263,7 +263,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
...
@@ -263,7 +263,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
rval
=
scsi_setup_command_freelist
(
shost
);
rval
=
scsi_setup_command_freelist
(
shost
);
if
(
rval
)
if
(
rval
)
goto
fail
;
goto
fail
_kfree
;
device_initialize
(
&
shost
->
shost_gendev
);
device_initialize
(
&
shost
->
shost_gendev
);
snprintf
(
shost
->
shost_gendev
.
bus_id
,
BUS_ID_SIZE
,
"host%d"
,
snprintf
(
shost
->
shost_gendev
.
bus_id
,
BUS_ID_SIZE
,
"host%d"
,
...
@@ -277,13 +277,17 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
...
@@ -277,13 +277,17 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
shost
->
host_no
);
shost
->
host_no
);
shost
->
eh_notify
=
&
complete
;
shost
->
eh_notify
=
&
complete
;
/* XXX(hch): handle error return */
rval
=
kernel_thread
(
scsi_error_handler
,
shost
,
0
);
kernel_thread
((
int
(
*
)(
void
*
))
scsi_error_handler
,
shost
,
0
);
if
(
rval
<
0
)
goto
fail_destroy_freelist
;
wait_for_completion
(
&
complete
);
wait_for_completion
(
&
complete
);
shost
->
eh_notify
=
NULL
;
shost
->
eh_notify
=
NULL
;
scsi_proc_hostdir_add
(
shost
->
hostt
);
scsi_proc_hostdir_add
(
shost
->
hostt
);
return
shost
;
return
shost
;
fail:
fail_destroy_freelist:
scsi_destroy_command_freelist
(
shost
);
fail_kfree:
kfree
(
shost
);
kfree
(
shost
);
return
NULL
;
return
NULL
;
}
}
...
...
drivers/scsi/scsi_error.c
View file @
3f65bcdb
...
@@ -1490,7 +1490,7 @@ static void scsi_unjam_host(struct Scsi_Host *shost)
...
@@ -1490,7 +1490,7 @@ static void scsi_unjam_host(struct Scsi_Host *shost)
* event (i.e. failure). When this takes place, we have the job of
* event (i.e. failure). When this takes place, we have the job of
* trying to unjam the bus and restarting things.
* trying to unjam the bus and restarting things.
**/
**/
void
scsi_error_handler
(
void
*
data
)
int
scsi_error_handler
(
void
*
data
)
{
{
struct
Scsi_Host
*
shost
=
(
struct
Scsi_Host
*
)
data
;
struct
Scsi_Host
*
shost
=
(
struct
Scsi_Host
*
)
data
;
int
rtn
;
int
rtn
;
...
@@ -1594,6 +1594,7 @@ void scsi_error_handler(void *data)
...
@@ -1594,6 +1594,7 @@ void scsi_error_handler(void *data)
* the way out the door.
* the way out the door.
*/
*/
complete_and_exit
(
shost
->
eh_notify
,
0
);
complete_and_exit
(
shost
->
eh_notify
,
0
);
return
0
;
}
}
/*
/*
...
...
drivers/scsi/scsi_priv.h
View file @
3f65bcdb
...
@@ -91,7 +91,7 @@ extern void scsi_exit_devinfo(void);
...
@@ -91,7 +91,7 @@ extern void scsi_exit_devinfo(void);
/* scsi_error.c */
/* scsi_error.c */
extern
void
scsi_times_out
(
struct
scsi_cmnd
*
cmd
);
extern
void
scsi_times_out
(
struct
scsi_cmnd
*
cmd
);
extern
void
scsi_error_handler
(
void
*
host
);
extern
int
scsi_error_handler
(
void
*
host
);
extern
int
scsi_decide_disposition
(
struct
scsi_cmnd
*
cmd
);
extern
int
scsi_decide_disposition
(
struct
scsi_cmnd
*
cmd
);
extern
void
scsi_eh_wakeup
(
struct
Scsi_Host
*
shost
);
extern
void
scsi_eh_wakeup
(
struct
Scsi_Host
*
shost
);
extern
int
scsi_eh_scmd_add
(
struct
scsi_cmnd
*
,
int
);
extern
int
scsi_eh_scmd_add
(
struct
scsi_cmnd
*
,
int
);
...
...
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