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
d8d088d2
Commit
d8d088d2
authored
Jun 03, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of
rsync://www.parisc-linux.org/~jejb/git/scsi-for-linus-2.6
parents
b05a720b
c92715b3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
+14
-11
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla2xxx/qla_os.c
+13
-11
drivers/scsi/scsi_scan.c
drivers/scsi/scsi_scan.c
+1
-0
No files found.
drivers/scsi/qla2xxx/qla_os.c
View file @
d8d088d2
...
@@ -507,6 +507,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
...
@@ -507,6 +507,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
int
ret
,
i
;
int
ret
,
i
;
unsigned
int
id
,
lun
;
unsigned
int
id
,
lun
;
unsigned
long
serial
;
unsigned
long
serial
;
unsigned
long
flags
;
if
(
!
CMD_SP
(
cmd
))
if
(
!
CMD_SP
(
cmd
))
return
FAILED
;
return
FAILED
;
...
@@ -519,7 +520,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
...
@@ -519,7 +520,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
/* Check active list for command command. */
/* Check active list for command command. */
spin_unlock_irq
(
ha
->
host
->
host_lock
);
spin_unlock_irq
(
ha
->
host
->
host_lock
);
spin_lock
(
&
ha
->
hardware_lock
);
spin_lock
_irqsave
(
&
ha
->
hardware_lock
,
flags
);
for
(
i
=
1
;
i
<
MAX_OUTSTANDING_COMMANDS
;
i
++
)
{
for
(
i
=
1
;
i
<
MAX_OUTSTANDING_COMMANDS
;
i
++
)
{
sp
=
ha
->
outstanding_cmds
[
i
];
sp
=
ha
->
outstanding_cmds
[
i
];
...
@@ -534,7 +535,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
...
@@ -534,7 +535,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
sp
->
state
));
sp
->
state
));
DEBUG3
(
qla2x00_print_scsi_cmd
(
cmd
);)
DEBUG3
(
qla2x00_print_scsi_cmd
(
cmd
);)
spin_unlock
(
&
ha
->
hardware_lock
);
spin_unlock
_irqrestore
(
&
ha
->
hardware_lock
,
flags
);
if
(
qla2x00_abort_command
(
ha
,
sp
))
{
if
(
qla2x00_abort_command
(
ha
,
sp
))
{
DEBUG2
(
printk
(
"%s(%ld): abort_command "
DEBUG2
(
printk
(
"%s(%ld): abort_command "
"mbx failed.
\n
"
,
__func__
,
ha
->
host_no
));
"mbx failed.
\n
"
,
__func__
,
ha
->
host_no
));
...
@@ -543,20 +544,19 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
...
@@ -543,20 +544,19 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
"mbx success.
\n
"
,
__func__
,
ha
->
host_no
));
"mbx success.
\n
"
,
__func__
,
ha
->
host_no
));
ret
=
SUCCESS
;
ret
=
SUCCESS
;
}
}
spin_lock
(
&
ha
->
hardware_lock
);
spin_lock
_irqsave
(
&
ha
->
hardware_lock
,
flags
);
break
;
break
;
}
}
spin_unlock_irqrestore
(
&
ha
->
hardware_lock
,
flags
);
/* Wait for the command to be returned. */
/* Wait for the command to be returned. */
if
(
ret
==
SUCCESS
)
{
if
(
ret
==
SUCCESS
)
{
spin_unlock
(
&
ha
->
hardware_lock
);
if
(
qla2x00_eh_wait_on_command
(
ha
,
cmd
)
!=
QLA_SUCCESS
)
{
if
(
qla2x00_eh_wait_on_command
(
ha
,
cmd
)
!=
QLA_SUCCESS
)
{
qla_printk
(
KERN_ERR
,
ha
,
qla_printk
(
KERN_ERR
,
ha
,
"scsi(%ld:%d:%d): Abort handler timed out -- %lx "
"scsi(%ld:%d:%d): Abort handler timed out -- %lx "
"%x.
\n
"
,
ha
->
host_no
,
id
,
lun
,
serial
,
ret
);
"%x.
\n
"
,
ha
->
host_no
,
id
,
lun
,
serial
,
ret
);
}
}
spin_lock
(
&
ha
->
hardware_lock
);
}
}
spin_lock_irq
(
ha
->
host
->
host_lock
);
spin_lock_irq
(
ha
->
host
->
host_lock
);
...
@@ -588,6 +588,7 @@ qla2x00_eh_wait_for_pending_target_commands(scsi_qla_host_t *ha, unsigned int t)
...
@@ -588,6 +588,7 @@ qla2x00_eh_wait_for_pending_target_commands(scsi_qla_host_t *ha, unsigned int t)
int
status
;
int
status
;
srb_t
*
sp
;
srb_t
*
sp
;
struct
scsi_cmnd
*
cmd
;
struct
scsi_cmnd
*
cmd
;
unsigned
long
flags
;
status
=
0
;
status
=
0
;
...
@@ -596,11 +597,11 @@ qla2x00_eh_wait_for_pending_target_commands(scsi_qla_host_t *ha, unsigned int t)
...
@@ -596,11 +597,11 @@ qla2x00_eh_wait_for_pending_target_commands(scsi_qla_host_t *ha, unsigned int t)
* array
* array
*/
*/
for
(
cnt
=
1
;
cnt
<
MAX_OUTSTANDING_COMMANDS
;
cnt
++
)
{
for
(
cnt
=
1
;
cnt
<
MAX_OUTSTANDING_COMMANDS
;
cnt
++
)
{
spin_lock
(
&
ha
->
hardware_lock
);
spin_lock
_irqsave
(
&
ha
->
hardware_lock
,
flags
);
sp
=
ha
->
outstanding_cmds
[
cnt
];
sp
=
ha
->
outstanding_cmds
[
cnt
];
if
(
sp
)
{
if
(
sp
)
{
cmd
=
sp
->
cmd
;
cmd
=
sp
->
cmd
;
spin_unlock
(
&
ha
->
hardware_lock
);
spin_unlock
_irqrestore
(
&
ha
->
hardware_lock
,
flags
);
if
(
cmd
->
device
->
id
==
t
)
{
if
(
cmd
->
device
->
id
==
t
)
{
if
(
!
qla2x00_eh_wait_on_command
(
ha
,
cmd
))
{
if
(
!
qla2x00_eh_wait_on_command
(
ha
,
cmd
))
{
status
=
1
;
status
=
1
;
...
@@ -608,7 +609,7 @@ qla2x00_eh_wait_for_pending_target_commands(scsi_qla_host_t *ha, unsigned int t)
...
@@ -608,7 +609,7 @@ qla2x00_eh_wait_for_pending_target_commands(scsi_qla_host_t *ha, unsigned int t)
}
}
}
}
}
else
{
}
else
{
spin_unlock
(
&
ha
->
hardware_lock
);
spin_unlock
_irqrestore
(
&
ha
->
hardware_lock
,
flags
);
}
}
}
}
return
(
status
);
return
(
status
);
...
@@ -740,6 +741,7 @@ qla2x00_eh_wait_for_pending_commands(scsi_qla_host_t *ha)
...
@@ -740,6 +741,7 @@ qla2x00_eh_wait_for_pending_commands(scsi_qla_host_t *ha)
int
status
;
int
status
;
srb_t
*
sp
;
srb_t
*
sp
;
struct
scsi_cmnd
*
cmd
;
struct
scsi_cmnd
*
cmd
;
unsigned
long
flags
;
status
=
1
;
status
=
1
;
...
@@ -748,17 +750,17 @@ qla2x00_eh_wait_for_pending_commands(scsi_qla_host_t *ha)
...
@@ -748,17 +750,17 @@ qla2x00_eh_wait_for_pending_commands(scsi_qla_host_t *ha)
* array
* array
*/
*/
for
(
cnt
=
1
;
cnt
<
MAX_OUTSTANDING_COMMANDS
;
cnt
++
)
{
for
(
cnt
=
1
;
cnt
<
MAX_OUTSTANDING_COMMANDS
;
cnt
++
)
{
spin_lock
(
&
ha
->
hardware_lock
);
spin_lock
_irqsave
(
&
ha
->
hardware_lock
,
flags
);
sp
=
ha
->
outstanding_cmds
[
cnt
];
sp
=
ha
->
outstanding_cmds
[
cnt
];
if
(
sp
)
{
if
(
sp
)
{
cmd
=
sp
->
cmd
;
cmd
=
sp
->
cmd
;
spin_unlock
(
&
ha
->
hardware_lock
);
spin_unlock
_irqrestore
(
&
ha
->
hardware_lock
,
flags
);
status
=
qla2x00_eh_wait_on_command
(
ha
,
cmd
);
status
=
qla2x00_eh_wait_on_command
(
ha
,
cmd
);
if
(
status
==
0
)
if
(
status
==
0
)
break
;
break
;
}
}
else
{
else
{
spin_unlock
(
&
ha
->
hardware_lock
);
spin_unlock
_irqrestore
(
&
ha
->
hardware_lock
,
flags
);
}
}
}
}
return
(
status
);
return
(
status
);
...
...
drivers/scsi/scsi_scan.c
View file @
d8d088d2
...
@@ -1197,6 +1197,7 @@ struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel,
...
@@ -1197,6 +1197,7 @@ struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel,
if
(
!
starget
)
if
(
!
starget
)
return
ERR_PTR
(
-
ENOMEM
);
return
ERR_PTR
(
-
ENOMEM
);
get_device
(
&
starget
->
dev
);
down
(
&
shost
->
scan_mutex
);
down
(
&
shost
->
scan_mutex
);
res
=
scsi_probe_and_add_lun
(
starget
,
lun
,
NULL
,
&
sdev
,
1
,
hostdata
);
res
=
scsi_probe_and_add_lun
(
starget
,
lun
,
NULL
,
&
sdev
,
1
,
hostdata
);
if
(
res
!=
SCSI_SCAN_LUN_PRESENT
)
if
(
res
!=
SCSI_SCAN_LUN_PRESENT
)
...
...
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