Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
5796aa7b
Commit
5796aa7b
authored
Nov 02, 2006
by
Stefan Richter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ieee1394: sbp2: some conditions in queue_command are unlikely
Signed-off-by:
Stefan Richter
<
stefanr@s5r6.in-berlin.de
>
parent
e8ca5668
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
drivers/ieee1394/sbp2.c
drivers/ieee1394/sbp2.c
+5
-5
No files found.
drivers/ieee1394/sbp2.c
View file @
5796aa7b
...
...
@@ -1910,12 +1910,12 @@ static int sbp2scsi_queuecommand(struct scsi_cmnd *SCpnt,
struct
sbp2scsi_host_info
*
hi
;
int
result
=
DID_NO_CONNECT
<<
16
;
if
(
!
sbp2util_node_is_available
(
scsi_id
))
if
(
unlikely
(
!
sbp2util_node_is_available
(
scsi_id
)
))
goto
done
;
hi
=
scsi_id
->
hi
;
if
(
!
hi
)
{
if
(
unlikely
(
!
hi
)
)
{
SBP2_ERR
(
"sbp2scsi_host_info is NULL - this is bad!"
);
goto
done
;
}
...
...
@@ -1923,7 +1923,7 @@ static int sbp2scsi_queuecommand(struct scsi_cmnd *SCpnt,
/* Multiple units are currently represented to the SCSI core as separate
* targets, not as one target with multiple LUs. Therefore return
* selection time-out to any IO directed at non-zero LUNs. */
if
(
SCpnt
->
device
->
lun
)
if
(
unlikely
(
SCpnt
->
device
->
lun
)
)
goto
done
;
/* handle the request sense command here (auto-request sense) */
...
...
@@ -1934,7 +1934,7 @@ static int sbp2scsi_queuecommand(struct scsi_cmnd *SCpnt,
return
0
;
}
if
(
!
hpsb_node_entry_valid
(
scsi_id
->
ne
))
{
if
(
unlikely
(
!
hpsb_node_entry_valid
(
scsi_id
->
ne
)
))
{
SBP2_ERR
(
"Bus reset in progress - rejecting command"
);
result
=
DID_BUS_BUSY
<<
16
;
goto
done
;
...
...
@@ -1942,7 +1942,7 @@ static int sbp2scsi_queuecommand(struct scsi_cmnd *SCpnt,
/* Bidirectional commands are not yet implemented,
* and unknown transfer direction not handled. */
if
(
SCpnt
->
sc_data_direction
==
DMA_BIDIRECTIONAL
)
{
if
(
unlikely
(
SCpnt
->
sc_data_direction
==
DMA_BIDIRECTIONAL
)
)
{
SBP2_ERR
(
"Cannot handle DMA_BIDIRECTIONAL - rejecting command"
);
result
=
DID_ERROR
<<
16
;
goto
done
;
...
...
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