Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
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
Commits
537a95d9
Commit
537a95d9
authored
Nov 05, 2005
by
Tejun Heo
Committed by
Jeff Garzik
Nov 05, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[libata] restore sg on DMA mapping failure
parent
fecb4a0c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
drivers/scsi/libata-core.c
drivers/scsi/libata-core.c
+8
-2
No files found.
drivers/scsi/libata-core.c
View file @
537a95d9
...
...
@@ -2622,8 +2622,11 @@ static int ata_sg_setup_one(struct ata_queued_cmd *qc)
dma_address
=
dma_map_single
(
ap
->
host_set
->
dev
,
qc
->
buf_virt
,
sg
->
length
,
dir
);
if
(
dma_mapping_error
(
dma_address
))
if
(
dma_mapping_error
(
dma_address
))
{
/* restore sg */
sg
->
length
+=
qc
->
pad_len
;
return
-
1
;
}
sg_dma_address
(
sg
)
=
dma_address
;
sg_dma_len
(
sg
)
=
sg
->
length
;
...
...
@@ -2694,8 +2697,11 @@ static int ata_sg_setup(struct ata_queued_cmd *qc)
dir
=
qc
->
dma_dir
;
n_elem
=
dma_map_sg
(
ap
->
host_set
->
dev
,
sg
,
qc
->
n_elem
,
dir
);
if
(
n_elem
<
1
)
if
(
n_elem
<
1
)
{
/* restore last sg */
lsg
->
length
+=
qc
->
pad_len
;
return
-
1
;
}
DPRINTK
(
"%d sg elements mapped
\n
"
,
n_elem
);
...
...
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