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
db87fc1b
Commit
db87fc1b
authored
Mar 22, 2004
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[libata] use new pci_dma_error() to check for pci_map_single() failure
parent
651d0404
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
drivers/scsi/libata-core.c
drivers/scsi/libata-core.c
+7
-3
No files found.
drivers/scsi/libata-core.c
View file @
db87fc1b
...
...
@@ -1725,6 +1725,7 @@ static int ata_sg_setup_one(struct ata_queued_cmd *qc)
int
dir
=
scsi_to_pci_dma_dir
(
cmd
->
sc_data_direction
);
struct
scatterlist
*
sg
=
qc
->
sg
;
unsigned
int
have_sg
=
(
qc
->
flags
&
ATA_QCFLAG_SG
);
dma_addr_t
dma_address
;
assert
(
sg
==
&
qc
->
sgent
);
assert
(
qc
->
n_elem
==
1
);
...
...
@@ -1736,9 +1737,12 @@ static int ata_sg_setup_one(struct ata_queued_cmd *qc)
if
(
!
have_sg
)
return
0
;
sg_dma_address
(
sg
)
=
pci_map_single
(
ap
->
host_set
->
pdev
,
cmd
->
request_buffer
,
cmd
->
request_bufflen
,
dir
);
dma_address
=
pci_map_single
(
ap
->
host_set
->
pdev
,
cmd
->
request_buffer
,
cmd
->
request_bufflen
,
dir
);
if
(
pci_dma_error
(
dma_address
))
return
-
1
;
sg_dma_address
(
sg
)
=
dma_address
;
DPRINTK
(
"mapped buffer of %d bytes for %s
\n
"
,
cmd
->
request_bufflen
,
qc
->
flags
&
ATA_QCFLAG_WRITE
?
"write"
:
"read"
);
...
...
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